Skip to content

Commit

Permalink
Merge pull request #5 from mousemke/gh-4-exposeWait
Browse files Browse the repository at this point in the history
GH-4 exposed nightmare wait to niffy
  • Loading branch information
mousemke authored Sep 21, 2017
2 parents 3f33193 + 01bc386 commit 8cac32a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ class NiffyTestRunner
throw new Error(failMessage);
}
}

/**
* exposes the nightmare wait fubction
*
* @param {String} target selector of ms
*/
* wait( target ){
yield this.nightmare.wait( target );
}
}


Expand Down
5 changes: 5 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ describe('Google', function () {
const { label, width, height } = size;

describe(`${label} : ${width} x ${height}`, () => {

before(function* () {);
yield niffy.wait(100); // example
});

it('Homepage', function* () {
yield niffy.test('/');
})
Expand Down

0 comments on commit 8cac32a

Please sign in to comment.