mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-57019 behat: make tab navigation compatible with boost
This commit is contained in:
parent
68dde67d9f
commit
86ac6a3763
@ -274,7 +274,7 @@ class behat_grade extends behat_base {
|
|||||||
|
|
||||||
// If the first row of the grade-navigation tabs does not have $gradepath[0] as active tab, click on it.
|
// If the first row of the grade-navigation tabs does not have $gradepath[0] as active tab, click on it.
|
||||||
$link = '\'' . $this->escape($gradepath[0]) . '\'';
|
$link = '\'' . $this->escape($gradepath[0]) . '\'';
|
||||||
$xpathrow1 = $xpath.'//ul[1]/li[contains(@class,\'active\') and .=' . $link . ']';
|
$xpathrow1 = $xpath . '//ul[1]//.[contains(@class,\'active\') and .=' . $link . ']';
|
||||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow1)) {
|
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow1)) {
|
||||||
$this->find('xpath', $xpath . '//ul[1]/li/a[.=' . $link . ']')->click();
|
$this->find('xpath', $xpath . '//ul[1]/li/a[.=' . $link . ']')->click();
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ class behat_grade extends behat_base {
|
|||||||
if (isset($gradepath[1])) {
|
if (isset($gradepath[1])) {
|
||||||
// If the second row of the grade-navigation tabs does not have $gradepath[1] as active tab, click on it.
|
// If the second row of the grade-navigation tabs does not have $gradepath[1] as active tab, click on it.
|
||||||
$link = '\'' . $this->escape($gradepath[1]) . '\'';
|
$link = '\'' . $this->escape($gradepath[1]) . '\'';
|
||||||
$xpathrow2 = $xpath . '//ul[2]/li[contains(@class,\'active\') and .=' . $link . ']';
|
$xpathrow2 = $xpath . '//ul[2]//.[contains(@class,\'active\') and .=' . $link . ']';
|
||||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow2)) {
|
if (!$this->getSession()->getPage()->findAll('xpath', $xpathrow2)) {
|
||||||
$this->find('xpath', $xpath . '//ul[2]/li/a[.=' . $link . ']')->click();
|
$this->find('xpath', $xpath . '//ul[2]/li/a[.=' . $link . ']')->click();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user