diff --git a/packages/app/cypress/component/support/ctSupport.ts b/packages/app/cypress/component/support/ctSupport.ts index bf8561b447b2..f340b8a9b287 100644 --- a/packages/app/cypress/component/support/ctSupport.ts +++ b/packages/app/cypress/component/support/ctSupport.ts @@ -10,6 +10,13 @@ export const StubWebsocket = new Proxy(Object.create(null), { }, }) +beforeEach(() => { + // this is always 0, since we only destroy the AUT when using + // `experimentalSingleTabRunMode, which is not used in this package. + // @ts-expect-error + expect(window.top.getEventManager().autDestroyedCount).to.eq(0) +}) + // Event manager with Cypress driver dependencies stubbed out // Useful for component testing export const createEventManager = () => { diff --git a/packages/app/cypress/e2e/support/e2eSupport.ts b/packages/app/cypress/e2e/support/e2eSupport.ts index c0a47eb9af1f..9db4e4634325 100644 --- a/packages/app/cypress/e2e/support/e2eSupport.ts +++ b/packages/app/cypress/e2e/support/e2eSupport.ts @@ -1,3 +1,10 @@ import '@packages/frontend-shared/cypress/e2e/support/e2eSupport' import 'cypress-real-events/support' import './execute-spec' + +beforeEach(() => { + // this is always 0, since we only destroy the AUT when using + // `experimentalSingleTabRunMode, which is not a valid experiment for for e2e testing. + // @ts-expect-error + expect(window.top.getEventManager().autDestroyedCount).to.eq(0) +})