Update user-view.spec.ts
- use Cypress Testing Library (#10577)
* Update user-view.spec.ts - use Cypress Testing Library Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove a line to have the test wait until the spinner disappears The custom command 'percySnapshotElement' waits until it disappears so there is no need to keep it. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
This commit is contained in:
parent
c9c974d455
commit
c5de595e79
1 changed files with 4 additions and 2 deletions
|
@ -40,8 +40,10 @@ describe("UserView", () => {
|
||||||
cy.visit(`/#/user/${bot.getUserId()}`);
|
cy.visit(`/#/user/${bot.getUserId()}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get("#mx_RightPanel .mx_UserInfo_profile h2").should("contain", "Usman");
|
cy.get(".mx_RightPanel .mx_UserInfo_profile h2").within(() => {
|
||||||
cy.get(".mx_RightPanel .mx_Spinner").should("not.exist"); // wait for spinners to finish
|
cy.findByText("Usman").should("exist");
|
||||||
|
});
|
||||||
|
|
||||||
cy.get(".mx_RightPanel").percySnapshotElement("User View", {
|
cy.get(".mx_RightPanel").percySnapshotElement("User View", {
|
||||||
// Hide the MXID field as it'll vary on each test
|
// Hide the MXID field as it'll vary on each test
|
||||||
percyCSS: ".mx_UserInfo_profile_mxid { visibility: hidden !important; }",
|
percyCSS: ".mx_UserInfo_profile_mxid { visibility: hidden !important; }",
|
||||||
|
|
Loading…
Reference in a new issue