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
This commit is contained in:
George Kalpakas 2019-01-23 00:39:23 +02:00 committed by Jason Aden
parent 76144f156c
commit 6ad1c47df8
1 changed files with 2 additions and 2 deletions

View File

@ -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);
};
/**