Skip to content

Commit

Permalink
MDL-79323 lang: Fix Behat tests regressions after merging en_fix strings
Browse files Browse the repository at this point in the history
  • Loading branch information
vmdef committed Sep 19, 2023
1 parent 13b7ea5 commit 0b838f6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 35 deletions.
18 changes: 9 additions & 9 deletions availability/tests/behat/edit_availability.feature
Expand Up @@ -235,16 +235,16 @@ Feature: edit_availability
And I press "Add restriction..."
And I click on "Date" "button" in the "Add restriction..." "dialogue"
And I press "Save changes"
# Testing edit settings link
And "Edit settings" "link" should exist in the "section-1" "core_availability > Section availability"
When I click on "Edit settings" "link" in the "section-1" "core_availability > Section availability"
# Testing edit restrictions link
And "Edit restrictions" "link" should exist in the "section-1" "core_availability > Section availability"
When I click on "Edit restrictions" "link" in the "section-1" "core_availability > Section availability"
Then I should see "Restrict access"
And I should not see "General"
And I should see "Collapse all"
And I should not see "Expand all"
And I click on "Cancel" "button"
And I am on "Course 1" course homepage with editing mode off
And I should not see "Edit settings"
And I should not see "Edit restrictions"

@javascript
Scenario: Edit activity availability using course page link
Expand All @@ -254,12 +254,12 @@ Feature: edit_availability
And I press "Add restriction..."
And I click on "Date" "button" in the "Add restriction..." "dialogue"
When I press "Save and return to course"
# Edit settings link not displayed when editing mode is off.
Then "Edit settings" "link" should not exist in the "MyForum" "core_availability > Activity availability"
# Testing edit settings link
# Edit restrictions link not displayed when editing mode is off.
Then "Edit restrictions" "link" should not exist in the "MyForum" "core_availability > Activity availability"
# Testing edit restrictions link
But I am on "Course 1" course homepage with editing mode on
And "Edit settings" "link" should exist in the "MyForum" "core_availability > Activity availability"
And I click on "Edit settings" "link" in the "MyForum" "core_availability > Activity availability"
And "Edit restrictions" "link" should exist in the "MyForum" "core_availability > Activity availability"
And I click on "Edit restrictions" "link" in the "MyForum" "core_availability > Activity availability"
And I should see "Restrict access"
And I should not see "Content"
And I should see "Collapse all"
Expand Down
4 changes: 2 additions & 2 deletions contentbank/tests/behat/delete_content.feature
Expand Up @@ -43,7 +43,7 @@ Feature: Delete H5P file from the content bank
And I click on "Delete" "link" in the ".cb-toolbar-container" "css_element"
And I click on "Delete" "button" in the "Delete content" "dialogue"
And I wait until the page is ready
And I should see "The content has been deleted."
And I should see "Content deleted."
And I should not see "content2delete.h5p"

Scenario: Users without the required capability can only delete their own content
Expand Down Expand Up @@ -94,5 +94,5 @@ Feature: Delete H5P file from the content bank
Then I should see "Are you sure you want to delete the content 'content2delete.h5p'"
And I should see "The content will only be deleted from the content bank"
And I click on "Delete" "button" in the "Delete content" "dialogue"
And I should see "The content has been deleted."
And I should see "Content deleted."
And I should not see "content2delete.h5p"
16 changes: 8 additions & 8 deletions grade/report/singleview/tests/behat/singleview.feature
Expand Up @@ -171,23 +171,23 @@ Feature: We can use Single view

Scenario: Teacher sees his last viewed singleview report type when navigating back to the gradebook singleview report.
Given I navigate to "View > Single view" in the course gradebook
And I should see "Select a user above to view all their grades" in the "region-main" "region"
And I should see "Search for a user to view all their grades" in the "region-main" "region"
And I click on "Grade items" "link"
And I should see "Select a grade item above" in the "region-main" "region"
When I am on the "Course 1" "grades > Single view > View" page
Then I should see "Select a grade item above" in the "region-main" "region"
And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher3"
And I should see "Select a user above to view all their grades" in the "region-main" "region"
And I should see "Search for a user to view all their grades" in the "region-main" "region"

Scenario: Teacher sees his last viewed user report when navigating back to the gradebook singleview report.
Given I navigate to "View > Single view" in the course gradebook
And I click on "Gronya,Beecham" in the "user" search widget
And I should see "Gronya,Beecham" in the "region-main" "region"
When I am on the "Course 1" "grades > Single view > View" page
Then I should not see "Select a user above to view all their grades" in the "region-main" "region"
Then I should not see "Search for a user to view all their grades" in the "region-main" "region"
And I should see "Gronya,Beecham" in the "region-main" "region"
And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher3"
And I should see "Select a user above to view all their grades" in the "region-main" "region"
And I should see "Search for a user to view all their grades" in the "region-main" "region"

