MDL-52427 behat: Fixed question selectors
As class is changed, we need to convert selector to check if class is contained, rather then checking selecting with specific class.
This commit is contained in:
committed by
David Monllao
parent
ea78dbdf50
commit
6fccd1fe35
@@ -118,7 +118,7 @@ XPATH
|
||||
XPATH
|
||||
, 'question' => <<<XPATH
|
||||
.//div[contains(concat(' ', normalize-space(@class), ' '), ' que ')]
|
||||
[contains(div[@class='content']/div[@class='formulation'], %locator%)]
|
||||
[contains(div[@class='content']/div[contains(concat(' ', normalize-space(@class), ' '), ' formulation ')], %locator%)]
|
||||
XPATH
|
||||
, 'region' => <<<XPATH
|
||||
.//*[self::div | self::section | self::aside | self::header | self::footer][./@id = %locator%]
|
||||
|
||||
@@ -76,7 +76,8 @@ class behat_question extends behat_question_base {
|
||||
// Split in two checkings to give more feedback in case of exception.
|
||||
$exception = new ElementNotFoundException($this->getSession(), 'Question "' . $questiondescription . '" ');
|
||||
$questionxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' que ')]" .
|
||||
"[contains(div[@class='content']/div[@class='formulation'], {$questiondescriptionliteral})]";
|
||||
"[contains(div[@class='content']/div[contains(concat(' ', normalize-space(@class), ' '), ' formulation ')]," .
|
||||
"{$questiondescriptionliteral})]";
|
||||
$this->find('xpath', $questionxpath, $exception);
|
||||
|
||||
$exception = new ExpectationException('Question "' . $questiondescription . '" state is not "' . $state . '"', $this->getSession());
|
||||
|
||||
Reference in New Issue
Block a user