Fixed navigation tests

This commit is contained in:
squidfunk
2017-02-02 00:40:36 +01:00
parent 8a7d9001fd
commit 7d94975960
3 changed files with 17 additions and 8 deletions

View File

@@ -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)

View File

@@ -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 },