1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-10 19:43:07 +03:00

Make percy snapshots for user onboarding more reliable (#9132)

* Make percy snapshots for user onboarding more reliable
* Increase stability of lazy loading test

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Janne Mareike Koschinski
2022-08-08 13:17:04 +02:00
committed by GitHub
parent 4a14882938
commit cb15222594
4 changed files with 27 additions and 9 deletions

View File

@@ -115,21 +115,21 @@ describe("Lazy Loading", () => {
});
}
function getMembersInMemberlist(): Chainable<JQuery> {
return cy.get(".mx_MemberList .mx_EntityTile_name");
function getMemberInMemberlist(name: string): Chainable<JQuery> {
return cy.contains(".mx_MemberList .mx_EntityTile_name", name);
}
function checkMemberList(charlies: Charly[]) {
getMembersInMemberlist().contains("Alice").should("exist");
getMembersInMemberlist().contains("Bob").should("exist");
getMemberInMemberlist("Alice").should("exist");
getMemberInMemberlist("Bob").should("exist");
charlies.forEach(charly => {
getMembersInMemberlist().contains(charly.displayName).should("exist");
getMemberInMemberlist(charly.displayName).should("exist");
});
}
function checkMemberListLacksCharlies(charlies: Charly[]) {
charlies.forEach(charly => {
getMembersInMemberlist().contains(charly.displayName).should("not.exist");
getMemberInMemberlist(charly.displayName).should("not.exist");
});
}