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

Commit edf5588

Browse files
committed
Make cypress test more reliable
1 parent f1bd2b8 commit edf5588

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cypress/e2e/user-onboarding/user-onboarding-new.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ describe("User Onboarding (new user)", () => {
5353
});
5454

5555
it("using find friends action should increase progress", () => {
56-
cy.get(".mx_ProgressBar").invoke("val").should("eq", 3);
56+
cy.get(".mx_ProgressBar").invoke("val").then((oldProgress) => {
57+
const findPeopleAction = cy.contains(".mx_UserOnboardingTask_action", "Find friends");
58+
expect(findPeopleAction).to.exist;
59+
findPeopleAction.click();
60+
cy.get(".mx_InviteDialog_editor input").type(bot1.getUserId());
61+
cy.get(".mx_InviteDialog_buttonAndSpinner").click();
5762

58-
const findPeopleAction = cy.contains(".mx_UserOnboardingTask_action", "Find friends");
59-
expect(findPeopleAction).to.exist;
60-
findPeopleAction.click();
61-
cy.get(".mx_InviteDialog_editor input").type(bot1.getUserId());
62-
cy.get(".mx_InviteDialog_buttonAndSpinner").click();
63-
64-
cy.get(".mx_ProgressBar").invoke("val").should("eq", 4);
63+
cy.get(".mx_ProgressBar").invoke("val").should("be.greaterThan", oldProgress);
64+
});
6565
});
6666
});

0 commit comments

Comments
 (0)