MDL-78806 behat: More lenient checking of page title

Instead of doing an exact checking of the page title in
\behat_hooks::before_step(), do a more lenient check by checking that
the page title contains the acceptance test's site name.
This commit is contained in:
Jun Pataleta
2023-09-09 21:28:53 +08:00
parent 89e853437b
commit 94efef85bb
+1 -1
View File
@@ -520,7 +520,7 @@ EOF;
'or that your web server is correctly set up and started.';
$this->find(
"xpath", "//head/child::title[normalize-space(.)='" . behat_util::BEHATSITENAME . "']",
"xpath", "//head/child::title[contains(., '" . behat_util::BEHATSITENAME . "')]",
new ExpectationException($message, $session)
);