Skip to content

Commit

Permalink
MDL-64094 dashboard: Remove unnecesary behat steps
Browse files Browse the repository at this point in the history
We do not need to explicitly log out at the end of a behat test, the
browser session is killed automatically during the scenario teardown.
  • Loading branch information
NeillM committed Sep 6, 2019
1 parent 74d7ab5 commit d2262ec
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Feature: The my overview block allows admins to easily configure the students' c
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
# We have to check for the data attribute instead of the list element text as we would get false positives from the "All (except removed from view)" element otherwise
Then "[data-value='allincludinghidden']" "css_element" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'All' course filter option
Given I log in as "admin"
Expand All @@ -48,7 +47,6 @@ Feature: The my overview block allows admins to easily configure the students' c
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
# We have to check for the data attribute instead of the list element text as we would get false negatives "All (except removed from view)" element otherwise
Then "[data-value='allincludinghidden']" "css_element" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Enable 'All (except removed from view)' course filter option
Given I log in as "admin"
Expand All @@ -59,7 +57,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "All (except removed from view)" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'All (except removed from view)' course filter option
Given I log in as "admin"
Expand All @@ -71,7 +68,6 @@ Feature: The my overview block allows admins to easily configure the students' c
# 'All (except removed from view)' option has been disabled, so the button is falling back to the 'In progress' option which is the next enabled option.
And I click on "In progress" "button" in the "Course overview" "block"
Then "All (except removed from view)" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Enable 'In progress' course filter option
Given I log in as "admin"
Expand All @@ -82,7 +78,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "In progress" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'In progress' course filter option
Given I log in as "admin"
Expand All @@ -93,7 +88,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "In progress" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Enable 'Future' course filter option
Given I log in as "admin"
Expand All @@ -104,7 +98,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Future" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'Future' course filter option
Given I log in as "admin"
Expand All @@ -115,7 +108,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Future" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Enable 'Past' course filter option
Given I log in as "admin"
Expand All @@ -126,7 +118,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Past" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'Past' course filter option
Given I log in as "admin"
Expand All @@ -137,7 +128,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Past" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Enable 'Starred' course filter option
Given I log in as "admin"
Expand All @@ -148,7 +138,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Starred" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'Starred' course filter option
Given I log in as "admin"
Expand All @@ -159,7 +148,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Starred" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Enable 'Removed courses' course filter option
Given I log in as "admin"
Expand All @@ -170,7 +158,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Removed from view" "list_item" should exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable 'Removed courses' course filter option
Given I log in as "admin"
Expand All @@ -181,7 +168,6 @@ Feature: The my overview block allows admins to easily configure the students' c
Then I log in as "student1"
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
Then "Removed from view" "list_item" should not exist in the ".block_myoverview .dropdown-menu" "css_element"
And I log out

Scenario: Disable all course filter options
Given I log in as "admin"
Expand All @@ -202,7 +188,6 @@ Feature: The my overview block allows admins to easily configure the students' c
And I should see "Course 3" in the "Course overview" "block"
And I should see "Course 4" in the "Course overview" "block"
And I should see "Course 5" in the "Course overview" "block"
And I log out

Scenario: Disable all but one course filter option
Given I log in as "admin"
Expand All @@ -223,4 +208,3 @@ Feature: The my overview block allows admins to easily configure the students' c
And I should see "Course 4" in the "Course overview" "block"
And I should not see "Course 1" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out
14 changes: 0 additions & 14 deletions blocks/myoverview/tests/behat/block_myoverview_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View future courses
Given I log in as "student1"
Expand All @@ -46,7 +45,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 2" in the "Course overview" "block"
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I log out

Scenario: View inprogress courses
Given I log in as "student1"
Expand All @@ -57,7 +55,6 @@ Feature: The my overview block allows users to easily access their courses
Then I should see "Course 4" in the "Course overview" "block"
And I should not see "Course 1" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View all (except removed) courses
Given I log in as "student1"
Expand All @@ -68,7 +65,6 @@ Feature: The my overview block allows users to easily access their courses
Then I should see "Course 3" in the "Course overview" "block"
Then I should see "Course 4" in the "Course overview" "block"
Then I should see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View all (including removed) courses
Given the following config values are set as admin:
Expand All @@ -83,7 +79,6 @@ Feature: The my overview block allows users to easily access their courses
Then I should see "Course 3" in the "Course overview" "block"
Then I should see "Course 4" in the "Course overview" "block"
Then I should see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View inprogress courses - test persistence
Given I log in as "student1"
Expand All @@ -96,7 +91,6 @@ Feature: The my overview block allows users to easily access their courses
Then I should see "Course 4" in the "Course overview" "block"
And I should not see "Course 1" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View all (except removed) courses - w/ persistence
Given I log in as "student1"
Expand All @@ -109,7 +103,6 @@ Feature: The my overview block allows users to easily access their courses
Then I should see "Course 3" in the "Course overview" "block"
Then I should see "Course 4" in the "Course overview" "block"
Then I should see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View past courses - w/ persistence
Given I log in as "student1"
Expand All @@ -122,7 +115,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View future courses - w/ persistence
Given I log in as "student1"
Expand All @@ -135,7 +127,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 2" in the "Course overview" "block"
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I log out

