Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8513d2f

Browse files
author
Kerry
authored
Fix: flaky percy test "Rendering permalinks" (#10874)
* hide timestamp * retrigger sonar * trigger build * hide elements instead of removing them which might effect scroll * lint
1 parent 55336bf commit 8513d2f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

cypress/e2e/permalinks/permalinks.spec.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@ describe("permalinks", () => {
126126
getPill(danielle.getSafeUserId());
127127
});
128128

129-
// clean up before taking the snapshot
130-
cy.get(".mx_cryptoEvent").invoke("remove");
131-
cy.get(".mx_NewRoomIntro").invoke("remove");
132-
cy.get(".mx_GenericEventListSummary").invoke("remove");
133-
134-
// Disabled because flaky - see https://github.com/vector-im/element-web/issues/25283
135-
//const percyCSS = ".mx_MessageTimestamp, .mx_MessagePanel_myReadMarker { visibility: hidden !important; }";
136-
//cy.get(".mx_RoomView_timeline").percySnapshotElement("Permalink rendering", { percyCSS });
129+
// Exclude various components from the snapshot, for consistency
130+
const percyCSS =
131+
".mx_cryptoEvent, " +
132+
".mx_NewRoomIntro, " +
133+
".mx_MessageTimestamp, " +
134+
".mx_RoomView_myReadMarker, " +
135+
".mx_GenericEventListSummary { visibility: hidden !important; }";
136+
137+
cy.get(".mx_RoomView_timeline").percySnapshotElement("Permalink rendering", { percyCSS });
137138
});
138139
});

0 commit comments

Comments
 (0)