Skip to content

Commit

Permalink
MDL-74276 report: Update behat tests to account for new page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Dias committed Apr 1, 2022
1 parent 3eb80e7 commit 2c27a33
Show file tree
Hide file tree
Showing 28 changed files with 51 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature: In a course administration page, navigate through report page, test for
And I click on "Enable" "link"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
Then "Report" "field" should exist
And the "Report" select box should contain "Event monitoring rules"
And the field "Report" matches value "Event monitoring rules"
12 changes: 6 additions & 6 deletions admin/tool/monitor/tests/behat/rule.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: tool_monitor_rule
And I click on "Enable" "link"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule course level |
Expand Down Expand Up @@ -47,7 +47,7 @@ Feature: tool_monitor_rule
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
When I press "Add a new rule"
And I set the following fields to these values:
| name | New rule |
Expand All @@ -68,7 +68,7 @@ Feature: tool_monitor_rule
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete the rule \"New rule course level\"?"
And I press "Continue"
Expand All @@ -79,7 +79,7 @@ Feature: tool_monitor_rule
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
When I click on "Edit rule" "link"
And I set the following fields to these values:
| name | New rule quiz |
Expand All @@ -99,7 +99,7 @@ Feature: tool_monitor_rule
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
When I click on "Duplicate rule" "link" in the "New rule course level" "table_row"
Then I should see "Rule successfully duplicated"
And "#toolmonitorrules_r1" "css_element" should appear before "#toolmonitorrules_r2" "css_element"
Expand Down Expand Up @@ -159,7 +159,7 @@ Feature: tool_monitor_rule
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
When I click on "Duplicate rule" "link" in the "New rule site level" "table_row"
Then I should see "Rule successfully duplicated"
And "#toolmonitorrules_r2" "css_element" should appear after "#toolmonitorrules_r1" "css_element"
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/monitor/tests/behat/subscription.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: tool_monitor_subscriptions
And I click on "Enable" "link"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Event monitoring rules" from the "Report type" singleselect
And I click on "Event monitoring rules" "link"
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule course level |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: Enable Block Completion in a course using manual completion by others
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Course completion" from the "Report type" singleselect
And I click on "Course completion" "link" in the "region-main" "region"
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
Expand Down Expand Up @@ -73,7 +73,7 @@ Feature: Enable Block Completion in a course using manual completion by others
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Course completion" from the "Report type" singleselect
And I click on "Course completion" "link" in the "region-main" "region"
And I follow "Click to mark user complete"
And I log out
And I log in as "student1"
Expand All @@ -88,7 +88,7 @@ Feature: Enable Block Completion in a course using manual completion by others
And I log in as "teacher2"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Course completion" from the "Report type" singleselect
And I click on "Course completion" "link" in the "region-main" "region"
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
Expand Down
2 changes: 1 addition & 1 deletion completion/tests/behat/behat_completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function go_to_the_current_course_activity_completion_report() {

$this->execute("behat_navigation::i_navigate_to_in_current_page_administration",
$reportsnode);
$this->execute("behat_forms::i_select_from_the_singleselect", [$completionnode, "Report type"]);
$this->execute("behat_general::i_click_on_in_the", [$completionnode, "link", "region-main", "region"]);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/tests/behat/alpha_chooser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Feature: Initials bar
And I log out
And I am on the "C1" "Course" page logged in as "teacher"
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
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"
Expand All @@ -277,7 +277,7 @@ Feature: Initials bar
And I should not see "Cstudent Cstudent"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Feature: Automatic completion in the choice activity
Scenario: Overriding automatic choice completion for a user
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And I click on "Student 1, What to drink?: Not completed" "link"
And I press "Save changes"
And I log out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Feature: Manual completion in the choice activity
Scenario: Overriding a manual choice completion for a user to done
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And I click on "Student 1, What to drink?: Not completed" "link"
And I press "Save changes"
And I log out
Expand All @@ -71,7 +71,7 @@ Feature: Manual completion in the choice activity
And I log out
And I am on the "Course 1" course page logged in as teacher1
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And I click on "Student 1, What to drink?: Completed" "link"
And I press "Save changes"
And I log out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
And "Test quiz name" should have the "Receive a pass grade or complete all available attempts" completion condition
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And "<expectedactivitycompletion>" "icon" should exist in the "Student 1" "table_row"

Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ Feature: Set a quiz to be marked complete when the student completes a minimum a
And "Test quiz name" should have the "Make attempts: 2" completion condition
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And "Completed" "icon" should exist in the "Student 1" "table_row"
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ Feature: Set a quiz to be marked complete when the student passes
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And "Completed" "icon" should exist in the "Student 1" "table_row"
2 changes: 1 addition & 1 deletion mod/quiz/tests/behat/quiz_activity_completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Feature: View activity completion in the quiz activity
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity completion" from the "Report type" singleselect
And I click on "Activity completion" "link"
And "<expectedactivitycompletion>" "icon" should exist in the "Student 1" "table_row"

Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Feature: See the competencies for an activity
@javascript
Scenario: Go to the competency breakdown report
When I navigate to "Reports" in current page administration
And I select "Competency breakdown" from the "Report type" singleselect
And I click on "Competency breakdown" "link"
And I set the field "Filter competencies by resource or activity" to "PageName1"
Then I should see "Test-Comp1"
And I should not see "Test-Comp2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: In a course administration page, navigate through report page, test for
Given I log in as "admin"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Competency breakdown" from the "Report type" singleselect
And I click on "Competency breakdown" "link"
Then "Report" "field" should exist
And the "Report" select box should contain "Competency breakdown"
And the field "Report" matches value "Competency breakdown"
2 changes: 1 addition & 1 deletion report/completion/tests/behat/completion_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Feature: See the completion for items in a course
And I press "Save changes"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Course completion" from the "Report type" singleselect
And I click on "Course completion" "link" in the "region-main" "region"
Then I should see "Ann, Jill, Grainne, Beauchamp"
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: In a course administration page, navigate through report page, test for
And I press "Save changes"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Course completion" from the "Report type" singleselect
And I click on "Course completion" "link" in the "region-main" "region"
Then "Report" "field" should exist
And the "Report" select box should contain "Course completion"
And the field "Report" matches value "Course completion"
2 changes: 1 addition & 1 deletion report/log/tests/behat/course_report_log.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: In a course administration page, navigate through report page, test for
Given I log in as "admin"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Logs" from the "Report type" singleselect
And I click on "Logs" "link"
Then "Report" "field" should exist
And the "Report" select box should contain "Logs"
And the field "Report" matches value "Logs"
2 changes: 1 addition & 1 deletion report/log/tests/behat/user_log.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Feature: User can view activity log.
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Logs" from the "Report type" singleselect
And I click on "Logs" "link"
And I set the field with xpath "//select[@name='user']" to "Ann, Jill, Grainne, Beauchamp"
When I click on "Get these logs" "button"
Then I should see "Ann, Jill, Grainne, Beauchamp"
2 changes: 1 addition & 1 deletion report/loglive/tests/behat/course_report_loglive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: In a course administration page, navigate through report page, test for
Given I log in as "admin"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Live logs" from the "Report type" singleselect
And I click on "Live logs" "link"
Then "Report" "field" should exist
And the "Report" select box should contain "Live logs"
And the field "Report" matches value "Live logs"
2 changes: 1 addition & 1 deletion report/outline/tests/behat/course_report_outline.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: In a course administration page, navigate through report page, test for
Given I log in as "admin"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then "Report" "field" should exist
And the "Report" select box should contain "Activity report"
And the field "Report" matches value "Activity report"
4 changes: 2 additions & 2 deletions report/outline/tests/behat/filter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Feature: Filter an outline report
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
And I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"
When I set the following fields to these values:
Expand Down Expand Up @@ -79,7 +79,7 @@ Feature: Filter an outline report
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
And I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"
When I set the following fields to these values:
Expand Down
14 changes: 7 additions & 7 deletions report/outline/tests/behat/outline.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: View an outline report
And I log in as "teacher1"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"

Expand All @@ -67,7 +67,7 @@ Feature: View an outline report
And I log in as "admin"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"

Expand All @@ -91,7 +91,7 @@ Feature: View an outline report
And I log in as "teacher1"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "2 views by 2 users" in the "Book name" "table_row"
And I should see "1 views by 1 users" in the "Forum name" "table_row"

Expand All @@ -101,7 +101,7 @@ Feature: View an outline report
And I click on "Disable" "link" in the "Standard log" "table_row"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "No log reader enabled"

Scenario: Multiple views from a single user are identified as not distinct
Expand All @@ -118,7 +118,7 @@ Feature: View an outline report
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "3 views by 1 users" in the "Forum name" "table_row"
And I should see "-" in the "Book name" "table_row"

Expand All @@ -145,7 +145,7 @@ Feature: View an outline report
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "6 views by 2 users" in the "Forum name" "table_row"
And I should see "-" in the "Book name" "table_row"

Expand All @@ -154,6 +154,6 @@ Feature: View an outline report
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Reports" in current page administration
And I select "Activity report" from the "Report type" singleselect
And I click on "Activity report" "link"
Then I should see "-" in the "Forum name" "table_row"
And I should see "-" in the "Book name" "table_row"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: In a course administration page, navigate through report page, test for
Given I log in as "admin"
And I am on "Course 1" course homepage
When I navigate to "Reports" in current page administration
And I select "Course participation" from the "Report type" singleselect
And I click on "Course participation" "link"
Then "Report" "field" should exist
And the "Report" select box should contain "Course participation"
And the field "Report" matches value "Course participation"
Loading

0 comments on commit 2c27a33

Please sign in to comment.