MDL-72698 behat: fix problem with FF, not able to auto-scroll iframes
The "Save changes" button in the SCORM package falls out from the viewport and that seems to be a problem for Firefox, not being able to auto-scroll to it before clicking. So we are just making the window 200 points taller and that makes the button to be visible (within the viewport) and clickable. Also, change the way we "wait" at the end of the scenario and, instead of reloading, we re-visit one of the contents to allow completion to be ready for final assertions.
This commit is contained in:
@@ -44,6 +44,9 @@ Feature: View activity completion in the SCORM activity
|
||||
@javascript
|
||||
Scenario: View automatic completion items as a student
|
||||
Given I am on the "Music history" "scorm activity" page logged in as student1
|
||||
# We need a little taller window because Firefox is, apparently, unable to auto-scroll within
|
||||
# an iframe, so we need to ensure that the "Save changes" button is visible in the viewport.
|
||||
And I change window size to "1366x968"
|
||||
And the "View" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Receive a score of 3 or more" completion condition of "Music history" is displayed as "todo"
|
||||
And the "Do all parts of this activity" completion condition of "Music history" is displayed as "todo"
|
||||
@@ -90,10 +93,12 @@ Feature: View activity completion in the SCORM activity
|
||||
And I wait until "Score: 33" "text" exists
|
||||
And I switch to the main frame
|
||||
# We need to get some time till the last item is marked as done (or it won't be ready in slow databases).
|
||||
# This could be a pause of a few seconds (working ok in super-slow oracle docker database), but forcing a
|
||||
# reload seems to be doing the work too under that very same slow environment.
|
||||
And I reload the page
|
||||
# This could be a pause of a few seconds (working ok in super-slow oracle docker database), but re-visiting
|
||||
# any of the pages seems to be doing the work too under that very same slow environment.
|
||||
And I click on "Par?" "list_item"
|
||||
And I switch to "scorm_object" iframe
|
||||
And I wait until the page is ready
|
||||
And I switch to the main frame
|
||||
When I am on the "Music history" "scorm activity" page
|
||||
Then the "View" completion condition of "Music history" is displayed as "done"
|
||||
# Conditions that are not possible to achieve (eg score below requirement but all attempts used) are marked as failed.
|
||||
|
||||
Reference in New Issue
Block a user