mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 00:20:37 +01:00
MDL-66559 behat: Register component selectors earlier
This commit is contained in:
parent
cd5382b298
commit
e99a3cca93
@ -343,6 +343,12 @@ class behat_hooks extends behat_base {
|
||||
|
||||
$this->getSession()->getSelectorsHandler()->registerSelector('named_partial', new $namedpartialclass());
|
||||
$this->getSession()->getSelectorsHandler()->registerSelector('named_exact', new $namedexactclass());
|
||||
|
||||
// Register component named selectors.
|
||||
foreach (\core_component::get_component_names() as $component) {
|
||||
$this->register_component_selectors_for_component($component);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Reset mink session between the scenarios.
|
||||
@ -709,18 +715,6 @@ class behat_hooks extends behat_base {
|
||||
return !(self::$initprocessesfinished);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register component selectors.
|
||||
*
|
||||
* @param BeforeScenarioScope $scope scope passed by event fired before scenario.
|
||||
* @BeforeScenario
|
||||
*/
|
||||
public function register_component_selectors(BeforeScenarioScope $scope) {
|
||||
foreach (\core_component::get_component_names() as $component) {
|
||||
$this->register_component_selectors_for_component($component);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a set of component selectors.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user