You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-29 15:23:11 +03:00
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:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user