Changes in BEHAT in Moodle 3.2 (important! your existing tests will most likely start failing on Boost)

Re: Changes in BEHAT in Moodle 3.2 (important! your existing tests will most likely start failing on Boost)

par Mike Churchward,
Nombre de réponses : 1
Avatar Core developers Avatar Plugin developers Avatar Testers

Will the new steps, such as:

And I navigate to "Edit settings" in current page administration

also work with Clean?

Moyenne des évaluations Useful (2)
En réponse à Mike Churchward

Re: Changes in BEHAT in Moodle 3.2 (important! your existing tests will most likely start failing on Boost)

par Marina Glancy,
Avatar Core developers Avatar Moodle HQ Avatar Moodle Workplace team Avatar Peer reviewers Avatar Plugin developers Avatar Testers
Absolutely, on both 3.1 and 3.2

In case of non-boost theme this is what we do:
We find the first category in the Administration block (for example "Forum administraion"), get it's name and then execute step
I navigate to "Edit settings" node in "Forum administration"

This is the code:

public function i_navigate_to_in_current_page_administration($nodetext) {
$parentnodes = array_map('trim', explode('>', $nodetext));
// Find the name of the first category of the administration block tree.
$xpath = '//div[contains(@class,\'block_settings\')]//div[@id=\'settingsnav\']/ul/li[1]/p[1]/span';
$node = $this->find('xpath', $xpath);
// Add the name of the first category of the administration block tree to the path.
array_unshift($parentnodes, $node->getText());
$lastnode = array_pop($parentnodes);
// Execute the step "I navigate to ... node in the ...".
$this->select_node_in_navigation($lastnode, $parentnodes);
}




Annexe administrationblock.png
Moyenne des évaluations Useful (2)