Scenario: Teacher sees his last viewed grade item report when navigating back to the gradebook singleview report.
Given I navigate to "View > Single view" in the course gradebook
Expand All @@ -198,7 +198,7 @@ Feature: We can use Single view
Then I should not see "Select a grade item above" in the "region-main" "region"
And I should see "Test assignment one" in the "region-main" "region"
And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher3"
And I should see "Select a user above to view all their grades" in the "region-main" "region"
And I should see "Search for a user to view all their grades" in the "region-main" "region"

Scenario: Teacher sees his last viewed user report if the user is a part of the the current group.
Given the following "groups" exist:
Expand All @@ -217,7 +217,7 @@ Feature: We can use Single view
And I click on "Group 1" in the "group" search widget
When I navigate to "View > Single view" in the course gradebook
Then I should see "Nee,Chumlee" in the "region-main" "region"
And I should not see "Select a user above to view all their grades" in the "region-main" "region"
And I should not see "Search for a user to view all their grades" in the "region-main" "region"

Scenario: Teacher does not see his last viewed user report if the user is not a part of the the current group.
Given the following "groups" exist:
Expand All @@ -235,7 +235,7 @@ Feature: We can use Single view
And I navigate to "View > Grader report" in the course gradebook
And I click on "Group 1" in the "group" search widget
When I navigate to "View > Single view" in the course gradebook
Then I should see "Select a user above to view all their grades" in the "region-main" "region"
Then I should see "Search for a user to view all their grades" in the "region-main" "region"
And I should not see "Gronya,Beecham" in the "region-main" "region"

Scenario: Teacher does not see his last viewed user report if that user is no longer enrolled in the course.
Expand All @@ -245,7 +245,7 @@ Feature: We can use Single view
And I click on "Unenrol" "icon" in the "Gronya,Beecham" "table_row"
And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
When I am on the "Course 1" "grades > Single view > View" page
Then I should see "Select a user above to view all their grades" in the "region-main" "region"
Then I should see "Search for a user to view all their grades" in the "region-main" "region"
And I should not see "Gronya,Beecham" in the "region-main" "region"

Scenario: Teacher does not see his last viewed grade item report if the item no longer exists in the course.
Expand Down
12 changes: 6 additions & 6 deletions grade/report/user/tests/behat/view_usereport.feature
Expand Up @@ -24,14 +24,14 @@ Feature: We can use the user report
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
And I should see "Select a user above to view their report" in the "region-main" "region"
And I should see "Search for a user to view their report" in the "region-main" "region"
And I click on "Student 1" in the "user" search widget
And I should see "Student 1" in the "region-main" "region"
When I am on the "Course 1" "grades > User report > View" page
Then I should not see "Select a user above to view their report" in the "region-main" "region"
Then I should not see "Search for a user to view their report" in the "region-main" "region"
And I should see "Student 1" in the "region-main" "region"
And I am on the "Course 1" "grades > User report > View" page logged in as "teacher2"
And I should see "Select a user above to view their report" in the "region-main" "region"
And I should see "Search for a user to view their report" in the "region-main" "region"

Scenario: Teacher sees his last viewed user report if the user is a part of the the current group.
Given the following "groups" exist:
Expand All @@ -56,7 +56,7 @@ Feature: We can use the user report
And I click on "Group 1" in the "group" search widget
When I navigate to "View > User report" in the course gradebook
Then I should see "Student 2" in the "region-main" "region"
And I should not see "Select a user above to view their report" in the "region-main" "region"
And I should not see "Search for a user to view their report" in the "region-main" "region"

Scenario: Teacher does not see the last viewed user if the user is not a part of the the current group.
Given the following "groups" exist:
Expand All @@ -80,7 +80,7 @@ Feature: We can use the user report
And I navigate to "View > Grader report" in the course gradebook
And I click on "Group 1" in the "group" search widget
When I navigate to "View > User report" in the course gradebook
Then I should see "Select a user above to view their report" in the "region-main" "region"
Then I should see "Search for a user to view their report" in the "region-main" "region"
And I should not see "Student 1" in the "region-main" "region"

