From 8513d2f4ff1de67159c2ab03f79e78651b73127e Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 19 May 2023 14:53:44 +1200 Subject: [PATCH] Fix: flaky percy test "Rendering permalinks" (#10874) * hide timestamp * retrigger sonar * trigger build * hide elements instead of removing them which might effect scroll * lint --- cypress/e2e/permalinks/permalinks.spec.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/permalinks/permalinks.spec.ts b/cypress/e2e/permalinks/permalinks.spec.ts index 3d9fc944a1..2a61df26a0 100644 --- a/cypress/e2e/permalinks/permalinks.spec.ts +++ b/cypress/e2e/permalinks/permalinks.spec.ts @@ -126,13 +126,14 @@ describe("permalinks", () => { getPill(danielle.getSafeUserId()); }); - // clean up before taking the snapshot - cy.get(".mx_cryptoEvent").invoke("remove"); - cy.get(".mx_NewRoomIntro").invoke("remove"); - cy.get(".mx_GenericEventListSummary").invoke("remove"); + // Exclude various components from the snapshot, for consistency + const percyCSS = + ".mx_cryptoEvent, " + + ".mx_NewRoomIntro, " + + ".mx_MessageTimestamp, " + + ".mx_RoomView_myReadMarker, " + + ".mx_GenericEventListSummary { visibility: hidden !important; }"; - // Disabled because flaky - see https://github.com/vector-im/element-web/issues/25283 - //const percyCSS = ".mx_MessageTimestamp, .mx_MessagePanel_myReadMarker { visibility: hidden !important; }"; - //cy.get(".mx_RoomView_timeline").percySnapshotElement("Permalink rendering", { percyCSS }); + cy.get(".mx_RoomView_timeline").percySnapshotElement("Permalink rendering", { percyCSS }); }); });