mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'wip-mdl-57494' of https://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
0e5205d36c
4 changed files with 4 additions and 26 deletions
|
@ -386,28 +386,6 @@ class behat_hooks extends behat_base {
|
|||
$this->resize_window('medium');
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed after scenario to go to a page where no JS is executed.
|
||||
* This will ensure there are no unwanted ajax calls from browser and
|
||||
* site can be reset safely.
|
||||
*
|
||||
* @param AfterScenarioScope $scope scope passed by event fired after scenario.
|
||||
* @AfterScenario
|
||||
*/
|
||||
public function after_scenario(AfterScenarioScope $scope) {
|
||||
try {
|
||||
$this->wait_for_pending_js();
|
||||
$this->getSession()->reset();
|
||||
} catch (DriverException $e) {
|
||||
// Try restart session, if DriverException caught.
|
||||
try {
|
||||
$this->getSession()->restart();
|
||||
} catch (DriverException $e) {
|
||||
// Do nothing, as this will be caught while starting session in before_scenario.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for JS to complete before beginning interacting with the DOM.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue