mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-68492 Behat: Use faster direct link steps in lib/tests/behat
This commit is contained in:
parent
be32dc800d
commit
111cf93b71
7 changed files with 24 additions and 53 deletions
|
@ -12,9 +12,7 @@ Feature: Close modals by clicking outside them
|
|||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
And I am on the "quiz1" "Activity" page logged in as "admin"
|
||||
And I click on "Edit quiz" "button"
|
||||
And I click on "Add" "link"
|
||||
And I click on "a new question" "link"
|
||||
|
@ -43,9 +41,7 @@ Feature: Close modals by clicking outside them
|
|||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test quiz name"
|
||||
And I am on the "quiz1" "Activity" page logged in as "admin"
|
||||
And I click on "Edit quiz" "button"
|
||||
And I click on "Help with Editing quiz" "icon"
|
||||
And I should see "More help"
|
||||
|
|
|
@ -68,9 +68,7 @@ Feature: Initials bar
|
|||
Given the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
|
||||
| assign | C1 | assign1 | TestAssignment | Test assignment description | 0 | 0 |
|
||||
And I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
And I am on the "assign1" "Activity" page logged in as "teacher"
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
|
@ -95,8 +93,7 @@ Feature: Initials bar
|
|||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
And I am on the "assign1" "Activity" page
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
|
@ -126,9 +123,7 @@ Feature: Initials bar
|
|||
Given the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
|
||||
| assign | C1 | assign1 | TestAssignment | Test assignment description | 0 | 0 |
|
||||
And I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
And I am on the "assign1" "Activity" page logged in as "teacher"
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And I select "View gradebook" from the "jump" singleselect
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
|
@ -154,8 +149,7 @@ Feature: Initials bar
|
|||
And I should not see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
And I am on the "assign1" "Activity" page
|
||||
When I navigate to "View all submissions" in current page administration
|
||||
And I select "View gradebook" from the "jump" singleselect
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
|
@ -186,14 +180,11 @@ Feature: Initials bar
|
|||
Given the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
|
||||
| assign | C1 | assign1 | TestAssignment | Test assignment description | 0 | 0 |
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "C1" "Course" page logged in as "student1"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "C1" "Course" page logged in as "student2"
|
||||
And I log out
|
||||
And I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "C1" "Course" page logged in as "teacher"
|
||||
And I follow "Participants"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
|
@ -249,9 +240,7 @@ Feature: Initials bar
|
|||
Given the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled |
|
||||
| assign | C1 | assign1 | TestAssignment | Test assignment description | 0 | 0 |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "TestAssignment"
|
||||
And I am on the "assign1" "Activity" page logged in as "admin"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Completion tracking" to "1"
|
||||
|
@ -261,8 +250,7 @@ Feature: Initials bar
|
|||
And I click on "Assignment - TestAssignment" "checkbox"
|
||||
And I click on "Save changes" "button"
|
||||
And I log out
|
||||
And I log in as "teacher"
|
||||
And I am on "Course 1" course homepage
|
||||
And I am on the "C1" "Course" page logged in as "teacher"
|
||||
And I navigate to "Reports > Activity completion" in current page administration
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
|
|
|
@ -12,8 +12,7 @@ Feature: Forms with a large number of fields
|
|||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| label | L1 | <a href="../lib/tests/fixtures/max_input_vars.php">FixtureLink</a> | C1 | label1 |
|
||||
When I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
When I am on the "C1" "Course" page logged in as "admin"
|
||||
And I follow "FixtureLink"
|
||||
|
||||
# Note: These tests do not actually use JavaScript but they don't work with
|
||||
|
|
|
@ -37,8 +37,7 @@ Feature: Context freezing apply to child contexts
|
|||
| student1 | courseb | student |
|
||||
|
||||
Scenario: Freeze course module module should freeze just that module
|
||||
Given I log in as "admin"
|
||||
And I am on "courseaa1" course homepage
|
||||
Given I am on the "courseaa1" "Course" page logged in as "admin"
|
||||
And I follow "faa1"
|
||||
And "Add a new discussion topic" "link" should exist
|
||||
When I follow "Freeze this context"
|
||||
|
@ -58,8 +57,7 @@ Feature: Context freezing apply to child contexts
|
|||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "teacher"
|
||||
And I am on "courseaa1" course homepage
|
||||
When I am on the "courseaa1" "Course" page logged in as "teacher"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
|
@ -76,8 +74,7 @@ Feature: Context freezing apply to child contexts
|
|||
And "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "courseaa1" course homepage
|
||||
When I am on the "courseaa1" "Course" page logged in as "student1"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
|
@ -91,8 +88,7 @@ Feature: Context freezing apply to child contexts
|
|||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
Scenario: Freeze course should freeze all children
|
||||
Given I log in as "admin"
|
||||
And I am on "courseaa1" course homepage
|
||||
Given I am on the "courseaa1" "Course" page logged in as "admin"
|
||||
And I should see "Turn editing on"
|
||||
When I follow "Freeze this context"
|
||||
And I click on "Continue" "button"
|
||||
|
@ -114,8 +110,7 @@ Feature: Context freezing apply to child contexts
|
|||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "teacher"
|
||||
And I am on "courseaa1" course homepage
|
||||
When I am on the "courseaa1" "Course" page logged in as "teacher"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
|
@ -132,8 +127,7 @@ Feature: Context freezing apply to child contexts
|
|||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "courseaa1" course homepage
|
||||
When I am on the "courseaa1" "Course" page logged in as "student1"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
|
@ -171,8 +165,7 @@ Feature: Context freezing apply to child contexts
|
|||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "teacher"
|
||||
And I am on "courseaa1" course homepage
|
||||
When I am on the "courseaa1" "Course" page logged in as "teacher"
|
||||
Then I should not see "Turn editing on"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
|
@ -190,8 +183,7 @@ Feature: Context freezing apply to child contexts
|
|||
Then "Add a new discussion topic" "link" should exist
|
||||
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on "courseaa1" course homepage
|
||||
When I am on the "courseaa1" "Course" page logged in as "student1"
|
||||
And I follow "faa1"
|
||||
Then "Add a new discussion topic" "link" should not exist
|
||||
When I am on "courseaa1" course homepage
|
||||
|
|
|
@ -16,8 +16,7 @@ Feature: Override permissions on a context
|
|||
| teacher1 | C1 | editingteacher |
|
||||
|
||||
Scenario: Default system capabilities modification
|
||||
Given I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "C1" "Course" page logged in as "admin"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
When I click on "Allow" "icon" in the "mod/forum:addnews" "table_row"
|
||||
And I press "Student"
|
||||
|
|
|
@ -12,8 +12,7 @@ Feature: Read-only forms should work
|
|||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| label | L1 | <a href="../lib/tests/fixtures/readonlyform.php?sections=1">Fixture link</a> | C1 | label1 |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "C1" "Course" page logged in as "admin"
|
||||
And I follow "Fixture link"
|
||||
When I expand all fieldsets
|
||||
Then the field "Name" matches value "Important information"
|
||||
|
@ -26,8 +25,7 @@ Feature: Read-only forms should work
|
|||
And the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| label | L1 | <a href="../lib/tests/fixtures/readonlyform.php?sections=2">Fixture link</a> | C1 | label1 |
|
||||
And I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "C1" "Course" page logged in as "admin"
|
||||
And I follow "Fixture link"
|
||||
When I expand all fieldsets
|
||||
Then the field "Name" matches value "Important information"
|
||||
|
|
|
@ -14,8 +14,7 @@ Feature: Page displaying with secure layout
|
|||
| label | L1 | <a href="../lib/tests/fixtures/securetestpage.php">Fixture link</a> | C1 | label1 |
|
||||
|
||||
Scenario: Confirm that there is no header link
|
||||
Given I log in as "admin"
|
||||
And I am on "Course 1" course homepage
|
||||
Given I am on the "C1" "Course" page logged in as "admin"
|
||||
When I follow "Fixture link"
|
||||
Then I should see "Acceptance test site" in the "nav" "css_element"
|
||||
But "Acceptance test site" "link" should not exist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue