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

Commit

Permalink
Make cypress test more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Jul 26, 2022
1 parent f1bd2b8 commit edf5588
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cypress/e2e/user-onboarding/user-onboarding-new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ describe("User Onboarding (new user)", () => {
});

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

const findPeopleAction = cy.contains(".mx_UserOnboardingTask_action", "Find friends");
expect(findPeopleAction).to.exist;
findPeopleAction.click();
cy.get(".mx_InviteDialog_editor input").type(bot1.getUserId());
cy.get(".mx_InviteDialog_buttonAndSpinner").click();

cy.get(".mx_ProgressBar").invoke("val").should("eq", 4);
cy.get(".mx_ProgressBar").invoke("val").should("be.greaterThan", oldProgress);
});
});
});

0 comments on commit edf5588

Please sign in to comment.