mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-03 11:18:36 -04:00
Fixed navigation tests
This commit is contained in:
@@ -75,8 +75,10 @@ const generate = (dirname, components) => {
|
||||
|
||||
/* Create suite */
|
||||
gemini.suite(name, suite => {
|
||||
if (component.url)
|
||||
suite.setUrl(path.join(base, component.url, "_"))
|
||||
if (component.dir || component.url)
|
||||
suite.setUrl(path.join(
|
||||
base, component.dir ? component.dir : "",
|
||||
"_", component.url ? component.url : ""))
|
||||
|
||||
/* The capture selector is assumed to exist */
|
||||
suite.setCaptureElements(component.capture)
|
||||
|
||||
@@ -60,7 +60,7 @@ spec.generate(__dirname, {
|
||||
|
||||
/* Long list title with ellipsis */
|
||||
"~overflow": {
|
||||
"url": "/_overflow",
|
||||
"dir": "_overflow",
|
||||
"capture": ".md-nav--primary .md-nav__title",
|
||||
"states": [
|
||||
{ "name": "", "wait": 250, "exec": open }
|
||||
@@ -152,7 +152,7 @@ spec.generate(__dirname, {
|
||||
|
||||
/* Active link */
|
||||
"md-nav__link--active": {
|
||||
"capture": ".md-nav--primary .md-nav__link--active",
|
||||
"capture": ".md-nav--primary .md-nav__item .md-nav__link--active",
|
||||
"states": [
|
||||
{ "name": "", "wait": 250, "exec": open },
|
||||
{ "name": ":focus", "wait": 250, "exec": open },
|
||||
|
||||
Reference in New Issue
Block a user