MDL-72089 behat: Need to hover the cards to make the buttons visible
Kudos to Chrome that detected this. The buttons are now not visible until you hover the course card. Hence, we have to do the same with extra behat step, to allow the following click to work.
This commit is contained in:
@@ -130,6 +130,7 @@ 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"
|
||||
@@ -200,6 +201,7 @@ 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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I reload the page
|
||||
@@ -213,6 +215,7 @@ 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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 1')]" "xpath_element"
|
||||
And I reload the page
|
||||
@@ -226,6 +229,7 @@ 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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
@@ -239,6 +243,7 @@ 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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
@@ -256,6 +261,7 @@ 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 archived)" 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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 5')]" "xpath_element"
|
||||
And I reload the page
|
||||
|
||||
@@ -25,6 +25,7 @@ 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
|
||||
@@ -35,6 +36,7 @@ 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 reload the page
|
||||
@@ -48,6 +50,7 @@ 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 reload the page
|
||||
|
||||
@@ -27,6 +27,7 @@ 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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I reload the page
|
||||
@@ -36,8 +37,10 @@ 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 "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 "Archive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
When I reload the page
|
||||
@@ -53,10 +56,12 @@ 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 "Archive" "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 "Archived" "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 "Unarchive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I reload the page
|
||||
@@ -68,13 +73,16 @@ 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 "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 "Archive" "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 "Archived" "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 "Unarchive" "link" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
When I reload the page
|
||||
@@ -90,6 +98,7 @@ 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 "Archive" "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"
|
||||
@@ -102,14 +111,17 @@ 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 "Archive" "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 "Archive" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should see "Unarchive" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I click on "Unarchive" "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 see "Archive" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
And I should not see "Unarchive" in the "//div[@class='card dashboard-card' and contains(.,'Course 2')]" "xpath_element"
|
||||
|
||||
Reference in New Issue
Block a user