Skip to content

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

Ensure flaky tests are tagged as flaky (#63157)

Frasere7fd61a38688
diff --git a/e2e/test/scenarios/admin-2/people.cy.spec.js b/e2e/test/scenarios/admin-2/people.cy.spec.js
index 77359287657..2c551c4bdb2 100644
--- a/e2e/test/scenarios/admin-2/people.cy.spec.js
+++ b/e2e/test/scenarios/admin-2/people.cy.spec.js
@@ -767,7 +767,7 @@ describe("scenarios > admin > people > group managers", () => {
cy.url().should("match", /\/$/);
});
- it("can manage members from the people page", () => {
+ it("can manage members from the people page", { tags: "@flaky" }, () => {
// Open membership select for a user
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText(noCollectionUserName)
diff --git a/e2e/test/scenarios/admin/transforms.cy.spec.ts b/e2e/test/scenarios/admin/transforms.cy.spec.ts
index 917ac404a89..f4a383171f4 100644
--- a/e2e/test/scenarios/admin/transforms.cy.spec.ts
+++ b/e2e/test/scenarios/admin/transforms.cy.spec.ts
@@ -701,37 +701,43 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
assertTableDoesNotExistError();
});
- it("should be able to delete the target and restore the same target back", () => {
- cy.log("create and run a transform");
- createMbqlTransform({ visitTransform: true });
- runTransformAndWaitForSuccess();
+ it(
+ "should be able to delete the target and restore the same target back",
+ { tags: "@flaky" },
+ () => {
+ cy.log("create and run a transform");
+ createMbqlTransform({ visitTransform: true });
+ runTransformAndWaitForSuccess();
- cy.log("delete the old target without creating the new one");
- getTransformPage().button("Change target").click();
- H.modal().within(() => {
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
- cy.findByLabelText("Delete transform_table").click();
- cy.button("Change target and delete the old one").click();
- cy.wait("@deleteTransformTable");
- cy.wait("@updateTransform");
- });
+ cy.log("delete the old target without creating the new one");
+ getTransformPage().button("Change target").click();
+ H.modal().within(() => {
+ cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
+ cy.findByLabelText("Delete transform_table").click();
+ cy.button("Change target and delete the old one").click();
+ cy.wait("@deleteTransformTable");
+ cy.wait("@updateTransform");
+ });
- cy.log("change the target back to the original one");
- getTransformPage().button("Change target").click();
- H.modal().within(() => {
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE);
- cy.button("Change target").click();
- cy.wait("@updateTransform");
- });
+ cy.log("change the target back to the original one");
+ getTransformPage().button("Change target").click();
+ H.modal().within(() => {
+ cy.findByLabelText("Table name").clear().type(TARGET_TABLE);
+ cy.button("Change target").click();
+ cy.wait("@updateTransform");
+ });
- cy.log("run the transform to re-create the original target");
- runTransformAndWaitForSuccess();
+ cy.log("run the transform to re-create the original target");
+ runTransformAndWaitForSuccess();
- cy.log("verify the target is available");
- getTableLink().click();
- H.queryBuilderHeader().findByText("Transform Table").should("be.visible");
- H.assertQueryBuilderRowCount(3);
- });
+ cy.log("verify the target is available");
+ getTableLink().click();
+ H.queryBuilderHeader()
+ .findByText("Transform Table")
+ .should("be.visible");
+ H.assertQueryBuilderRowCount(3);
+ },
+ );
it("should not allow to overwrite an existing table when changing the target", () => {
createMbqlTransform({ visitTransform: true });
diff --git a/e2e/test/scenarios/collections/uploads.cy.spec.js b/e2e/test/scenarios/collections/uploads.cy.spec.js
index 584623db7cb..f4f07acc4e1 100644
--- a/e2e/test/scenarios/collections/uploads.cy.spec.js
+++ b/e2e/test/scenarios/collections/uploads.cy.spec.js
@@ -15,80 +15,84 @@ H.describeWithSnowplow(
cy.intercept("POST", "/api/table/*/replace-csv").as("replaceCSV");
});
- it("Can upload a CSV file to an empty postgres schema", () => {
- const testFile = VALID_CSV_FILES[0];
- const EMPTY_SCHEMA_NAME = "empty_uploads";
+ it(
+ "Can upload a CSV file to an empty postgres schema",
+ { tags: "@flaky" },
+ () => {
+ const testFile = VALID_CSV_FILES[0];
+ const EMPTY_SCHEMA_NAME = "empty_uploads";
- cy.intercept("PUT", "/api/setting/*").as("saveSettings");
- cy.intercept("GET", "/api/database").as("databaseList");
+ cy.intercept("PUT", "/api/setting/*").as("saveSettings");
+ cy.intercept("GET", "/api/database").as("databaseList");
- H.restore("postgres-writable");
- cy.signInAsAdmin();
+ H.restore("postgres-writable");
+ cy.signInAsAdmin();
- H.queryWritableDB(
- "DROP SCHEMA IF EXISTS empty_uploads CASCADE;",
- "postgres",
- );
- H.queryWritableDB(
- "CREATE SCHEMA IF NOT EXISTS empty_uploads;",
- "postgres",
- );
+ H.queryWritableDB(
+ "DROP SCHEMA IF EXISTS empty_uploads CASCADE;",
+ "postgres",
+ );
+ H.queryWritableDB(
+ "CREATE SCHEMA IF NOT EXISTS empty_uploads;",
+ "postgres",
+ );
- cy.request("POST", "/api/collection", {
- name: "Uploads Collection",
- parent_id: null,
- }).then(({ body: { id: collectionId } }) => {
- cy.wrap(collectionId).as("collectionId");
- });
- cy.visit("/admin/settings/uploads");
+ cy.request("POST", "/api/collection", {
+ name: "Uploads Collection",
+ parent_id: null,
+ }).then(({ body: { id: collectionId } }) => {
+ cy.wrap(collectionId).as("collectionId");
+ });
+ cy.visit("/admin/settings/uploads");
- cy.findByLabelText("Upload Settings Form")
- .findByPlaceholderText("Select a database")
- .click();
- H.popover().findByText("Writable Postgres12").click();
- cy.findByLabelText("Upload Settings Form")
- .findByPlaceholderText("Select a schema")
- .click();
+ cy.findByLabelText("Upload Settings Form")
+ .findByPlaceholderText("Select a database")
+ .click();
+ H.popover().findByText("Writable Postgres12").click();
+ cy.findByLabelText("Upload Settings Form")
+ .findByPlaceholderText("Select a schema")
+ .click();
- H.popover().findByText(EMPTY_SCHEMA_NAME).click();
+ H.popover().findByText(EMPTY_SCHEMA_NAME).click();
- cy.findByLabelText("Upload Settings Form")
- .button("Enable uploads")
- .click();
+ cy.findByLabelText("Upload Settings Form")
+ .button("Enable uploads")
+ .click();
- cy.wait(["@saveSettings", "@databaseList"]);
+ cy.wait(["@saveSettings", "@databaseList"]);
- uploadFileToCollection(testFile);
+ uploadFileToCollection(testFile);
- const tableQuery = `SELECT * FROM information_schema.tables WHERE table_name LIKE '%${testFile.tableName}_%' ORDER BY table_name DESC LIMIT 1;`;
+ const tableQuery = `SELECT * FROM information_schema.tables WHERE table_name LIKE '%${testFile.tableName}_%' ORDER BY table_name DESC LIMIT 1;`;
- H.queryWritableDB(tableQuery, "postgres").then((result) => {
- expect(result.rows.length).to.equal(1);
- const tableName = result.rows[0].table_name;
- H.queryWritableDB(
- `SELECT count(*) FROM ${EMPTY_SCHEMA_NAME}.${tableName};`,
- "postgres",
- ).then((result) => {
- expect(Number(result.rows[0].count)).to.equal(testFile.rowCount);
+ H.queryWritableDB(tableQuery, "postgres").then((result) => {
+ expect(result.rows.length).to.equal(1);
+ const tableName = result.rows[0].table_name;
+ H.queryWritableDB(
+ `SELECT count(*) FROM ${EMPTY_SCHEMA_NAME}.${tableName};`,
+ "postgres",
+ ).then((result) => {
+ expect(Number(result.rows[0].count)).to.equal(testFile.rowCount);
+ });
});
- });
- cy.log(
- "Ensure that table is visible in admin without refreshing (metabase#38041)",
- );
+ cy.log(
+ "Ensure that table is visible in admin without refreshing (metabase#38041)",
+ );
- cy.findByTestId("app-bar")
- .findByRole("button", { name: "Settings" })
- .click();
- H.popover().findByText("Admin settings").click();
+ cy.findByTestId("app-bar")
+ .findByRole("button", { name: "Settings" })
+ .click();
+ H.popover().findByText("Admin settings").click();
- cy.findByRole("link", { name: "Table Metadata" }).click();
+ cy.findByRole("link", { name: "Table Metadata" }).click();
- H.DataModel.TablePicker.getDatabase("Writable Postgres12").click();
- H.DataModel.TablePicker.getSchema(EMPTY_SCHEMA_NAME).click();
- H.DataModel.TablePicker.getTables().should("have.length", 1);
- H.DataModel.TablePicker.getTable("Dog Breeds").should("be.visible");
- });
+ H.DataModel.TablePicker.getDatabase("Writable Postgres12").click();
+ H.DataModel.TablePicker.getSchema(EMPTY_SCHEMA_NAME).click();
+ H.DataModel.TablePicker.getTables().should("have.length", 1);
+ H.DataModel.TablePicker.getTable("Dog Breeds").should("be.visible");
+ },
+ );
["postgres", "mysql"].forEach((dialect) => {
describe(`CSV Uploading (${dialect})`, () => {
diff --git a/e2e/test/scenarios/embedding/embedding-reproductions.cy.spec.js b/e2e/test/scenarios/embedding/embedding-reproductions.cy.spec.js
index ac69f7619d7..5b1469bf679 100644
--- a/e2e/test/scenarios/embedding/embedding-reproductions.cy.spec.js
+++ b/e2e/test/scenarios/embedding/embedding-reproductions.cy.spec.js
@@ -957,20 +957,24 @@ describe("issue 40660", () => {
});
});
- it("static dashboard content shouldn't overflow its container (metabase#40660)", () => {
- H.openStaticEmbeddingModal({
- activeTab: "parameters",
- previewMode: "preview",
- });
+ it(
+ "static dashboard content shouldn't overflow its container (metabase#40660)",
+ { tags: "@flaky" },
+ () => {
+ H.openStaticEmbeddingModal({
+ activeTab: "parameters",
+ previewMode: "preview",
+ });
- H.getIframeBody().within(() => {
- cy.findByTestId("embed-frame").scrollTo("bottom");
+ H.getIframeBody().within(() => {
+ cy.findByTestId("embed-frame").scrollTo("bottom");
- cy.findByRole("link", { name: "Powered by Metabase" }).should(
- "be.visible",
- );
- });
- });
+ cy.findByRole("link", { name: "Powered by Metabase" }).should(
+ "be.visible",
+ );
+ });
+ },
+ );
});
// Skipped since it does not make sense when CSP is disabled
diff --git a/e2e/test/scenarios/models/reproductions.cy.spec.ts b/e2e/test/scenarios/models/reproductions.cy.spec.ts
index 2eee331ccb0..00fa1140fb9 100644
--- a/e2e/test/scenarios/models/reproductions.cy.spec.ts
+++ b/e2e/test/scenarios/models/reproductions.cy.spec.ts
@@ -143,31 +143,35 @@ describe("issue 35711", () => {
cy.signInAsAdmin();
});
- it("can edit metadata of a model with a custom column (metabase#35711)", () => {
- H.createQuestion(
- {
- type: "model",
- query: {
- "source-table": ORDERS_ID,
- expressions: {
- "Custom column": ["-", DISCOUNT_FIELD_REF, 1],
+ it(
+ "can edit metadata of a model with a custom column (metabase#35711)",
+ { tags: "@flaky" },
+ () => {
+ H.createQuestion(
+ {
+ type: "model",
+ query: {
+ "source-table": ORDERS_ID,
+ expressions: {
+ "Custom column": ["-", DISCOUNT_FIELD_REF, 1],
+ },
+ limit: 5, // optimization
},
- limit: 5, // optimization
},
- },
- { visitQuestion: true },
- );
+ { visitQuestion: true },
+ );
- H.openQuestionActions();
- H.popover().findByText("Edit metadata").click();
- H.waitForLoaderToBeRemoved();
+ H.openQuestionActions();
+ H.popover().findByText("Edit metadata").click();
+ H.waitForLoaderToBeRemoved();
- reorderTaxAndTotalColumns();
- assertNoError();
+ reorderTaxAndTotalColumns();
+ assertNoError();
- cy.findByTestId("editor-tabs-query-name").click();
- assertNoError();
- });
+ cy.findByTestId("editor-tabs-query-name").click();
+ assertNoError();
+ },
+ );
});
describe("issues 25884 and 34349", () => {
@@ -977,20 +981,26 @@ describe("issue 39993", () => {
cy.intercept("PUT", "/api/card/*").as("updateModel");
});
- it("should preserve viz settings for models with custom expressions (metabase#39993)", () => {
- H.createQuestion(modelDetails).then(({ body: card }) =>
- H.visitModel(card.id),
- );
- H.openQuestionActions();
- H.popover().findByText("Edit metadata").click();
- H.waitForLoaderToBeRemoved();
- cy.log("drag & drop the custom column 100 px to the left");
- H.moveDnDKitElement(H.tableHeaderColumn(columnName), { horizontal: -100 });
- cy.button("Save changes").click();
- cy.wait("@updateModel");
- cy.findAllByTestId("header-cell").eq(0).should("have.text", "Exp");
- cy.findAllByTestId("header-cell").eq(1).should("have.text", "ID");
- });
+ it(
+ "should preserve viz settings for models with custom expressions (metabase#39993)",
+ { tags: "@flaky" },
+ () => {
+ H.createQuestion(modelDetails).then(({ body: card }) =>
+ H.visitModel(card.id),
+ );
+ H.openQuestionActions();
+ H.popover().findByText("Edit metadata").click();
+ H.waitForLoaderToBeRemoved();
+ cy.log("drag & drop the custom column 100 px to the left");
+ H.moveDnDKitElement(H.tableHeaderColumn(columnName), {
+ horizontal: -100,
+ });
+ cy.button("Save changes").click();
+ cy.wait("@updateModel");
+ cy.findAllByTestId("header-cell").eq(0).should("have.text", "Exp");
+ cy.findAllByTestId("header-cell").eq(1).should("have.text", "ID");
+ },
+ );
});
describe("issue 34574", () => {
@@ -1154,36 +1164,40 @@ describe("issue 36161", () => {
cy.intercept("POST", "/api/dataset").as("dataset");
});
- it("should allow to override metadata for custom columns (metabase#36161)", () => {
- H.visitModel(ORDERS_MODEL_ID);
- cy.wait("@dataset");
-
- H.openQuestionActions("Edit query definition");
- H.getNotebookStep("data").button("Pick columns").click();
- H.popover().findByText("Select all").click();
- H.getNotebookStep("data").button("Custom column").click();
- H.enterCustomColumnDetails({ formula: "[ID]", name: "ID2" });
- H.popover().button("Done").click();
- H.getNotebookStep("expression").icon("add").click();
- H.enterCustomColumnDetails({ formula: "[ID]", name: "ID3" });
- H.popover().button("Done").click();
- H.runButtonOverlay().click();
- cy.wait("@dataset");
- cy.findByTestId("editor-tabs-columns-name").click();
- H.openColumnOptions("ID2");
- H.renameColumn("ID2", "ID2 custom");
- H.openColumnOptions("ID3");
- H.renameColumn("ID3", "ID3 custom");
- H.saveMetadataChanges();
+ it(
+ "should allow to override metadata for custom columns (metabase#36161)",
+ { tags: "@flaky" },
+ () => {
+ H.visitModel(ORDERS_MODEL_ID);
+ cy.wait("@dataset");
- H.openNotebook();
- H.getNotebookStep("data").button("Filter").click();
- H.popover().within(() => {
- cy.findByText("ID").should("be.visible");
- cy.findByText("ID2 custom").should("be.visible");
- cy.findByText("ID3 custom").should("be.visible");
- });
- });
+ H.openQuestionActions("Edit query definition");
+ H.getNotebookStep("data").button("Pick columns").click();
+ H.popover().findByText("Select all").click();
+ H.getNotebookStep("data").button("Custom column").click();
+ H.enterCustomColumnDetails({ formula: "[ID]", name: "ID2" });
+ H.popover().button("Done").click();
+ H.getNotebookStep("expression").icon("add").click();
+ H.enterCustomColumnDetails({ formula: "[ID]", name: "ID3" });
+ H.popover().button("Done").click();
+ H.runButtonOverlay().click();
+ cy.wait("@dataset");
+ cy.findByTestId("editor-tabs-columns-name").click();
+ H.openColumnOptions("ID2");
+ H.renameColumn("ID2", "ID2 custom");
+ H.openColumnOptions("ID3");
+ H.renameColumn("ID3", "ID3 custom");
+ H.saveMetadataChanges();
+
+ H.openNotebook();
+ H.getNotebookStep("data").button("Filter").click();
+ H.popover().within(() => {
+ cy.findByText("ID").should("be.visible");
+ cy.findByText("ID2 custom").should("be.visible");
+ cy.findByText("ID3 custom").should("be.visible");
+ });
+ },
+ );
});
describe("issue 34514", () => {
diff --git a/e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts b/e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts
index eb688d692a0..a5098604151 100644
--- a/e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts
+++ b/e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts
@@ -75,195 +75,201 @@ H.describeWithSnowplowEE("scenarios > setup embedding (EMB-477)", () => {
.should("be.visible");
});
- it("[cloud-hosted] should allow users to go through the embedding setup and onboarding flow", () => {
- // mock `is-hosted`, we can't set the token before the user is created, we'll set it right after that
- H.activateToken("pro-cloud");
+ it(
+ "[cloud-hosted] should allow users to go through the embedding setup and onboarding flow",
+ { tags: "@flaky" },
+ () => {
+ // mock `is-hosted`, we can't set the token before the user is created, we'll set it right after that
+ H.activateToken("pro-cloud");
- mockCloudHosted();
+ mockCloudHosted();
- cy.visit(
- "/setup/embedding?first_name=Firstname&last_name=Lastname&[email protected]&site_name=Epic Team",
- );
-
- cy.log("0: Welcome step");
- assertEmbeddingOnboardingPageLoaded();
-
- H.expectUnstructuredSnowplowEvent({
- event: "embedding_setup_step_seen",
- event_detail: "welcome",
- });
-
- step().within(() => {
- cy.findByText(
- /Let's get you up and running with a starting setup for embedded analytics/,
- ).should("be.visible");
- cy.button("Start").should("be.visible").click();
- });
-
- cy.log("1: User creation step");
- sidebar().within(() => {
- cy.findByRole("listitem", { current: "step" }).should(
- "have.text",
- "Set up your account",
- );
- });
- step().within(() => {
- cy.findByRole("heading", { name: "What should we call you?" }).should(
- "be.visible",
+ cy.visit(
+ "/setup/embedding?first_name=Firstname&last_name=Lastname&[email protected]&site_name=Epic Team",
);
+ cy.log("0: Welcome step");
+ assertEmbeddingOnboardingPageLoaded();
+
H.expectUnstructuredSnowplowEvent({
event: "embedding_setup_step_seen",
- event_detail: "user-creation",
+ event_detail: "welcome",
});
- cy.findByLabelText("First name").should("have.value", "Firstname");
- cy.findByLabelText("Last name").should("have.value", "Lastname");
- cy.findByLabelText("Email").should("have.value", "[email protected]");
- cy.findByLabelText("Company or team name").should(
- "have.value",
- "Epic Team",
- );
-
- fillOutUserForm();
+ step().within(() => {
+ cy.findByText(
+ /Let's get you up and running with a starting setup for embedded analytics/,
+ ).should("be.visible");
+ cy.button("Start").should("be.visible").click();
+ });
- cy.intercept("POST", "/api/setup").as("setup");
- cy.button("Next").should("be.enabled").click();
- });
+ cy.log("1: User creation step");
+ sidebar().within(() => {
+ cy.findByRole("listitem", { current: "step" }).should(
+ "have.text",
+ "Set up your account",
+ );
+ });
+ step().within(() => {
+ cy.findByRole("heading", { name: "What should we call you?" }).should(
+ "be.visible",
+ );
+
+ H.expectUnstructuredSnowplowEvent({
+ event: "embedding_setup_step_seen",
+ event_detail: "user-creation",
+ });
- cy.log(
- "Now we have a user we simulate being on cloud by setting a Metatabase Token",
- );
- cy.wait("@setup");
+ cy.findByLabelText("First name").should("have.value", "Firstname");
+ cy.findByLabelText("Last name").should("have.value", "Lastname");
+ cy.findByLabelText("Email").should("have.value", "[email protected]");
+ cy.findByLabelText("Company or team name").should(
+ "have.value",
+ "Epic Team",
+ );
- // set a real token so we have real token-features for the rest of the flow
- H.activateToken("pro-cloud");
+ fillOutUserForm();
- cy.log("2: Data connection step");
- sidebar().within(() => {
- cy.findByRole("listitem", { current: "step" }).should(
- "have.text",
- "Connect to your data",
- );
- });
- step().within(() => {
- cy.findByRole("heading", { name: "Connect to your data" }).should(
- "be.visible",
- );
-
- cy.findByRole("option", { name: "PostgreSQL" }).click();
- fillOutDatabaseForm();
-
- cy.log("simulate database that takes some time to fully sync");
- const NO_OF_MIN_RETRY = 4;
- let currentRetry = 0;
- cy.intercept("GET", "api/database", (req) => {
- req.on("response", (res) => {
- currentRetry++;
- const [postgresDb] = res.body.data;
- if (
- postgresDb.initial_sync_status !== "complete" ||
- currentRetry < NO_OF_MIN_RETRY
- ) {
- // Simulate syncing not complete until we reach a certain number of retries
- postgresDb.initial_sync_status = "incomplete";
- }
- });
+ cy.intercept("POST", "/api/setup").as("setup");
+ cy.button("Next").should("be.enabled").click();
});
- cy.button("Connect database").should("be.enabled").click();
- });
- cy.log("3: Content generation step");
- sidebar().within(() => {
- cy.findByRole("listitem", { current: "step" }).should(
- "have.text",
- "Generate starter content",
+ cy.log(
+ "Now we have a user we simulate being on cloud by setting a Metatabase Token",
);
- });
+ cy.wait("@setup");
- const SECOND = 1000;
- // Waiting for the database sync to complete
- step()
- .findByRole("heading", {
- name: "Select Tables to Embed",
- timeout: 10 * SECOND,
- })
- .should("be.visible");
-
- expectNoDatabaseStatus();
-
- step().within(() => {
- cy.findByRole("checkbox", { name: "feedback" })
- .should("be.enabled")
- .check();
- cy.findByRole("checkbox", { name: "orders" })
- .should("be.enabled")
- .check();
- cy.findByRole("checkbox", { name: "products" })
- .should("be.enabled")
- .check();
-
- cy.button("Continue").should("be.enabled").click();
- });
+ // set a real token so we have real token-features for the rest of the flow
+ H.activateToken("pro-cloud");
- cy.log("4: Processing step");
+ cy.log("2: Data connection step");
+ sidebar().within(() => {
+ cy.findByRole("listitem", { current: "step" }).should(
+ "have.text",
+ "Connect to your data",
+ );
+ });
+ step().within(() => {
+ cy.findByRole("heading", { name: "Connect to your data" }).should(
+ "be.visible",
+ );
+
+ cy.findByRole("option", { name: "PostgreSQL" }).click();
+ fillOutDatabaseForm();
+
+ cy.log("simulate database that takes some time to fully sync");
+ const NO_OF_MIN_RETRY = 4;
+ let currentRetry = 0;
+ cy.intercept("GET", "api/database", (req) => {
+ req.on("response", (res) => {
+ currentRetry++;
+ const [postgresDb] = res.body.data;
+ if (
+ postgresDb.initial_sync_status !== "complete" ||
+ currentRetry < NO_OF_MIN_RETRY
+ ) {
+ // Simulate syncing not complete until we reach a certain number of retries
+ postgresDb.initial_sync_status = "incomplete";
+ }
+ });
+ });
+ cy.button("Connect database").should("be.enabled").click();
+ });
- step().within(() => {
- cy.findByRole("heading", { name: "Setting Up Your Analytics" }).should(
- "be.visible",
- );
- /**
- * Since this loader will go away automatically it's crucial to wait for it to go away
- * before start asserting the next steps.
- */
- cy.findByText("Creating dashboards...").should("not.exist");
- });
+ cy.log("3: Content generation step");
+ sidebar().within(() => {
+ cy.findByRole("listitem", { current: "step" }).should(
+ "have.text",
+ "Generate starter content",
+ );
+ });
- cy.log("5: Embed in your app step");
- sidebar().within(() => {
- cy.findByRole("listitem", { current: "step" }).should(
- "have.text",
- "Add to your app",
- );
- });
+ const SECOND = 1000;
+ // Waiting for the database sync to complete
+ step()
+ .findByRole("heading", {
+ name: "Select Tables to Embed",
+ timeout: 10 * SECOND,
+ })
+ .should("be.visible");
+
+ expectNoDatabaseStatus();
+
+ step().within(() => {
+ cy.findByRole("checkbox", { name: "feedback" })
+ .should("be.enabled")
+ .check();
+ cy.findByRole("checkbox", { name: "orders" })
+ .should("be.enabled")
+ .check();
+ cy.findByRole("checkbox", { name: "products" })
+ .should("be.enabled")
+ .check();
+
+ cy.button("Continue").should("be.enabled").click();
+ });
- step().within(() => {
- cy.findByRole("heading", { name: "Add to your app" }).should(
- "be.visible",
- );
- cy.findByRole("tab", { name: 'A look at "Feedback"' }).click();
- H.getIframeBody().within(() => {
- cy.findByText('A look at "Feedback"').should("be.visible");
+ cy.log("4: Processing step");
+
+ step().within(() => {
+ cy.findByRole("heading", { name: "Setting Up Your Analytics" }).should(
+ "be.visible",
+ );
+ /**
+ * Since this loader will go away automatically it's crucial to wait for it to go away
+ * before start asserting the next steps.
+ */
+ cy.findByText("Creating dashboards...").should("not.exist");
});
- cy.findByRole("code").contains(
- new RegExp(
- `<iframe src="${Cypress.config("baseUrl")}/dashboard/\\d+" width="800px" height="500px" />`,
- ),
- );
- cy.button("I see Metabase").click();
+ cy.log("5: Embed in your app step");
+ sidebar().within(() => {
+ cy.findByRole("listitem", { current: "step" }).should(
+ "have.text",
+ "Add to your app",
+ );
+ });
- cy.findByRole("heading", { name: "You're on your way!" }).should(
- "be.visible",
- );
- cy.findByRole("link", { name: "Take me to Metabase" }).click();
- });
+ step().within(() => {
+ cy.findByRole("heading", { name: "Add to your app" }).should(
+ "be.visible",
+ );
+ cy.findByRole("tab", { name: 'A look at "Feedback"' }).click();
+ H.getIframeBody().within(() => {
+ cy.findByText('A look at "Feedback"').should("be.visible");
+ });
+ cy.findByRole("code").contains(
+ new RegExp(
+ `<iframe src="${Cypress.config("baseUrl")}/dashboard/\\d+" width="800px" height="500px" />`,
+ ),
+ );
+
+ cy.button("I see Metabase").click();
+
+ cy.findByRole("heading", { name: "You're on your way!" }).should(
+ "be.visible",
+ );
+ cy.findByRole("link", { name: "Take me to Metabase" }).click();
+ });
- cy.log("5: Metabase");
- cy.button("New").should("be.visible");
+ cy.log("5: Metabase");
+ cy.button("New").should("be.visible");
- cy.log(
- "Only one 'Automatically Generated Dashboards' collection should be created",
- );
- sidebar().within(() => {
- cy.findByText("Automatically Generated Dashboards").should("be.visible");
- cy.findByText("Automatically Generated Dashboards").should(
- "have.length",
- 1,
+ cy.log(
+ "Only one 'Automatically Generated Dashboards' collection should be created",
);
- });
- expectNoDatabaseStatus();
- });
+ sidebar().within(() => {
+ cy.findByText("Automatically Generated Dashboards").should(
+ "be.visible",
+ );
+ cy.findByText("Automatically Generated Dashboards").should(
+ "have.length",
+ 1,
+ );
+ });
+ expectNoDatabaseStatus();
+ },
+ );
});
/**
diff --git a/e2e/test/scenarios/permissions/admin-permissions.cy.spec.js b/e2e/test/scenarios/permissions/admin-permissions.cy.spec.js
index 711de338954..2b2f97de7bf 100644
--- a/e2e/test/scenarios/permissions/admin-permissions.cy.spec.js
+++ b/e2e/test/scenarios/permissions/admin-permissions.cy.spec.js
@@ -310,7 +310,7 @@ describe("scenarios > admin > permissions", { tags: "@OSS" }, () => {
});
context("group focused view", () => {
- it("shows filterable list of groups", () => {
+ it("shows filterable list of groups", { tags: "@flaky" }, () => {
cy.visit("/admin/permissions");
// no groups selected initially and it shows an empty state
diff --git a/e2e/test/scenarios/permissions/sandboxing/sandboxing-via-ui.cy.spec.ts b/e2e/test/scenarios/permissions/sandboxing/sandboxing-via-ui.cy.spec.ts
index 0195854a100..32171957091 100644
--- a/e2e/test/scenarios/permissions/sandboxing/sandboxing-via-ui.cy.spec.ts
+++ b/e2e/test/scenarios/permissions/sandboxing/sandboxing-via-ui.cy.spec.ts
@@ -78,12 +78,16 @@ describe(
H.restore("sandboxing-snapshot" as any);
});
- it("shows all data before sandboxing policy is applied", () => {
- signInAs(gizmoViewer);
- assertNoResultsOrValuesAreSandboxed(dashboard, sandboxableQuestions);
- signInAs(widgetViewer);
- assertNoResultsOrValuesAreSandboxed(dashboard, sandboxableQuestions);
- });
+ it(
+ "shows all data before sandboxing policy is applied",
+ { tags: "@flaky" },
+ () => {
+ signInAs(gizmoViewer);
+ assertNoResultsOrValuesAreSandboxed(dashboard, sandboxableQuestions);
+ signInAs(widgetViewer);
+ assertNoResultsOrValuesAreSandboxed(dashboard, sandboxableQuestions);
+ },
+ );
describe("we can apply a sandbox policy", () => {
beforeEach(() => {
diff --git a/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js b/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js
index 0bb4540f697..59a248492bc 100644
--- a/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js
+++ b/e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js
@@ -1955,7 +1955,7 @@ describe("issue 45063", { tags: "@flaky" }, () => {
});
});
- it("should work with models", () => {
+ it("should work with models", { tags: "@flaky" }, () => {
createGuiModel({ sourceTableId: ORDERS_ID });
verifyRemappedFilter({
visitCard: () => cy.get("@modelId").then(H.visitModel),