From 01bc386d7aeda9c1ecc46ff3a11a2538fd1451c0 Mon Sep 17 00:00:00 2001 From: Mouse Braun Date: Thu, 21 Sep 2017 13:55:44 +0200 Subject: [PATCH] GH-4 exposed nightmare wait to niffy --- index.js | 9 +++++++++ test/index.js | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/index.js b/index.js index f995da8..e3e9e9c 100644 --- a/index.js +++ b/index.js @@ -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 ); + } } diff --git a/test/index.js b/test/index.js index ce4ec9f..faf022f 100644 --- a/test/index.js +++ b/test/index.js @@ -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('/'); })