mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-56898 behat: Ensure the page is stable before executing
This commit is contained in:
parent
7f24e5e654
commit
d9a9a87835
@ -146,13 +146,17 @@ class behat_mod_feedback extends behat_base {
|
||||
|
||||
// If chart data is not visible then expand.
|
||||
$node = $this->get_selected_node("xpath_element", $charttabledataxpath);
|
||||
if ($node && !$node->isVisible()) {
|
||||
$this->execute('behat_general::i_click_on_in_the', array(
|
||||
get_string('showchartdata'),
|
||||
'link',
|
||||
$feedbackxpath,
|
||||
'xpath_element'
|
||||
));
|
||||
if ($node) {
|
||||
if (!$node->isVisible()) {
|
||||
// Focus on node, before checking if it's visible.
|
||||
$node->focus();
|
||||
$this->execute('behat_general::i_click_on_in_the', array(
|
||||
get_string('showchartdata'),
|
||||
'link',
|
||||
$feedbackxpath,
|
||||
'xpath_element'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,6 +134,7 @@ Feature: Lesson user override
|
||||
And I set the following fields to these values:
|
||||
| Password protected lesson | Yes |
|
||||
| id_password | moodle_rules |
|
||||
And I wait until the page is ready
|
||||
And I press "Save and display"
|
||||
And I navigate to "User overrides" node in "Lesson administration"
|
||||
And I press "Add user override"
|
||||
|
@ -45,6 +45,7 @@ Feature: Scorm multi-sco completion
|
||||
And I should see "Play of the game"
|
||||
And I switch to the main frame
|
||||
And I follow "Exit activity"
|
||||
And I wait until the page is ready
|
||||
Then I should see "Basic Multi-sco SCORM package"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
@ -80,6 +81,7 @@ Feature: Scorm multi-sco completion
|
||||
And I should see "Play of the game"
|
||||
And I switch to the main frame
|
||||
And I follow "Exit activity"
|
||||
And I wait until the page is ready
|
||||
Then I should see "ADV Multi-sco SCORM package"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user