Prettify codebase
This commit is contained in:
@ -23,7 +23,7 @@ exports.command = function command(data) {
|
||||
this.execute(
|
||||
// The function argument is converted to a string and sent to the browser
|
||||
function(argData) {
|
||||
return argData;
|
||||
return argData
|
||||
},
|
||||
|
||||
// The arguments for the function to be sent to the browser are specified in this array
|
||||
@ -31,9 +31,9 @@ exports.command = function command(data) {
|
||||
|
||||
function(result) {
|
||||
// The "result" object contains the result of what we have sent back from the browser window
|
||||
console.log("custom execute result:", result.value);
|
||||
console.log('custom execute result:', result.value)
|
||||
}
|
||||
);
|
||||
)
|
||||
|
||||
return this;
|
||||
};
|
||||
return this
|
||||
}
|
||||
|
@ -14,10 +14,10 @@ module.exports = {
|
||||
command: async function() {
|
||||
// Other Nightwatch commands are available via "this"
|
||||
// .init() simply calls .url() command with the value of the "launch_url" setting
|
||||
this.init();
|
||||
this.waitForElementVisible("#app");
|
||||
this.init()
|
||||
this.waitForElementVisible('#app')
|
||||
|
||||
const result = await this.elements("css selector", "#app ul");
|
||||
this.assert.strictEqual(result.value.length, 3);
|
||||
const result = await this.elements('css selector', '#app ul')
|
||||
this.assert.strictEqual(result.value.length, 3)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -10,15 +10,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const assert = require("assert");
|
||||
const assert = require('assert')
|
||||
|
||||
module.exports = class {
|
||||
async command() {
|
||||
// Other Nightwatch commands are available via "this.api"
|
||||
this.api.init();
|
||||
this.api.waitForElementVisible("#app");
|
||||
this.api.init()
|
||||
this.api.waitForElementVisible('#app')
|
||||
|
||||
const result = await this.api.elements("css selector", "#app ul");
|
||||
assert.strictEqual(result.value.length, 3);
|
||||
const result = await this.api.elements('css selector', '#app ul')
|
||||
assert.strictEqual(result.value.length, 3)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user