mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Merge branch 'wip-mdl-50163' of https://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
14248189b7
4 changed files with 25 additions and 50 deletions
|
@ -256,7 +256,7 @@ class behat_hooks extends behat_base {
|
|||
// We need the Mink session to do it and we do it only before the first scenario.
|
||||
if (self::is_first_scenario()) {
|
||||
behat_selectors::register_moodle_selectors($session);
|
||||
behat_context_helper::set_session($session);
|
||||
behat_context_helper::set_main_context($event->getContext()->getMainContext());
|
||||
}
|
||||
|
||||
// Reset mink session between the scenarios.
|
||||
|
@ -384,6 +384,18 @@ class behat_hooks extends behat_base {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed after scenario having switch window to restart session.
|
||||
* This is needed to close all extra browser windows and starting
|
||||
* one browser window.
|
||||
*
|
||||
* @param ScenarioEvent $event event fired after scenario.
|
||||
* @AfterScenario @_switch_window
|
||||
*/
|
||||
public function after_scenario_switchwindow(ScenarioEvent $event) {
|
||||
$this->getSession()->restart();
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for self::$faildumpdirname
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue