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)

by Mike Churchward -
Number of replies: 1
Picture of Core developers Picture of Plugin developers Picture of Testers

Will the new steps, such as:

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

also work with Clean?

Average of ratings: Useful (2)
In reply to Mike Churchward

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

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of 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);
}




Attachment administrationblock.png
Average of ratings: Useful (2)