Scenario: Teacher does not see his last viewed user report if the user is no longer enrolled in the course.
Expand All @@ -102,5 +102,5 @@ Feature: We can use the user report
And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
And I am on "Course 1" course homepage
When I navigate to "View > User report" in the course gradebook
Then I should see "Select a user above to view their report" in the "region-main" "region"
Then I should see "Search for a user to view their report" in the "region-main" "region"
And I should not see "Student 1" in the "region-main" "region"
4 changes: 2 additions & 2 deletions lib/tests/behat/moodlenet_outbound.feature
Expand Up @@ -62,7 +62,7 @@ Feature: MoodleNet outbound send activity
When I navigate to "Share to MoodleNet" in current page administration
Then I should see "Assignment" in the "Share to MoodleNet" "dialogue"
And I should see "Test Assignment 1" in the "Share to MoodleNet" "dialogue"
And I should see "This activity is being shared with MoodleNet as a resource" in the "Share to MoodleNet" "dialogue"
And I should see "This activity is being shared with MoodleNet as a resource." in the "Share to MoodleNet" "dialogue"
And I click on "Share" "button" in the "Share to MoodleNet" "dialogue"
And I switch to "moodlenet_auth" window
And I press "Allow" and switch to main window
Expand All @@ -73,7 +73,7 @@ Feature: MoodleNet outbound send activity
Scenario: User can see their shared resources on the MoodleNet share progress page
Given I am on the "C1" course page logged in as teacher1
When I navigate to "MoodleNet share progress" in current page administration
And I should see "There are no shared resources to display at this time"
And I should see "There are no shared resources to display at this time."
And I am on "C1" course homepage
And I navigate to "Share to MoodleNet" in current page administration
And I click on "Share" "button" in the "Share to MoodleNet" "dialogue"
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/behat/moodlenet_share_course.feature
Expand Up @@ -59,7 +59,7 @@ Feature: MoodleNet outbound share course
When I navigate to "Share to MoodleNet" in current page administration
Then I should see "Course" in the "Share to MoodleNet" "dialogue"
And I should see "Test course 1" in the "Share to MoodleNet" "dialogue"
And I should see "This course is being shared with MoodleNet as a resource" in the "Share to MoodleNet" "dialogue"
And I should see "This course is being shared with MoodleNet as a resource." in the "Share to MoodleNet" "dialogue"
And I click on "Share" "button" in the "Share to MoodleNet" "dialogue"
And I switch to "moodlenet_auth" window
And I press "Allow" and switch to main window
Expand Down
8 changes: 4 additions & 4 deletions lib/tests/behat/moodlenet_share_partial_course.feature
Expand Up @@ -69,8 +69,8 @@ Feature: MoodleNet outbound share selected activities in a course
And I click on "Select activity Test Assignment 2" "checkbox"
When I click on "Share to MoodleNet" "button" in the "sticky-footer" "region"
Then I should see "Test course 1" in the "Share to MoodleNet" "dialogue"
And I should see "The selected activities are being shared with MoodleNet as a resource" in the "Share to MoodleNet" "dialogue"
And I should see "2 activities will be included in the course" in the "Share to MoodleNet" "dialogue"
And I should see "The selected activities are being shared with MoodleNet as a resource." in the "Share to MoodleNet" "dialogue"
And I should see "2 activities will be included in the course." in the "Share to MoodleNet" "dialogue"
And I click on "Share" "button" in the "Share to MoodleNet" "dialogue"
And I switch to "moodlenet_auth" window
And I press "Allow" and switch to main window
Expand All @@ -85,8 +85,8 @@ Feature: MoodleNet outbound share selected activities in a course
And I click on "Select activity Test Assignment 1" "checkbox"
When I click on "Share to MoodleNet" "button" in the "sticky-footer" "region"
Then I should see "Test Assignment 1" in the "Share to MoodleNet" "dialogue"
And I should see "This activity is being shared with MoodleNet as a resource" in the "Share to MoodleNet" "dialogue"
And I should not see "1 activities will be included in the course" in the "Share to MoodleNet" "dialogue"
And I should see "This activity is being shared with MoodleNet as a resource." in the "Share to MoodleNet" "dialogue"
And I should not see "1 activities will be included in the course." in the "Share to MoodleNet" "dialogue"
And I click on "Share" "button" in the "Share to MoodleNet" "dialogue"
And I switch to "moodlenet_auth" window
And I press "Allow" and switch to main window
Expand Down
6 changes: 3 additions & 3 deletions mod/lti/tests/behat/managecoursetools.feature
Expand Up @@ -19,11 +19,11 @@ Feature: Manage course tools
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "LTI External tools" in current page administration
And I should see "LTI External tools are add-on apps"
And I should see "There are no LTI external tools yet"
And I should see "There are no LTI External tools yet."
When I click on "Add tool" "link"
And I press "Cancel"
Then I should see "LTI External tools are add-on apps"
And I should see "There are no LTI external tools yet"
And I should see "There are no LTI External tools yet."
And I click on "Add tool" "link"
And I set the following fields to these values:
| Tool name | Teaching Tool 1 |
Expand Down Expand Up @@ -125,7 +125,7 @@ Feature: Manage course tools
And I choose "Delete" in the open action menu
And I should see "This will delete Test tool from the available LTI tools in your course."
And I click on "Delete" "button" in the "Delete Test tool" "dialogue"
And I should see "Test tool removed"
And I should see "Test tool deleted"
And I should not see "Test tool" in the "reportbuilder-table" "table"

@javascript
Expand Down

0 comments on commit 0b838f6

Please sign in to comment.