Merge branch 'MDL-82232-500' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE

This commit is contained in:
Huong Nguyen
2025-12-04 09:13:09 +07:00
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ $string['accesskey'] = 'Access key, {$a}';
$string['accessstatement'] = 'Accessibility statement';
$string['activitynext'] = 'Next activity';
$string['activityprev'] = 'Previous activity';
$string['breadcrumb'] = 'Navigation bar';
$string['breadcrumb'] = 'Breadcrumb';
$string['eventcontextlocked'] = 'Context frozen';
$string['eventcontextunlocked'] = 'Context unfrozen';
$string['hideblocka'] = 'Hide {$a} block';
+2 -1
View File
@@ -1395,9 +1395,10 @@ class behat_navigation extends behat_base {
* @Given /^I follow the breadcrumb "(?P<url_string>(?:[^"]|\\")*)"$/
*/
public function go_to_breadcrumb_location(string $pagename): void {
$breadcrumblabel = get_string('breadcrumb', 'access');
$link = $this->getSession()->getPage()->find(
'xpath',
"//nav[@aria-label='Navigation bar']/ol/li[last()][contains(normalize-space(.), '" . $pagename . "')]"
"//nav[@aria-label='$breadcrumblabel']/ol/li[last()][contains(normalize-space(.), '$pagename')]"
);
if (!$link) {
$this->execute("behat_general::i_click_on_in_the", [$pagename, 'link', 'page', 'region']);