From d69046b67017042583375164bbef74511bd00c17 Mon Sep 17 00:00:00 2001 From: Luis Date: Sun, 23 Apr 2017 17:58:10 +0200 Subject: [PATCH] Fix previous tests and new test: webslides object exists --- test/utils/webslides.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/utils/webslides.js b/test/utils/webslides.js index 973be4b..705a637 100644 --- a/test/utils/webslides.js +++ b/test/utils/webslides.js @@ -9,7 +9,7 @@ const load = async () => { return await ph_.createPage(); }).then(page => { page_ = page; - return page_.open('https://stackoverflow.com/'); + return page_.open('http://webslides.tv/'); }).then(status => { status_ = status; return true; @@ -23,8 +23,14 @@ test.serial("Page loaded", async t => { test.serial('#webslides exits', async t => { await page_ - .evaluate( () => document.querySelector('#webslides') ) - .then( ws => { t.not(ws, null); } ); + .evaluate( () => document.querySelector('#webslides') != null ) + .then( ws => { t.truthy(ws); } ); +}); + +test.serial('WebSlides object exits', async t => { + await page_ + .evaluate( () => window.ws != null ) + .then( ws => { t.truthy(ws); } ); }); /**