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 8346a6dca2
commit f767c22b31

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