From 6ad1c47df870f73a1c57cb51e3f2bc55d4268258 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 23 Jan 2019 00:39:23 +0200 Subject: [PATCH] test(docs-infra): unregister the SW after `waitForAngular()` (#28290) This increases the chances that the clean-up will take place _after_ the SW has been registered. PR Close #28290 --- aio/tests/deployment/e2e/site.po.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/tests/deployment/e2e/site.po.ts b/aio/tests/deployment/e2e/site.po.ts index 5933ee5cc7..d04026e965 100644 --- a/aio/tests/deployment/e2e/site.po.ts +++ b/aio/tests/deployment/e2e/site.po.ts @@ -38,7 +38,7 @@ export class SitePage { } /** - * Navigate to a URL, disable animations, unregister the ServiceWorker, and wait for Angular. + * Navigate to a URL, disable animations, wait for Angular and unregister the ServiceWorker. * (The SW is unregistered to ensure that subsequent requests are passed through to the server.) */ async goTo(url: string) { @@ -49,8 +49,8 @@ export class SitePage { await browser.get(url || this.baseUrl); await browser.executeScript('document.body.classList.add(\'no-animations\')'); - await browser.executeAsyncScript(unregisterServiceWorker); await browser.waitForAngular(); + await browser.executeAsyncScript(unregisterServiceWorker); }; /**