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

Commit bc507c7

Browse files
committed
Add percy tests
Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 42f0912 commit bc507c7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cypress/e2e/timeline/timeline.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,21 @@ describe("Timeline", () => {
357357
"not.be.visible", // See: _GenericEventListSummary.pcss
358358
);
359359

360+
// Exclude timestamp from snapshot
361+
const percyCSS = ".mx_MessageTimestamp { visibility: hidden !important; }";
362+
363+
// Save snapshot of expanded generic event list summary on bubble layout
364+
cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on bubble layout", { percyCSS });
365+
360366
// Click "collapse" link button on the first hovered info event line
361367
cy.get(".mx_GenericEventListSummary_unstyledList .mx_EventTile_info:first-of-type").realHover();
362368
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=true]").click({ force: false });
363369

364370
// Make sure "collapse" link button worked
365371
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").should("exist");
372+
373+
// Save snapshot of collapsed generic event list summary on bubble layout
374+
cy.get(".mx_MainSplit").percySnapshotElement("Collapsed GELS on bubble layout", { percyCSS });
366375
});
367376

368377
it("should highlight search result words regardless of formatting", () => {

0 commit comments

Comments
 (0)