Fix: cypress toasts/analytics-toast.spec.ts
failures (#11153)
* Revert "skip broken analytics tests (#11144)"
This reverts commit 83ee1946ea
.
* reset window notification permission between tets
This commit is contained in:
parent
ac9dd8307f
commit
3de2bcdc1a
3 changed files with 10 additions and 3 deletions
|
@ -25,7 +25,7 @@ describe("Security user settings tab", () => {
|
|||
cy.stopHomeserver(homeserver);
|
||||
});
|
||||
|
||||
describe.skip("with posthog enabled", () => {
|
||||
describe("with posthog enabled", () => {
|
||||
beforeEach(() => {
|
||||
// Enable posthog
|
||||
cy.intercept("/config.json?cachebuster=*", (req) => {
|
||||
|
|
|
@ -39,7 +39,7 @@ function rejectToast(expectedTitle: string): void {
|
|||
});
|
||||
}
|
||||
|
||||
describe.skip("Analytics Toast", () => {
|
||||
describe("Analytics Toast", () => {
|
||||
let homeserver: HomeserverInstance;
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
@ -137,7 +137,14 @@ Cypress.Commands.add(
|
|||
prelaunchFn?.();
|
||||
|
||||
return cy
|
||||
.visit("/")
|
||||
.visit("/", {
|
||||
onBeforeLoad(win) {
|
||||
// reset notification permissions so we have predictable behaviour
|
||||
// of notifications toast
|
||||
// @ts-ignore allow setting default
|
||||
cy.stub(win.Notification, "permission", "default");
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
// wait for the app to load
|
||||
return cy.get(".mx_MatrixChat", { timeout: 30000 });
|
||||
|
|
Loading…
Reference in a new issue