From be2ba34d3c20e30c7106b1078f7f3e69ac6fdceb Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 29 May 2020 19:45:28 +0100 Subject: [PATCH] tests: remove set timeouts to try fix edge remote tests --- .../frontend/specs/clear_authorship_colors.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/frontend/specs/clear_authorship_colors.js b/tests/frontend/specs/clear_authorship_colors.js index efadb08a0..49ac5905d 100644 --- a/tests/frontend/specs/clear_authorship_colors.js +++ b/tests/frontend/specs/clear_authorship_colors.js @@ -47,10 +47,13 @@ describe("clear authorship colors button", function(){ var hasAuthorClass = inner$("div").first().attr("class").indexOf("author") !== -1; expect(hasAuthorClass).to.be(false); - setTimeout(function(){ + helper.waitFor(function(){ var disconnectVisible = chrome$("div.disconnected").attr("class").indexOf("visible") === -1 - expect(disconnectVisible).to.be(true); - },1000); + return (disconnectVisible === true) + }); + + var disconnectVisible = chrome$("div.disconnected").attr("class").indexOf("visible") === -1 + expect(disconnectVisible).to.be(true); done(); }); @@ -116,11 +119,13 @@ describe("clear authorship colors button", function(){ hasAuthorClass = inner$("div").first().attr("class").indexOf("author") !== -1; expect(hasAuthorClass).to.be(false); - - setTimeout(function(){ + helper.waitFor(function(){ var disconnectVisible = chrome$("div.disconnected").attr("class").indexOf("visible") === -1 - expect(disconnectVisible).to.be(true); - },1000); + return (disconnectVisible === true) + }); + + var disconnectVisible = chrome$("div.disconnected").attr("class").indexOf("visible") === -1 + expect(disconnectVisible).to.be(true); done(); });