Skip to content

Commit

Permalink
changed the structure of the plain nightwatch example tests and also …
Browse files Browse the repository at this point in the history
…renamed the files
  • Loading branch information
christine.zierold committed Mar 16, 2017
1 parent 15b1139 commit 138701e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
24 changes: 0 additions & 24 deletions tests/src/examples/google.js

This file was deleted.

28 changes: 28 additions & 0 deletions tests/src/examples/searchTest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
tags: ['simpletest'],
disabled: false,

'Google Simple Search Test' : function (client) {
const searchObject = 'Germany';

client
.url('https://www.google.no/')
.waitForElementVisible('#hplogo', 2000);

client.expect.element('body').to.be.present;

client.logger('Check Attributes');
client.expect.element('body').to.have.attribute('class').which.contains('vasq');
client.expect.element('body').to.have.attribute('onload');

client.expect.element('#hplogo').text.to.match(/Nor/);
client.expect.element('#lst-ib').to.be.an('input');

client.logger('Search for ' + searchObject);
client.setValue('#lst-ib', searchObject);
client.expect.element('#lst-ib').to.have.value.equal(searchObject);
client
.keys(client.Keys.ENTER)
.waitForElementVisible('#search', 2000);
}
};

0 comments on commit 138701e

Please sign in to comment.