Skip to content

Commit

Permalink
Revert "Revert "Unregister workers""
Browse files Browse the repository at this point in the history
This reverts commit 6e9db28.
  • Loading branch information
andmor- committed Feb 5, 2024
1 parent 6e9db28 commit e0e6530
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions webui/test/cypress/e2e/main.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
beforeEach(() => {
if (!window.navigator || !navigator.serviceWorker) {
return null;
}
const cypressPromise = new Cypress.Promise((resolve, reject) => {
navigator.serviceWorker.getRegistrations().then((registrations) => {
if(!registrations.length) resolve();
Promise.all(registrations).then(() => {
resolve();
});
});
});
cy.wrap('Unregister service workers').then(() => cypressPromise)
});

describe('Frontpage', () => {
it('renders all elements', () => {
cy.visit('/');
Expand Down

0 comments on commit e0e6530

Please sign in to comment.