MDL-82298 navigation: Update behat tests for theme_classic

This commit is contained in:
Cameron Ball
2024-09-26 10:08:36 +08:00
parent d2f71d6b02
commit 7bccc2978a
2 changed files with 18 additions and 1 deletions
@@ -29,6 +29,7 @@ require_once(__DIR__ . '/../../../../lib/tests/behat/behat_navigation.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException;
use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
use Behat\Mink\Exception\DriverException as DriverException;
/**
* Step definitions and overrides to navigate through the navigation tree nodes in the Classic theme.
@@ -428,4 +429,18 @@ class behat_theme_classic_behat_navigation extends behat_navigation {
throw new ElementNotFoundException($this->getSession(),
'Link "' . join(' > ', $nodelist) . '" in the current page edit menu"');
}
#[\Override]
public function menu_item_should_be_active(string $navigationmenuitem): void {
throw new DriverException(
'The Classic theme does not implement navigation in a way that allows this step to be used.',
);
}
#[\Override]
public function menu_item_should_not_be_active(string $navigationmenuitem): void {
throw new DriverException(
'The Classic theme does not implement the navigation in a way that allows this step to be used.',
);
}
}
+3 -1
View File
@@ -11,7 +11,9 @@
"course/format/tests/behat/courseindex_keyboardnav.feature",
"course/format/tests/behat/courseindex_completion.feature",
"course/format/tests/behat/courseindex_language.feature",
"badges/tests/behat/badge_navigation.feature"
"badges/tests/behat/badge_navigation.feature",
"lib/tests/behat/menu_navigation_single_activity.feature",
"lib/tests/behat/menu_navigation_topics.feature"
],
"tags": [
"addablocklink"