From da1fcfd8201b2f33e16c9408d56bfd058e97795e Mon Sep 17 00:00:00 2001 From: Jason Teplitz Date: Tue, 2 Feb 2016 16:31:35 -0800 Subject: [PATCH] fix(WebWorkers): Fix flaky WebWorker test Closes #6851 --- .../e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts b/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts index d4564fc8b4..cb02933df7 100644 --- a/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts +++ b/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts @@ -23,9 +23,10 @@ describe('WebWorkers Kitchen Sink', function() { // This test can't wait for Angular 2 as Testability is not available when using WebWorker browser.ignoreSynchronization = true; browser.get(URL); + let changeButtonSelector = 'hello-app .changeButton'; - browser.wait(protractor.until.elementLocated(by.css(selector)), 15000); - element(by.css("hello-app .changeButton")).click(); + browser.wait(protractor.until.elementLocated(by.css(changeButtonSelector)), 15000); + element(by.css(changeButtonSelector)).click(); var elem = element(by.css(selector)); browser.wait(protractor.until.elementTextIs(elem, "howdy world!"), 5000); expect(elem.getText()).toEqual("howdy world!");