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

Commit

Permalink
Add percy tests
Browse files Browse the repository at this point in the history
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed Mar 1, 2023
1 parent 42f0912 commit bc507c7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cypress/e2e/timeline/timeline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,21 @@ describe("Timeline", () => {
"not.be.visible", // See: _GenericEventListSummary.pcss
);

// Exclude timestamp from snapshot
const percyCSS = ".mx_MessageTimestamp { visibility: hidden !important; }";

// Save snapshot of expanded generic event list summary on bubble layout
cy.get(".mx_MainSplit").percySnapshotElement("Expanded GELS on bubble layout", { percyCSS });

// Click "collapse" link button on the first hovered info event line
cy.get(".mx_GenericEventListSummary_unstyledList .mx_EventTile_info:first-of-type").realHover();
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=true]").click({ force: false });

// Make sure "collapse" link button worked
cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").should("exist");

// Save snapshot of collapsed generic event list summary on bubble layout
cy.get(".mx_MainSplit").percySnapshotElement("Collapsed GELS on bubble layout", { percyCSS });
});

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

0 comments on commit bc507c7

Please sign in to comment.