mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 23:20:09 +01:00
MDL-55766 behat: set core behat selectors if not overridden by theme
This commit is contained in:
parent
35d5053ba2
commit
31c8fd3e83
@ -311,12 +311,16 @@ class behat_hooks extends behat_base {
|
||||
// We need the Mink session to do it and we do it only before the first scenario.
|
||||
$behatselectorclass = 'behat_selectors';
|
||||
if ($suitename !== 'default') {
|
||||
$behatselectorclass = behat_config_util::get_behat_theme_selector_override_classname($suitename, true);
|
||||
}
|
||||
if (class_exists($behatselectorclass)) {
|
||||
$behatselectorclass = new $behatselectorclass();
|
||||
$behatselectorclass::register_moodle_selectors($session);
|
||||
$overriddenselectorclass = behat_config_util::get_behat_theme_selector_override_classname($suitename, true);
|
||||
|
||||
// If override slector exist, then set it as default behat selectors class.
|
||||
if (class_exists($overriddenselectorclass)) {
|
||||
$behatselectorclass = $overriddenselectorclass;
|
||||
}
|
||||
}
|
||||
|
||||
$behatselectorclass = new $behatselectorclass();
|
||||
$behatselectorclass::register_moodle_selectors($session);
|
||||
}
|
||||
|
||||
// Reset mink session between the scenarios.
|
||||
|
Loading…
x
Reference in New Issue
Block a user