mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-35590 behat: Fixed navigation steps to support aria attributes
This commit is contained in:
parent
f889544657
commit
10ac8baf6e
2 changed files with 32 additions and 31 deletions
|
@ -88,22 +88,10 @@ class behat_completion extends behat_base {
|
|||
* @Given /^I go to the current course activity completion report$/
|
||||
*/
|
||||
public function go_to_the_current_course_activity_completion_report() {
|
||||
$completionnode = get_string('pluginname', 'report_progress');
|
||||
$reportsnode = get_string('courseadministration') . ' > ' . get_string('reports');
|
||||
|
||||
$steps = array();
|
||||
|
||||
// Expand reports node if we can't see the link.
|
||||
try {
|
||||
$this->find('xpath', "//div[@id='settingsnav']" .
|
||||
"/descendant::li" .
|
||||
"/descendant::li[not(contains(concat(' ', normalize-space(@class), ' '), ' collapsed '))]" .
|
||||
"/descendant::p[contains(., '" . get_string('pluginname', 'report_progress') . "')]");
|
||||
} catch (ElementNotFoundException $e) {
|
||||
$steps[] = new Given('I expand "' . get_string('reports') . '" node');
|
||||
}
|
||||
|
||||
$steps[] = new Given('I follow "' . get_string('pluginname', 'report_progress') . '"');
|
||||
|
||||
return $steps;
|
||||
return new Given('I navigate to "' . $completionnode . '" node in "' . $reportsnode . '"');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue