Last active
May 1, 2021 20:26
-
-
Save pikesley/6b2c77f81c5f24092ed72a5500bcd003 to your computer and use it in GitHub Desktop.
Nightwatch is confusing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = 'http://foo:8000' | |
module.exports = { | |
"The spans have the correct class": function (browser) { | |
let spans = ['#foo', '#bar', '#a', '#really', '#long', '#list'] | |
spans.forEach(function (span) { | |
browser | |
.url(url) | |
.waitForElementVisible(span, timeout) | |
.assert.cssClassPresent(span, "active"); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const url = 'http://foo:8000' | |
module.exports = { | |
"The spans have the correct class": function (browser) { | |
let spans = ['#foo', '#bar', '#a', '#really', '#long', '#list'] | |
browser | |
.url(url) | |
// this obviously doesn't work | |
spans.forEach(function (span) { | |
.waitForElementVisible(span, timeout) | |
.assert.cssClassPresent(span, "active"); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment