From 9f5ee581abf846a144b57389b25585e548b52241 Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Fri, 28 Apr 2017 00:16:14 +0900 Subject: [PATCH] Add small pausing before testing window title to stabilize tests --- test/specs/browser/index_test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/specs/browser/index_test.js b/test/specs/browser/index_test.js index fc0fc76b..44794de2 100644 --- a/test/specs/browser/index_test.js +++ b/test/specs/browser/index_test.js @@ -106,7 +106,7 @@ describe('browser/index.html', function desc() { }] })); return this.app.restart().then(() => { - return this.app.client.waitUntilWindowLoaded().pause(1500); + return this.app.client.waitUntilWindowLoaded().pause(2000); }).then(() => { return this.app.browserWindow.getTitle(); }).then((title) => title.should.equal('Mattermost Desktop testing html')); @@ -134,12 +134,14 @@ describe('browser/index.html', function desc() { document.title = 'Title 0'; }). windowByIndex(0). + pause(500). browserWindow.getTitle().then((title) => title.should.equal('Title 0')). windowByIndex(1). execute(() => { document.title = 'Title 1'; }). windowByIndex(0). + pause(500). browserWindow.getTitle().then((title) => title.should.equal('Title 0')); }); }); @@ -170,8 +172,10 @@ describe('browser/index.html', function desc() { document.title = 'Title 1'; }). windowByIndex(0). + pause(500). browserWindow.getTitle().then((title) => title.should.equal('Title 0')). click('#teamTabItem1'). + pause(500). browserWindow.getTitle().then((title) => title.should.equal('Title 1')); }); });