Skip to content

Commit

Permalink
MDL-78806 behat: More lenient checking of page title
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
junpataleta committed Sep 9, 2023
1 parent 89e8534 commit 94efef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tests/behat/behat_hooks.php
Expand Up @@ -520,7 +520,7 @@ public function before_step(BeforeStepScope $scope) {
'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)
);

Expand Down

0 comments on commit 94efef8

Please sign in to comment.