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:
parent
76144f156c
commit
6ad1c47df8
|
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue