Improve percy snapshot stability (#10239)
This commit is contained in:
@@ -185,9 +185,8 @@ describe("Timeline", () => {
|
||||
.should("have.css", "margin-inline-start", "104px")
|
||||
.should("have.css", "inset-inline-start", "0px");
|
||||
|
||||
// Exclude timestamp from snapshot
|
||||
const percyCSS =
|
||||
".mx_RoomView_body .mx_EventTile_info .mx_MessageTimestamp { visibility: hidden !important; }";
|
||||
// Exclude timestamp and read marker from snapshot
|
||||
const percyCSS = ".mx_MessageTimestamp, .mx_RoomView_myReadMarker { visibility: hidden !important; }";
|
||||
cy.get(".mx_MainSplit").percySnapshotElement("Event line with inline start margin on IRC layout", {
|
||||
percyCSS,
|
||||
});
|
||||
@@ -213,8 +212,8 @@ describe("Timeline", () => {
|
||||
// Click timestamp to highlight hidden event line
|
||||
cy.get(".mx_RoomView_body .mx_EventTile_info .mx_MessageTimestamp").click();
|
||||
|
||||
// Exclude timestamp from snapshot
|
||||
const percyCSS = ".mx_RoomView_body .mx_EventTile .mx_MessageTimestamp { visibility: hidden !important; }";
|
||||
// Exclude timestamp and read marker from snapshot
|
||||
const percyCSS = ".mx_MessageTimestamp, .mx_RoomView_myReadMarker { visibility: hidden !important; }";
|
||||
|
||||
// should not add inline start padding to a hidden event line on IRC layout
|
||||
cy.setSettingValue("layout", null, SettingLevel.DEVICE, Layout.IRC);
|
||||
@@ -336,9 +335,8 @@ describe("Timeline", () => {
|
||||
|
||||
cy.checkA11y();
|
||||
|
||||
// Exclude timestamp from snapshot
|
||||
const percyCSS =
|
||||
".mx_RoomView_body .mx_EventTile_info .mx_MessageTimestamp { visibility: hidden !important; }";
|
||||
// Exclude timestamp and read marker from snapshot
|
||||
const percyCSS = ".mx_MessageTimestamp, .mx_RoomView_myReadMarker { visibility: hidden !important; }";
|
||||
cy.get(".mx_EventTile_last").percySnapshotElement("URL Preview", {
|
||||
percyCSS,
|
||||
widths: [800, 400],
|
||||
|
||||
Reference in New Issue
Block a user