MDL-56898 behat: Ensure we have button in viewport and page is stable
This commit is contained in:
@@ -15,6 +15,7 @@ Feature: Forms manipulation
|
||||
Then the field "First name" matches value "Field value"
|
||||
And the "Select a country" select box should contain "Japan"
|
||||
And the field "New password" matches value "TestPass"
|
||||
And I take focus off "Update profile" "button"
|
||||
And I press "Update profile"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -61,6 +61,10 @@ class behat_auth extends behat_base {
|
||||
* @Given /^I log out$/
|
||||
*/
|
||||
public function i_log_out() {
|
||||
|
||||
// Wait for page to be loaded.
|
||||
$this->wait_for_pending_js();
|
||||
|
||||
// Click on logout link in footer, as it's much faster.
|
||||
$this->execute('behat_general::i_click_on_in_the', array(get_string('logout'), 'link', '#page-footer', "css_element"));
|
||||
}
|
||||
|
||||
@@ -64,6 +64,9 @@ class behat_enrol extends behat_base {
|
||||
// Set form fields.
|
||||
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $table);
|
||||
|
||||
// Ensure we get button in focus, before pressing button.
|
||||
$this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button"));
|
||||
|
||||
// Save changes.
|
||||
$this->execute("behat_forms::press_button", get_string('addinstance', 'enrol'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user