MDL-73373 behat: Update behat tests

This commit is contained in:
Peter Dias 2022-02-01 09:55:49 +08:00
parent 675b7eb234
commit df5425538e
2 changed files with 18 additions and 15 deletions

View File

@ -55,7 +55,8 @@ Feature: Staff can assign user roles
@javascript
Scenario: Enrol at activity level using custom field search
When I am on the "page1" "Activity" page logged in as "admin"
And I navigate to "Locally assigned roles" in current page administration
And I navigate to "Permissions" in current page administration
And I select "Locally assigned roles" from the "jump" singleselect
And I follow "Teacher"
And I set the field "addselect_searchtext" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels.
@ -70,7 +71,8 @@ Feature: Staff can assign user roles
| user | role | contextlevel | reference |
| user1 | editingteacher | Activity module | page1 |
When I am on the "page1" "Activity" page logged in as "admin"
And I navigate to "Locally assigned roles" in current page administration
And I navigate to "Permissions" in current page administration
And I select "Locally assigned roles" from the "jump" singleselect
And I follow "Teacher"
And I set the field "removeselect_searchtext" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels.

View File

@ -35,34 +35,35 @@ Feature: In a book, verify log entries
And I navigate to "Print book" in current page administration
And I am on the "Test book" "book activity" page
And I navigate to "Download IMS CP" in current page administration
And I am on the "Test book" "book activity" page
And I navigate to "Logs" in current page administration
And I navigate to "Reports > Logs" in site administration
And I set the field "menuid" to "Course 1"
And I press "Get these logs"
Then I should see "Book exported"
And I should see "Book printed"
And I should see "Chapter viewed" in the "#report_log_r4_c5" "css_element"
And I should see "Chapter viewed" in the "#report_log_r5_c5" "css_element"
And I should see "Chapter viewed" in the "#report_log_r6_c5" "css_element"
And I should see "Chapter viewed" in the "#report_log_r7_c5" "css_element"
And I should see "Chapter updated" in the "#report_log_r7_c5" "css_element"
And I should see "Chapter viewed" in the "#report_log_r8_c5" "css_element"
And I should see "Chapter updated" in the "#report_log_r9_c5" "css_element"
And I should see "Chapter viewed" in the "#report_log_r10_c5" "css_element"
And I should see "Chapter created" in the "#report_log_r11_c5" "css_element"
And I click on "Chapter viewed" "link" in the "#report_log_r6_c5" "css_element"
And I should see "Chapter created" in the "#report_log_r9_c5" "css_element"
And I click on "Chapter viewed" "link" in the "#report_log_r4_c5" "css_element"
And I switch to "action" window
And I change window size to "large"
And I should see "1. First chapter edited" in the ".book_content" "css_element"
And I switch to the main window
And I click on "Chapter viewed" "link" in the "#report_log_r7_c5" "css_element"
And I click on "Chapter viewed" "link" in the "#report_log_r5_c5" "css_element"
And I switch to "action" window
And I should see "2. Second chapter" in the ".book_content" "css_element"
And I switch to the main window
And I click on "Chapter updated" "link" in the "#report_log_r9_c5" "css_element"
And I click on "Chapter updated" "link" in the "#report_log_r7_c5" "css_element"
And I switch to "action" window
And I should see "1. First chapter edited" in the ".book_content" "css_element"
And I switch to the main window
And I click on "Chapter created" "link" in the "#report_log_r9_c5" "css_element"
And I switch to "action" window
And I should see "2. Second chapter" in the ".book_content" "css_element"
And I switch to the main window
And I click on "Chapter created" "link" in the "#report_log_r11_c5" "css_element"
And I switch to "action" window
And I should see "2. Second chapter" in the ".book_content" "css_element"
And I switch to the main window
And I click on "Chapter created" "link" in the "#report_log_r13_c5" "css_element"
And I switch to "action" window
And I should see "1. First chapter edited" in the ".book_content" "css_element"
And I switch to the main window