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

Update user-view.spec.ts - use Cypress Testing Library #10577

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cypress/e2e/user-view/user-view.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ describe("UserView", () => {
cy.visit(`/#/user/${bot.getUserId()}`);
});

cy.get("#mx_RightPanel .mx_UserInfo_profile h2").should("contain", "Usman");
cy.get(".mx_RightPanel .mx_Spinner").should("not.exist"); // wait for spinners to finish
cy.get(".mx_RightPanel .mx_UserInfo_profile h2").within(() => {
cy.findByText("Usman").should("exist");
});

cy.get(".mx_RightPanel").percySnapshotElement("User View", {
// Hide the MXID field as it'll vary on each test
percyCSS: ".mx_UserInfo_profile_mxid { visibility: hidden !important; }",
Expand Down