From 119c0fdecf504fcaa84987639e8f3c031b1b8285 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 29 Nov 2017 12:23:31 -0800 Subject: [PATCH] Make test more resilient --- test/integration/lib/mascara-first-time.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/lib/mascara-first-time.js b/test/integration/lib/mascara-first-time.js index 55b98765f..aebaef83c 100644 --- a/test/integration/lib/mascara-first-time.js +++ b/test/integration/lib/mascara-first-time.js @@ -9,7 +9,7 @@ async function runFirstTimeUsageTest (assert, done) { // recurse notices while (true) { const button = app.find('button') - if (button.html() === 'Accept') { + if (button && button.html() === 'Accept') { // still notices to accept const termsPage = app.find('.markdown')[0] termsPage.scrollTop = termsPage.scrollHeight @@ -59,8 +59,8 @@ async function runFirstTimeUsageTest (assert, done) { // Skip notices: let detail = app.find('.tou__title')[0] - button = app.find('button') - if (button.html() === 'Accept') { + button = app.find('button')[0] + if (button && button.html() === 'Accept') { app.find('button').click() await timeout(1000) button = app.find('button')