Skip to content

Commit

Permalink
MDL-56898 behat: Click on logout link in footer, it's faster
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Nov 21, 2016
1 parent 65eb39c commit 7f24e5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 69 deletions.
15 changes: 2 additions & 13 deletions auth/tests/behat/behat_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,7 @@ public function i_log_in_as($username) {
* @Given /^I log out$/
*/
public function i_log_out() {
// There is no longer any need to worry about whether the navigation
// bar needs to be expanded; user_menu now lives outside the
// hamburger.

// However, the user menu *always* needs to be expanded. if running JS.
if ($this->running_javascript()) {
$xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";

$this->execute('behat_general::i_click_on', array($xpath, "xpath_element"));
}

// No need to check for exceptions as it will checked after this step execution.
$this->execute('behat_general::click_link', get_string('logout'));
// 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"));
}
}
56 changes: 0 additions & 56 deletions theme/boost/tests/behat/behat_theme_boost_behat_auth.php

This file was deleted.

0 comments on commit 7f24e5e

Please sign in to comment.