Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fix flake #23630 (#67367)

Nemanja Glumac04dbcf182369
diff --git a/e2e/test/scenarios/admin-2/people.cy.spec.js b/e2e/test/scenarios/admin-2/people.cy.spec.js
index 7ef5f25d4f1..5d9b2b78602 100644
--- a/e2e/test/scenarios/admin-2/people.cy.spec.js
+++ b/e2e/test/scenarios/admin-2/people.cy.spec.js
@@ -631,8 +631,8 @@ describe("scenarios > admin > people", () => {
const { first_name, last_name, email } = TEST_USER;
const FULL_NAME = `${first_name} ${last_name}`;
- cy.visit("/admin/people");
+ cy.visit("/admin/people");
clickButton("Invite someone");
// first modal
@@ -642,25 +642,23 @@ describe("scenarios > admin > people", () => {
clickButton("Create");
// second modal
- // eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
- cy.findByText(`${FULL_NAME} has been added`);
- // eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
- cy.contains(
- `We’ve sent an invite to ${email} with instructions to log in. If this user is unable to authenticate then you can reset their password.`,
- );
- cy.url().then((url) => {
- const URL_REGEX = /\/admin\/people\/(?<userId>\d+)\/success/;
- const { userId } = URL_REGEX.exec(url).groups;
- assertLinkMatchesUrl(
- "reset their password.",
- `/admin/people/${userId}/reset`,
+ H.modal().within(() => {
+ cy.findByText(`${FULL_NAME} has been added`);
+ cy.contains(
+ `We’ve sent an invite to ${email} with instructions to log in. If this user is unable to authenticate then you can reset their password.`,
);
+ cy.url().then((url) => {
+ const URL_REGEX = /\/admin\/people\/(?<userId>\d+)\/success/;
+ const { userId } = URL_REGEX.exec(url).groups;
+ assertLinkMatchesUrl(
+ "reset their password.",
+ `/admin/people/${userId}/reset`,
+ );
+ });
+ cy.button("Done").click();
});
- // eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
- cy.findByText("Done").click();
- // eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
- cy.findByText(FULL_NAME);
+ cy.findByTestId("admin-people-list-table").should("contain", FULL_NAME);
});
});