Skip to content

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

Increase the viewport width for a flaky "data studio" e2e tests (#67901)

Nemanja Glumac3fbd0ff00d12
diff --git a/e2e/test/scenarios/data-studio/data-model/datamodel-data-studio.cy.spec.ts b/e2e/test/scenarios/data-studio/data-model/datamodel-data-studio.cy.spec.ts
index 9f5d55dbe79..5b971f481fd 100644
--- a/e2e/test/scenarios/data-studio/data-model/datamodel-data-studio.cy.spec.ts
+++ b/e2e/test/scenarios/data-studio/data-model/datamodel-data-studio.cy.spec.ts
@@ -84,28 +84,33 @@ describe("scenarios > data studio > datamodel", () => {
);
});
- it("should show 404 if field does not exist", () => {
- H.DataModel.visitDataStudio({
- databaseId: SAMPLE_DB_ID,
- schemaId: SAMPLE_DB_SCHEMA_ID,
- tableId: ORDERS_ID,
- fieldId: 12345, // we're force navigating to a fake field id
- skipWaiting: true,
- });
- cy.wait(["@datamodel/visit/databases", "@datamodel/visit/metadata"]);
+ it(
+ "should show 404 if field does not exist",
+ // We eliminate the flakiness by removing the need to scroll horizontally
+ { viewportWidth: 1600 },
+ () => {
+ H.DataModel.visitDataStudio({
+ databaseId: SAMPLE_DB_ID,
+ schemaId: SAMPLE_DB_SCHEMA_ID,
+ tableId: ORDERS_ID,
+ fieldId: 12345, // we're force navigating to a fake field id
+ skipWaiting: true,
+ });
+ cy.wait(["@datamodel/visit/databases", "@datamodel/visit/metadata"]);
- TablePicker.getDatabases().should("have.length", 1);
- TablePicker.getTables().should("have.length", 8);
- cy.location("pathname").should(
- "eq",
- `/data-studio/data/database/${SAMPLE_DB_ID}/schema/${SAMPLE_DB_SCHEMA_ID}/table/${ORDERS_ID}/field/12345`,
- );
+ TablePicker.getDatabases().should("have.length", 1);
+ TablePicker.getTables().should("have.length", 8);
+ cy.location("pathname").should(
+ "eq",
+ `/data-studio/data/database/${SAMPLE_DB_ID}/schema/${SAMPLE_DB_SCHEMA_ID}/table/${ORDERS_ID}/field/12345`,
+ );
- H.DataModel.get().within(() => {
- cy.findByText("Field details").should("be.visible");
- cy.findByText("Not found.").should("be.visible");
- });
- });
+ H.DataModel.get().within(() => {
+ cy.findByText("Field details").should("be.visible");
+ cy.findByText("Not found.").should("be.visible");
+ });
+ },
+ );
it(
"should not show 404 error if database is not selected",
@@ -2784,9 +2789,9 @@ describe("scenarios > data studio > datamodel", () => {
cy.log("Name of the product should be displayed instead of its ID");
H.openOrdersTable();
- cy.findByRole("gridcell", { name: "Awesome Concrete Shoes" }).should(
- "be.visible",
- );
+ cy.findByRole("gridcell", {
+ name: "Awesome Concrete Shoes",
+ }).should("be.visible");
});
it("should correctly apply and display custom remapping for numeric values", () => {