From 7eca11e5560d771323d9e327761c181a1b8bb9e5 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 20 Aug 2019 21:24:28 +0900 Subject: [PATCH] Make e2e tests more stabilized --- e2e/tab.test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/e2e/tab.test.js b/e2e/tab.test.js index c82890e..99f0374 100644 --- a/e2e/tab.test.js +++ b/e2e/tab.test.js @@ -71,10 +71,12 @@ describe("tab test", () => { let body = await session.findElementByCSS('body'); await body.sendKeys(Key.Shift, 'D'); - let current = await browser.tabs.query({ windowId: win.id }); - assert(current.length === tabs.length - 1); - assert(current[2].active); - assert(current[2].url === tabs[2].url); + await eventually(async() => { + let current = await browser.tabs.query({ windowId: win.id }); + assert(current.length === tabs.length - 1); + assert(current[2].active); + assert(current[2].url === tabs[2].url); + }) }); it('deletes all tabs to the right by x$', async () => {