Prettify codebase
This commit is contained in:
@ -7,28 +7,30 @@
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
module.exports = {
|
||||
beforeEach: browser => browser.init(),
|
||||
beforeEach: (browser) => browser.init(),
|
||||
|
||||
"e2e tests using page objects": browser => {
|
||||
const homepage = browser.page.homepage();
|
||||
homepage.waitForElementVisible("@appContainer");
|
||||
'e2e tests using page objects': (browser) => {
|
||||
const homepage = browser.page.homepage()
|
||||
homepage.waitForElementVisible('@appContainer')
|
||||
|
||||
const app = homepage.section.app;
|
||||
app.assert.elementCount("@logo", 1);
|
||||
app.expect.section("@welcome").to.be.visible;
|
||||
const app = homepage.section.app
|
||||
app.assert.elementCount('@logo', 1)
|
||||
app.expect.section('@welcome').to.be.visible
|
||||
app.expect
|
||||
.section("@headline")
|
||||
.text.to.match(/^Welcome to Your Vue\.js (.*)App$/);
|
||||
.section('@headline')
|
||||
.text.to.match(/^Welcome to Your Vue\.js (.*)App$/)
|
||||
|
||||
browser.end();
|
||||
browser.end()
|
||||
},
|
||||
|
||||
'verify if string "e2e-nightwatch" is within the cli plugin links': browser => {
|
||||
const homepage = browser.page.homepage();
|
||||
const welcomeSection = homepage.section.app.section.welcome;
|
||||
'verify if string "e2e-nightwatch" is within the cli plugin links': (
|
||||
browser
|
||||
) => {
|
||||
const homepage = browser.page.homepage()
|
||||
const welcomeSection = homepage.section.app.section.welcome
|
||||
|
||||
welcomeSection.expect
|
||||
.element("@cliPluginLinks")
|
||||
.text.to.contain("e2e-nightwatch");
|
||||
.element('@cliPluginLinks')
|
||||
.text.to.contain('e2e-nightwatch')
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -2,20 +2,20 @@
|
||||
// https://nightwatchjs.org/guide
|
||||
|
||||
module.exports = {
|
||||
"default e2e tests": browser => {
|
||||
'default e2e tests': (browser) => {
|
||||
browser
|
||||
.init()
|
||||
.waitForElementVisible("#app")
|
||||
.assert.elementPresent(".hello")
|
||||
.assert.containsText("h1", "Welcome to Your Vue.js App")
|
||||
.assert.elementCount("img", 1)
|
||||
.end();
|
||||
.waitForElementVisible('#app')
|
||||
.assert.elementPresent('.hello')
|
||||
.assert.containsText('h1', 'Welcome to Your Vue.js App')
|
||||
.assert.elementCount('img', 1)
|
||||
.end()
|
||||
},
|
||||
|
||||
"example e2e test using a custom command": browser => {
|
||||
'example e2e test using a custom command': (browser) => {
|
||||
browser
|
||||
.openHomepage()
|
||||
.assert.elementPresent(".hello")
|
||||
.end();
|
||||
.assert.elementPresent('.hello')
|
||||
.end()
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user