diff --git a/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature b/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature index b4b495250d0..11a13950cd2 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature @@ -130,7 +130,6 @@ Feature: The my overview block allows users to easily access their courses Scenario: View favourite courses - w/ persistence Given I am on the "My courses" page logged in as "student1" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "All" "button" in the "Course overview" "block" @@ -201,7 +200,6 @@ Feature: The my overview block allows users to easily access their courses Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" When I click on "In progress" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" 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" And I reload the page @@ -215,7 +213,6 @@ Feature: The my overview block allows users to easily access their courses Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" When I click on "Past" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element" And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element" And I reload the page @@ -229,7 +226,6 @@ Feature: The my overview block allows users to easily access their courses Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" When I click on "Future" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I reload the page @@ -243,7 +239,6 @@ Feature: The my overview block allows users to easily access their courses Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" When I click on "All" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I reload the page @@ -261,7 +256,6 @@ Feature: The my overview block allows users to easily access their courses And I click on "All" "button" in the "Course overview" "block" # We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (including removed from view)" element instead When I click on "[data-value='allincludinghidden']" "css_element" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Remove from view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I reload the page diff --git a/blocks/myoverview/tests/behat/block_myoverview_favourite.feature b/blocks/myoverview/tests/behat/block_myoverview_favourite.feature index 880a50d1a40..0d318f2e773 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_favourite.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_favourite.feature @@ -25,7 +25,6 @@ Feature: The my overview block allows users to favourite their courses Scenario: Favourite a course on a course card Given I am on the "My courses" page logged in as "student1" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I reload the page @@ -36,7 +35,6 @@ Feature: The my overview block allows users to favourite their courses Scenario: Star a course and switch display to list Given I am on the "My courses" page logged in as "student1" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Display drop-down menu" "button" in the "Course overview" "block" @@ -48,7 +46,6 @@ Feature: The my overview block allows users to favourite their courses Scenario: Star a course and switch display to summary Given I am on the "My courses" page logged in as "student1" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element" And I click on "Display drop-down menu" "button" in the "Course overview" "block" diff --git a/blocks/myoverview/tests/behat/block_myoverview_hidden.feature b/blocks/myoverview/tests/behat/block_myoverview_hidden.feature index c0bb19069a6..ac6ead53c10 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_hidden.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_hidden.feature @@ -27,7 +27,6 @@ Feature: The my overview block allows users to hide their courses Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" When I click on "All" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" 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" And I reload the page @@ -36,33 +35,29 @@ Feature: The my overview block allows users to hide their courses Scenario: Test hide toggle functionality w/ favorites Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" - When I click on "All" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" + And I click on "All" "link" in the "Course overview" "block" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" 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" When I reload the page - Then I should not see "Course 2" in the "Course overview" "block" + And I should not see "Course 2" in the "Course overview" "block" And I click on "All" "button" in the "Course overview" "block" And I click on "Starred" "link" in the "Course overview" "block" Then I should not see "Course 2" in the "Course overview" "block" 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 should see "Course 2" in the "Course overview" "block" Scenario: Test show toggle functionality Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" - When I click on "All" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" + And I click on "All" "link" in the "Course overview" "block" 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" - When I click on "All" "button" in the "Course overview" "block" + And I click on "All" "button" in the "Course overview" "block" And I click on "Removed from view" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" - When I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" + And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Restore to view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I reload the page And I click on "Removed from view" "button" in the "Course overview" "block" @@ -72,33 +67,29 @@ Feature: The my overview block allows users to hide their courses Scenario: Test show toggle functionality w/ favorites Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" - When I click on "All" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" + And I click on "All" "link" in the "Course overview" "block" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Star this course" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" 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" And I click on "All" "button" in the "Course overview" "block" And I click on "Removed from view" "link" in the "Course overview" "block" And I should see "Course 2" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Restore to view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" When I reload the page Then I should not see "Course 2" in the "Course overview" "block" And I click on "Removed from view" "button" in the "Course overview" "block" And I click on "All" "link" in the "Course overview" "block" - Then I should see "Course 2" in the "Course overview" "block" + And I should see "Course 2" in the "Course overview" "block" And I click on "All" "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 should see "Course 2" in the "Course overview" "block" Scenario: Test a course is hidden directly with "All" courses Given I am on the "My courses" page logged in as "student1" And I click on "All" "button" in the "Course overview" "block" When I click on "All" "link" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" 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" @@ -111,17 +102,14 @@ Feature: The my overview block allows users to hide their courses And I click on "All" "button" in the "Course overview" "block" # We have to click on the data attribute instead of the button element text as we might risk to click on the false positive "All (except hidden)" element instead When I click on "[data-value='allincludinghidden']" "css_element" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" 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 see "Course 2" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on ".coursemenubtn" "css_element" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I should not see "Remove from view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I should see "Restore to view" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" And I click on "Restore to view" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" - Then I should see "Course 2" in the "Course overview" "block" - And I hover "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element" + And I should see "Course 2" in the "Course overview" "block" 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"