forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-82424 tool_generator: plugin handling on test scenarios
- Loading branch information
1 parent
a3e810b
commit 5cd11ee
Showing
4 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
admin/tool/generator/tests/behat/testscenario_steps.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@tool @tool_generator @_file_upload | ||
Feature: Make test scenario can execute specific steps | ||
In order to create all sort of testing scenarios | ||
As a developer | ||
I need to execute some generic steps in the current instance | ||
|
||
@javascript | ||
Scenario: Make test scenario can enable and disable plugins | ||
Given I disable "page" "mod" plugin | ||
And I log in as "admin" | ||
And I navigate to "Development > Create testing scenarios" in site administration | ||
And I upload "admin/tool/generator/tests/fixtures/testscenario/scenario_plugins.feature" file to "Feature file" filemanager | ||
And I press "Import" | ||
And I should see "Scenario: Course with some disabled plugins" | ||
When I am on "C1" course homepage with editing mode on | ||
And I click on "Add an activity or resource" "button" in the "Section 1" "section" | ||
Then I should see "Page" in the "Add an activity or resource" "dialogue" | ||
And I should not see "Book" in the "Add an activity or resource" "dialogue" |
12 changes: 12 additions & 0 deletions
12
admin/tool/generator/tests/fixtures/testscenario/scenario_plugins.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Feature: Enable and disable plugins | ||
Scenario: Course with some disabled plugins | ||
Given the following config values are set as admin: | ||
| sendcoursewelcomemessage | 0 | enrol_manual | | ||
And I enable "page" "mod" plugin | ||
And I disable "book" "mod" plugin | ||
And the following "course" exists: | ||
| fullname | Course test | | ||
| shortname | C1 | | ||
| category | 0 | | ||
| numsections | 3 | | ||
| initsections | 1 | |