MDL-71157 block_myoverview: remove wait from behat
authorSara Arjona <sara@moodle.com>
Fri, 14 May 2021 13:57:54 +0000 (15:57 +0200)
committerSara Arjona <sara@moodle.com>
Wed, 19 May 2021 07:43:04 +0000 (09:43 +0200)
The step "And I wait until ".block_myoverview
[data-control='next']" "css_element" exists" is not correct
because this [data-control='next'] element exists before and
after the step so, in some cases, it might cause the following
step will start earlier than expected.
As pending JS has been added, this wait steps are not required
any more.

blocks/myoverview/tests/behat/block_myoverview_pagination.feature

index 9792252..b3a6b51 100644 (file)
@@ -147,7 +147,6 @@ Feature: My overview block pagination
       | student1 | C13 | student |
     When I log in as "student1"
     And I click on "[data-control='next']" "css_element" in the "Course overview" "block"
-    And I wait until ".block_myoverview [data-control='next']" "css_element" exists
     Then the "class" attribute of ".block_myoverview [data-control='next']" "css_element" should contain "disabled"
     And I log out
 
@@ -181,7 +180,6 @@ Feature: My overview block pagination
       | student1 | C25 | student |
     When I log in as "student1"
     And I click on "[data-control='next']" "css_element" in the "Course overview" "block"
-    And I wait until ".block_myoverview [data-control='next']" "css_element" exists
     Then the "class" attribute of ".block_myoverview [data-control='next']" "css_element" should not contain "disabled"
     And the "class" attribute of ".block_myoverview [data-control='previous']" "css_element" should not contain "disabled"
     And I should see "Course 13" in the "Course overview" "block"