mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-80746 behat: Update initials bar behat selector to core_course
This commit is contained in:
parent
303b226f6b
commit
67379e7607
@ -59,6 +59,10 @@ class behat_course extends behat_base {
|
||||
"%core_course/activityChooser%//*[@data-region=%locator%][contains(concat(' ', @class, ' '), ' tab-pane ')]"
|
||||
]
|
||||
),
|
||||
new behat_component_named_selector(
|
||||
'initials bar',
|
||||
[".//*[contains(concat(' ', @class, ' '), ' initialbar ')]//span[contains(., %locator%)]/parent::div"]
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -31,15 +31,15 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
Scenario: A teacher can open the filter component
|
||||
Given I should see "Filter by name"
|
||||
When I click on "Filter by name" "combobox"
|
||||
Then I should see "27" node occurrences of type "input" in the "First name" "core_grades > initials bar"
|
||||
And I should see "27" node occurrences of type "input" in the "Last name" "core_grades > initials bar"
|
||||
Then I should see "27" node occurrences of type "input" in the "First name" "core_course > initials bar"
|
||||
And I should see "27" node occurrences of type "input" in the "Last name" "core_course > initials bar"
|
||||
And "input[data-action=cancel]" "css_element" should exist
|
||||
And "input[data-action=save]" "css_element" should exist
|
||||
|
||||
Scenario: A teacher can filter the grader report to limit users reported
|
||||
Given I click on "Filter by name" "combobox"
|
||||
And I wait until "input[data-action=save]" "css_element" exists
|
||||
When I select "D" in the "First name" "core_grades > initials bar"
|
||||
When I select "D" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
# We should only have one user that matches the "D" first name
|
||||
@ -57,8 +57,8 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
# Test filtering on last name
|
||||
# Business logic: If all is selected, we will not show it i.e. First (D) and NOT First (D) Last (All)
|
||||
And I click on "First (D)" "combobox"
|
||||
And I select "All" in the "First name" "core_grades > initials bar"
|
||||
And I select "M" in the "Last name" "core_grades > initials bar"
|
||||
And I select "All" in the "First name" "core_course > initials bar"
|
||||
And I select "M" in the "Last name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
# We should only have one user that matches the "T" first name
|
||||
@ -75,8 +75,8 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
|
||||
# Test filtering on first && last name
|
||||
And I click on "Last (M)" "combobox"
|
||||
And I select "U" in the "First name" "core_grades > initials bar"
|
||||
And I select "T" in the "Last name" "core_grades > initials bar"
|
||||
And I select "U" in the "First name" "core_course > initials bar"
|
||||
And I select "T" in the "Last name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
# We should only have one user that matches the "T" first name
|
||||
@ -96,7 +96,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
Scenario: A teacher can quickly tell that a filter is applied to the current table
|
||||
Given I click on "Filter by name" "combobox"
|
||||
And I wait until "input[data-action=save]" "css_element" exists
|
||||
When I select "T" in the "First name" "core_grades > initials bar"
|
||||
When I select "T" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
Then I should see "First (T)"
|
||||
@ -104,7 +104,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
# Check if removing the filter, removes the highlight and user notice of applied filters
|
||||
And I click on "First (T)" "combobox"
|
||||
And I wait until "input[data-action=save]" "css_element" exists
|
||||
And I select "All" in the "First name" "core_grades > initials bar"
|
||||
And I select "All" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
# Check if the name button indicates if a filter is active
|
||||
@ -130,13 +130,13 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
| core | all | すべて |
|
||||
And I click on "Filter by name" "combobox"
|
||||
And "input[data-action=save]" "css_element" should be visible
|
||||
And I select "T" in the "First name" "core_grades > initials bar"
|
||||
And I select "T" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
And I click on "First (T)" "combobox"
|
||||
And I wait until "input[data-action=save]" "css_element" exists
|
||||
|
||||
When I select "すべて" in the "First name" "core_grades > initials bar"
|
||||
When I select "すべて" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait to be redirected
|
||||
Then I should not see "First (すべて) Last (すべて)"
|
||||
@ -152,7 +152,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
Given I set the field "Search users" to "Student 1"
|
||||
And I click on "Student 1" in the "Search users" search combo box
|
||||
And I click on "Filter by name" "combobox"
|
||||
And I select "S" in the "First name" "core_grades > initials bar"
|
||||
And I select "S" in the "First name" "core_course > initials bar"
|
||||
When I press "Apply"
|
||||
And the field "Search users" matches value "Student 1"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
@ -166,7 +166,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
| User Test | student4@example.com | - |
|
||||
| Turtle Manatee | student5@example.com | - |
|
||||
And I click on "First (S)" "combobox"
|
||||
And I select "M" in the "First name" "core_grades > initials bar"
|
||||
And I select "M" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And the following should not exist in the "user-grades" table:
|
||||
| -1- | -2- | -3- |
|
||||
@ -191,7 +191,7 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
| Teacher 1 | teacher1@example.com | - |
|
||||
| Turtle Manatee | student5@example.com | - |
|
||||
When I click on "Filter by name" "combobox"
|
||||
And I select "E" in the "Last name" "core_grades > initials bar"
|
||||
And I select "E" in the "Last name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
Then the following should exist in the "user-grades" table:
|
||||
| -1- | -2- | -3- |
|
||||
@ -212,8 +212,8 @@ Feature: Within the grader report, test that we can open our generic filter drop
|
||||
And the page should meet accessibility standards with "wcag131, wcag141, wcag412" extra tests
|
||||
And I click on "Filter by name" "combobox"
|
||||
And "input[data-action=save]" "css_element" should be visible
|
||||
And the focused element is "All" "button" in the "First name" "core_grades > initials bar"
|
||||
And the focused element is "All" "button" in the "First name" "core_course > initials bar"
|
||||
When I press the tab key
|
||||
Then the focused element is "input[value=A]" "css_element" in the "First name" "core_grades > initials bar"
|
||||
Then the focused element is "input[value=A]" "css_element" in the "First name" "core_course > initials bar"
|
||||
And I press the tab key
|
||||
And the focused element is "input[value=B]" "css_element" in the "First name" "core_grades > initials bar"
|
||||
And the focused element is "input[value=B]" "css_element" in the "First name" "core_course > initials bar"
|
||||
|
@ -297,8 +297,8 @@ Feature: Within the grader report, test that we can search for users
|
||||
Scenario: Once a teacher searches, it'll apply the currently set filters and inform the teacher as such
|
||||
# Set up a basic filtering case.
|
||||
Given I click on "Filter by name" "combobox"
|
||||
And I select "U" in the "First name" "core_grades > initials bar"
|
||||
And I select "E" in the "Last name" "core_grades > initials bar"
|
||||
And I select "U" in the "First name" "core_course > initials bar"
|
||||
And I select "E" in the "Last name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait until the page is ready
|
||||
And the following should exist in the "user-grades" table:
|
||||
@ -324,8 +324,8 @@ Feature: Within the grader report, test that we can search for users
|
||||
| -1- |
|
||||
| Turtle Manatee |
|
||||
And I click on "Filter by name" "combobox"
|
||||
And I select "T" in the "First name" "core_grades > initials bar"
|
||||
And I select "M" in the "Last name" "core_grades > initials bar"
|
||||
And I select "T" in the "First name" "core_course > initials bar"
|
||||
And I select "M" in the "Last name" "core_course > initials bar"
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- |
|
||||
| Turtle Manatee |
|
||||
|
@ -64,12 +64,14 @@ Feature: Initials bar
|
||||
| student23 | C1 | student |
|
||||
| student24 | C1 | student |
|
||||
|
||||
@javascript
|
||||
Scenario: Filter users on assignment submission page
|
||||
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 am on the "assign1" "Activity" page logged in as "teacher"
|
||||
When I navigate to "Submissions" in current page administration
|
||||
And I click on "Filter by name" "combobox"
|
||||
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"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
@ -77,15 +79,19 @@ Feature: Initials bar
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
And I click on "A" "link" in the ".initialbar.lastinitial .page-item.A" "css_element"
|
||||
And I select "A" in the "Last name" "core_course > initials bar"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I press "Apply"
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "B" "link" in the ".initialbar.firstinitial .page-item.B" "css_element"
|
||||
And I click on "Last (A)" "combobox"
|
||||
And I select "B" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait until the page is ready
|
||||
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"
|
||||
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
@ -102,19 +108,25 @@ 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 click on "All" "link" in the ".initialbar.firstinitial" "css_element"
|
||||
And I click on "First (B) Last (A)" "combobox"
|
||||
And I select "All" in the "First name" "core_course > initials bar"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I press "Apply"
|
||||
And I wait until the page is ready
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "All" "link" in the ".initialbar.lastinitial" "css_element"
|
||||
And I click on "Last (A)" "combobox"
|
||||
And I select "All" in the "Last name" "core_course > initials bar"
|
||||
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"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".page-item.active.A" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And I press "Apply"
|
||||
And I wait until the page is ready
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
@ -135,7 +147,7 @@ Feature: Initials bar
|
||||
And I should see "Astudent Astudent"
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should see "Cstudent Cstudent"
|
||||
And I select "A" in the "Last name" "core_grades > initials bar"
|
||||
And I select "A" in the "Last name" "core_course > initials bar"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
@ -145,7 +157,7 @@ Feature: Initials bar
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "Last (A)" "combobox"
|
||||
And I select "B" in the "First name" "core_grades > initials bar"
|
||||
And I select "B" in the "First name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I wait until the page is ready
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
@ -166,7 +178,7 @@ Feature: Initials bar
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "First (B) Last (A)" "combobox"
|
||||
And I select "All" in the "First name" "core_grades > initials bar"
|
||||
And I select "All" in the "First name" "core_course > initials bar"
|
||||
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
|
||||
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
@ -177,7 +189,7 @@ Feature: Initials bar
|
||||
And I should see "Bstudent Astudent"
|
||||
And I should not see "Cstudent Cstudent"
|
||||
And I click on "Last (A)" "combobox"
|
||||
And I select "All" in the "Last name" "core_grades > initials bar"
|
||||
And I select "All" in the "Last name" "core_course > initials bar"
|
||||
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"
|
||||
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
|
||||
|
@ -47,7 +47,9 @@ Feature: In an assignment, teachers can use table preferences.
|
||||
When I log in as "teacher1"
|
||||
And I am on the "Test assignment" Activity page
|
||||
And I navigate to "Submissions" in current page administration
|
||||
And I click on "T" "link" in the ".lastinitial" "css_element"
|
||||
And I click on "Filter by name" "combobox"
|
||||
And I select "T" in the "Last name" "core_course > initials bar"
|
||||
And I press "Apply"
|
||||
And I change window size to "large"
|
||||
And I click on "Grade actions" "actionmenu" in the "Student Two" "table_row"
|
||||
And I choose "Grade" in the open action menu
|
||||
|
Loading…
x
Reference in New Issue
Block a user