mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-72287 behat: Update behat tests
This commit is contained in:
parent
d000b16a72
commit
e00da7e884
@ -60,14 +60,16 @@ Feature: Award badges
|
||||
And I press "Save"
|
||||
And I press "Enable access"
|
||||
And I press "Continue"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge 1"
|
||||
And I follow "Recipients (0)"
|
||||
And I press "Award badge"
|
||||
# Award course badge 1 to student 1.
|
||||
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
|
||||
When I press "Award badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge 1"
|
||||
And I follow "Recipients (1)"
|
||||
Then I should see "Recipients (1)"
|
||||
@ -185,7 +187,8 @@ Feature: Award badges
|
||||
And I press "Award badge"
|
||||
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
|
||||
When I press "Award badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge"
|
||||
Then I should see "Recipients (2)"
|
||||
And I log out
|
||||
@ -286,7 +289,8 @@ Feature: Award badges
|
||||
# Award course badge 1 to student 1.
|
||||
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
|
||||
When I press "Award badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge 1"
|
||||
And I follow "Recipients (1)"
|
||||
Then I should see "Recipients (1)"
|
||||
@ -311,7 +315,8 @@ Feature: Award badges
|
||||
# Award course badge 2 to student 2.
|
||||
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)"
|
||||
When I press "Award badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge 2"
|
||||
And I follow "Recipients (1)"
|
||||
Then I should see "Recipients (1)"
|
||||
@ -352,7 +357,8 @@ Feature: Award badges
|
||||
And I press "Award badge"
|
||||
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
|
||||
When I press "Award badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge"
|
||||
Then I should see "Recipients (2)"
|
||||
And I follow "Recipients (2)"
|
||||
@ -361,6 +367,7 @@ Feature: Award badges
|
||||
And I press "Revoke badge"
|
||||
And I set the field "existingrecipients[]" to "Student 1 (student1@example.com)"
|
||||
When I press "Revoke badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge"
|
||||
Then I should see "Recipients (0)"
|
||||
|
@ -69,7 +69,8 @@ Feature: Award badges with separate groups
|
||||
# Non-editing teacher can award the badge
|
||||
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)"
|
||||
And I press "Award badge"
|
||||
And I follow "Manage badges"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Badges > Manage badges" in current page administration
|
||||
And I follow "Course Badge"
|
||||
And I should see "Recipients (1)"
|
||||
And I log out
|
||||
|
@ -28,7 +28,7 @@ Feature: Course activity controls works as expected
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I follow the breadcrumb <targetpage>
|
||||
When I click on <targetpage> "link" in the "region-main" "region"
|
||||
And I add the "Recent activity" block
|
||||
And I open the action menu in "Recent activity" "block"
|
||||
And I click on "Delete Recent activity block" "link"
|
||||
@ -76,12 +76,12 @@ Feature: Course activity controls works as expected
|
||||
|
||||
Examples:
|
||||
| courseformat | coursedisplay | targetpage | should_see_other_sections | should_see_other_sections_following_block_sections_links | belowpage |
|
||||
| topics | 0 | "C1" | should | should | "Topic 2" |
|
||||
| topics | 0 | "General" | should | should | "Topic 2" |
|
||||
| topics | 1 | "Topic 1" | should not | should not | "Topic 2" |
|
||||
| topics | 1 | "C1" | should | should not | "Topic 2" |
|
||||
| weeks | 0 | "C1" | should | should | "8 January - 14 January" |
|
||||
| topics | 1 | "General" | should | should not | "Topic 2" |
|
||||
| weeks | 0 | "General" | should | should | "8 January - 14 January" |
|
||||
| weeks | 1 | "1 January - 7 January" | should not | should not | "8 January - 14 January" |
|
||||
| weeks | 1 | "C1" | should | should not | "8 January - 14 January" |
|
||||
| weeks | 1 | "General" | should | should not | "8 January - 14 January" |
|
||||
|
||||
Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected
|
||||
Given the following "users" exist:
|
||||
@ -99,7 +99,7 @@ Feature: Course activity controls works as expected
|
||||
| forum | Test forum name 2 | Test forum description 2 | C1 | 0002 | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I follow the breadcrumb <targetpage>
|
||||
When I click on <targetpage> "link" in the "region-main" "region"
|
||||
And I add the "Recent activity" block
|
||||
And I open the action menu in "Recent activity" "block"
|
||||
And I click on "Delete Recent activity block" "link"
|
||||
@ -135,9 +135,9 @@ Feature: Course activity controls works as expected
|
||||
|
||||
Examples:
|
||||
| courseformat | coursedisplay | targetpage | should_see_other_sections | should_see_other_sections_following_block_sections_links | belowpage |
|
||||
| topics | 0 | "C1" | should | should | "Topic 2" |
|
||||
| topics | 0 | "General" | should | should | "Topic 2" |
|
||||
| topics | 1 | "Topic 1" | should not | should not | "Topic 2" |
|
||||
| topics | 1 | "C1" | should | should not | "Topic 2" |
|
||||
| weeks | 0 | "C1" | should | should | "8 January - 14 January" |
|
||||
| topics | 1 | "General" | should | should not | "Topic 2" |
|
||||
| weeks | 0 | "General" | should | should | "8 January - 14 January" |
|
||||
| weeks | 1 | "1 January - 7 January" | should not | should not | "8 January - 14 January" |
|
||||
| weeks | 1 | "C1" | should | should not | "8 January - 14 January" |
|
||||
| weeks | 1 | "General" | should | should not | "8 January - 14 January" |
|
||||
|
@ -15,6 +15,8 @@ Feature: Edit course settings
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And the following config values are set as admin:
|
||||
| courselistshortnames | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Settings" in current page administration
|
||||
@ -23,10 +25,12 @@ Feature: Edit course settings
|
||||
| Course short name | Edited course shortname |
|
||||
| Course summary | Edited course summary |
|
||||
And I press "Save and display"
|
||||
And I am on site homepage
|
||||
Then I should not see "Course 1"
|
||||
And I should not see "C1"
|
||||
And I should see "Edited course fullname"
|
||||
And I should see "Edited course shortname"
|
||||
And I am on "Edited course fullname" course homepage
|
||||
And I navigate to "Settings" in current page administration
|
||||
And the field "Course full name" matches value "Edited course fullname"
|
||||
And the field "Course short name" matches value "Edited course shortname"
|
||||
|
@ -40,7 +40,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
Scenario: Perform an advanced search using any term
|
||||
Given I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "words" to "subject"
|
||||
When I press "Search"
|
||||
Then I should see "My subject"
|
||||
@ -49,7 +49,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
Scenario: Perform an advanced search avoiding words
|
||||
Given I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "words" to "My"
|
||||
And I set the field "notwords" to "subjective"
|
||||
When I press "Search"
|
||||
@ -62,7 +62,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
| postgres |
|
||||
And I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "fullwords" to "subject"
|
||||
When I press "Search"
|
||||
Then I should see "My subject"
|
||||
@ -71,7 +71,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
Scenario: Perform an advanced search matching the subject
|
||||
Given I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "subject" to "subjective"
|
||||
When I press "Search"
|
||||
Then I should not see "My message"
|
||||
@ -86,7 +86,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
And I log out
|
||||
When I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "user" to "TWO"
|
||||
And I press "Search"
|
||||
Then I should see "Teacher TWO"
|
||||
@ -95,7 +95,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
Scenario: Perform an advanced search with multiple words
|
||||
Given I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "subject" to "your subjective"
|
||||
When I press "Search"
|
||||
Then I should not see "My message"
|
||||
@ -112,7 +112,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
And I log out
|
||||
And I am on the "Announcements" "forum activity" page logged in as student1
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "Is tagged with" to "SearchedTag"
|
||||
When I press "Search"
|
||||
Then I should see "My subject"
|
||||
@ -124,7 +124,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
And I click on "Your subjective" action menu
|
||||
And I follow "Star this discussion"
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "starredonly" to "1"
|
||||
When I press "Search"
|
||||
Then I should not see "My message"
|
||||
@ -136,7 +136,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
|
||||
And I click on "Your subjective" action menu
|
||||
And I follow "Star this discussion"
|
||||
And I press "Search"
|
||||
And I should see "Advanced search"
|
||||
And I should see "Please enter search terms into one or more of the following fields"
|
||||
And I set the field "words" to "message"
|
||||
And I set the field "starredonly" to "1"
|
||||
When I press "Search"
|
||||
|
@ -25,7 +25,9 @@ Feature: Content bank link in the activity settings form
|
||||
And I add a "H5P" to section "1"
|
||||
Then I should see "Use the content bank (opens in new window) to manage your H5P files"
|
||||
And I click on "content bank (opens in new window)" "link" in the "General" "fieldset"
|
||||
And I should see "C1" in the "page-navbar" "region"
|
||||
And I switch to the browser tab opened by the app
|
||||
And I should see "Content bank" in the "page-header" "region"
|
||||
And I should see "filltheblanks.h5p" in the "page-content" "region"
|
||||
And I close all opened windows
|
||||
|
||||
@javascript
|
||||
|
@ -44,7 +44,7 @@ Feature: User can view activity log.
|
||||
And I follow "Ann, Jill, Grainne, Beauchamp"
|
||||
When I follow "Today's logs"
|
||||
And I should see "Assignment: Test assignment name"
|
||||
And I follow "Ann, Jill, Grainne, Beauchamp"
|
||||
And I click on "Back" "button"
|
||||
And I follow "All logs"
|
||||
Then I should see "Assignment: Test assignment name"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user