Scenario: List display persistence
Given I log in as "student1"
Expand Down Expand Up @@ -189,7 +180,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 2" in the "Course overview" "block"
And I should not see "Course 1" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View past courses with hide persistent functionality
Given I log in as "student1"
Expand All @@ -203,7 +193,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I should not see "Course 5" in the "Course overview" "block"
And I log out

Scenario: View future courses with hide persistent functionality
Given I log in as "student1"
Expand All @@ -217,7 +206,6 @@ Feature: The my overview block allows users to easily access their courses
And I should not see "Course 2" in the "Course overview" "block"
And I should not see "Course 3" in the "Course overview" "block"
And I should not see "Course 4" in the "Course overview" "block"
And I log out

Scenario: View all (except hidden) courses with hide persistent functionality
Given I log in as "student1"
Expand All @@ -231,7 +219,6 @@ Feature: The my overview block allows users to easily access their courses
And I should see "Course 2" in the "Course overview" "block"
And I should see "Course 3" in the "Course overview" "block"
And I should see "Course 4" in the "Course overview" "block"
And I log out

Scenario: View all (including removed) courses with hide persistent functionality
Given the following config values are set as admin:
Expand All @@ -249,7 +236,6 @@ Feature: The my overview block allows users to easily access their courses
And I should see "Course 2" in the "Course overview" "block"
And I should see "Course 3" in the "Course overview" "block"
And I should see "Course 4" in the "Course overview" "block"
And I log out

Scenario: Show course category in cards display
Given I log in as "student1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Feature: The my overview block allows users to favourite their courses
And "//div[@class='card dashboard-card' and contains(.,'Course 2')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should not exist
And "//div[@class='card dashboard-card' and contains(.,'Course 1')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
And "//div[@class='card dashboard-card' and contains(.,'Course 3')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
And I log out

Scenario: Star a course and switch display to list
Given I log in as "student1"
Expand All @@ -46,7 +45,6 @@ Feature: The my overview block allows users to favourite their courses
And "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should not exist
And "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 1')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
And "//li[contains(concat(' ', normalize-space(@class), ' '), 'list-group-item') and contains(.,'Course 3')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
And I log out

Scenario: Star a course and switch display to summary
Given I log in as "student1"
Expand All @@ -60,4 +58,3 @@ Feature: The my overview block allows users to favourite their courses
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 5')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should not exist
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 1')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'course-summaryitem') and contains(.,'Course 3')]//span[@data-region='is-favourite' and @aria-hidden='true']" "xpath_element" should exist
And I log out
6 changes: 0 additions & 6 deletions blocks/myoverview/tests/behat/block_myoverview_hidden.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Feature: The my overview block allows users to hide their courses
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
And I reload the page
Then I should not see "Course 2" in the "Course overview" "block"
And I log out

Scenario: Test hide toggle functionality w/ favorites
Given I log in as "student1"
Expand All @@ -49,7 +48,6 @@ Feature: The my overview block allows users to hide their courses
And I click on "Starred" "button" in the "Course overview" "block"
And I click on "Removed from view" "link" in the "Course overview" "block"
Then I should see "Course 2" in the "Course overview" "block"
And I log out

Scenario: Test show toggle functionality
Given I log in as "student1"
Expand All @@ -65,7 +63,6 @@ Feature: The my overview block allows users to hide their courses
And I click on "Removed from view" "button" in the "Course overview" "block"
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
Then I should see "Course 2" in the "Course overview" "block"
And I log out

Scenario: Test show toggle functionality w/ favorites
Given I log in as "student1"
Expand All @@ -88,7 +85,6 @@ Feature: The my overview block allows users to hide their courses
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
And I click on "Starred" "link" in the "Course overview" "block"
Then I should see "Course 2" in the "Course overview" "block"
And I log out

Scenario: Test a course is hidden directly with "All (except removed from view)" courses
Given I log in as "student1"
Expand All @@ -97,7 +93,6 @@ Feature: The my overview block allows users to hide their courses
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
Then I should not see "Course 2" in the "Course overview" "block"
And I log out

Scenario: Test a course is never hidden with "All (including removed)" courses
Given the following config values are set as admin:
Expand All @@ -118,4 +113,3 @@ Feature: The my overview block allows users to hide their courses
And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
And I should see "Remove from view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
And I should not see "Restore to view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
And I log out
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Feature: The my overview block allows users to persistence of their page limits
And I reload the page
Then I should see "Course 13"
And I should see "All" in the "[data-action='limit-toggle']" "css_element"
And I log out

Scenario: Toggle the page limit between grouping changes
Given I log in as "student1"
Expand All @@ -54,4 +53,3 @@ Feature: The my overview block allows users to persistence of their page limits
And I click on "In progress" "link" in the "Course overview" "block"
Then I should see "Course 13"
And I should see "All" in the "[data-action='limit-toggle']" "css_element"
And I log out
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Feature: Course overview block show users their progress on courses
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
When I click on "All (except removed from view)" "link" in the "Course overview" "block"
Then I should not see "0%" in the "Course overview" "block"
And I log out

Scenario: User complete activity and verify his progress
Given I log in as "teacher1"
Expand All @@ -46,4 +45,3 @@ Feature: Course overview block show users their progress on courses
And I follow "Dashboard" in the user menu
And I click on "All (except removed from view)" "button" in the "Course overview" "block"
And I should see "100%" in the "Course overview" "block"
And I log out

0 comments on commit d2262ec

Please sign in to comment.