From 184be523964f3e6927ff1be18e720c69129946f0 Mon Sep 17 00:00:00 2001
From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Date: Fri, 20 Aug 2021 13:37:41 +0200
Subject: [PATCH] Edit Cypress custom command `cy.createDashboard()` (#17521)

* Update `dashboard` custom Cypress command

* Update composite custom commands to accommodate new syntax

* Update tests that use `cy.createDashboard()` custom command

* Update default snapshot generator
---
 .../createNativeQuestionAndDashboard.js       |   4 +-
 .../composite/createQuestionAndDashboard.js   |   4 +-
 .../__support__/e2e/commands/api/dashboard.js |  10 +-
 .../scenarios/admin/audit/auditing.cy.spec.js |   2 +-
 .../collection-items-listing.cy.spec.js       |  12 +-
 .../collections/collection-types.cy.spec.js   |   7 +-
 .../collections/collections.cy.spec.js        |   6 +-
 .../collections/permissions.cy.spec.js        |   2 +-
 .../dashboard-filters/parameters.cy.spec.js   |   6 +-
 .../dashboard/chained-filters.cy.spec.js      |  94 ++++----
 .../dashboard/click-behavior.cy.spec.js       |   2 +-
 .../dashboard/dashboard-drill.cy.spec.js      |  82 +++----
 .../scenarios/dashboard/dashboard.cy.spec.js  |   6 +-
 .../dashboard/dashboard_local-only.cy.spec.js |   2 +-
 .../dashboard/permissions.cy.spec.js          |   2 +-
 .../scenarios/dashboard/text-box.cy.spec.js   |  12 +-
 .../reproductions/15163.cy.spec.js            |   4 +-
 .../scenarios/question/filter.cy.spec.js      | 211 +++++++++--------
 .../scenarios/question/nested.cy.spec.js      |   2 +-
 .../scenarios/question/nulls.cy.spec.js       | 100 ++++----
 .../scenarios/question/view.cy.spec.js        |   2 +-
 .../sharing/subscriptions.cy.spec.js          |  82 +++----
 .../drillthroughs/chart_drill.cy.spec.js      | 214 +++++++++---------
 .../drillthroughs/dash_drill.cy.spec.js       | 128 ++++++-----
 .../visualizations/line_chart.cy.spec.js      |   4 +-
 .../visualizations/pivot_tables.cy.spec.js    |   4 +-
 .../visualizations/scalar.cy.spec.js          |   4 +-
 .../test/snapshot-creators/default.cy.snap.js |   2 +-
 28 files changed, 509 insertions(+), 501 deletions(-)

diff --git a/frontend/test/__support__/e2e/commands/api/composite/createNativeQuestionAndDashboard.js b/frontend/test/__support__/e2e/commands/api/composite/createNativeQuestionAndDashboard.js
index ef37ad49cab..8c23032c877 100644
--- a/frontend/test/__support__/e2e/commands/api/composite/createNativeQuestionAndDashboard.js
+++ b/frontend/test/__support__/e2e/commands/api/composite/createNativeQuestionAndDashboard.js
@@ -1,9 +1,9 @@
 Cypress.Commands.add(
   "createNativeQuestionAndDashboard",
-  ({ questionDetails, dashboardName = "Custom dashboard" } = {}) => {
+  ({ questionDetails, dashboardDetails } = {}) => {
     cy.createNativeQuestion(questionDetails).then(
       ({ body: { id: questionId } }) => {
-        cy.createDashboard(dashboardName).then(
+        cy.createDashboard(dashboardDetails).then(
           ({ body: { id: dashboardId } }) => {
             cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
               cardId: questionId,
diff --git a/frontend/test/__support__/e2e/commands/api/composite/createQuestionAndDashboard.js b/frontend/test/__support__/e2e/commands/api/composite/createQuestionAndDashboard.js
index 78dfe145e0c..6564a9648ad 100644
--- a/frontend/test/__support__/e2e/commands/api/composite/createQuestionAndDashboard.js
+++ b/frontend/test/__support__/e2e/commands/api/composite/createQuestionAndDashboard.js
@@ -1,8 +1,8 @@
 Cypress.Commands.add(
   "createQuestionAndDashboard",
-  ({ questionDetails, dashboardName = "Custom dashboard" } = {}) => {
+  ({ questionDetails, dashboardDetails } = {}) => {
     cy.createQuestion(questionDetails).then(({ body: { id: questionId } }) => {
-      cy.createDashboard(dashboardName).then(
+      cy.createDashboard(dashboardDetails).then(
         ({ body: { id: dashboardId } }) => {
           cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
             cardId: questionId,
diff --git a/frontend/test/__support__/e2e/commands/api/dashboard.js b/frontend/test/__support__/e2e/commands/api/dashboard.js
index d696beb0b9d..232f4b578a9 100644
--- a/frontend/test/__support__/e2e/commands/api/dashboard.js
+++ b/frontend/test/__support__/e2e/commands/api/dashboard.js
@@ -1,11 +1,9 @@
 Cypress.Commands.add(
   "createDashboard",
-  (name, { collection_position = null, collection_id = null } = {}) => {
+  ({ name = "Test Dashboard", ...dashboardDetails } = {}) => {
     cy.log(`Create a dashboard: ${name}`);
-    cy.request("POST", "/api/dashboard", {
-      name,
-      collection_position,
-      collection_id,
-    });
+
+    // For all the possible keys, refer to `src/metabase/api/dashboard.clj`
+    cy.request("POST", "/api/dashboard", { name, ...dashboardDetails });
   },
 );
diff --git a/frontend/test/metabase/scenarios/admin/audit/auditing.cy.spec.js b/frontend/test/metabase/scenarios/admin/audit/auditing.cy.spec.js
index e895e9897b3..7bb27f004c2 100644
--- a/frontend/test/metabase/scenarios/admin/audit/auditing.cy.spec.js
+++ b/frontend/test/metabase/scenarios/admin/audit/auditing.cy.spec.js
@@ -29,7 +29,7 @@ function generateQuestions(user) {
 }
 
 function generateDashboards(user) {
-  cy.createDashboard(`${user} dashboard`);
+  cy.createDashboard({ name: `${user} dashboard` });
 }
 
 describeWithToken("audit > auditing", () => {
diff --git a/frontend/test/metabase/scenarios/collections/collection-items-listing.cy.spec.js b/frontend/test/metabase/scenarios/collections/collection-items-listing.cy.spec.js
index c1ac174dbc0..88be8011305 100644
--- a/frontend/test/metabase/scenarios/collections/collection-items-listing.cy.spec.js
+++ b/frontend/test/metabase/scenarios/collections/collection-items-listing.cy.spec.js
@@ -37,7 +37,9 @@ describe("scenarios > collection items listing", () => {
         });
       });
 
-      _.times(ADDED_DASHBOARDS, i => cy.createDashboard(`dashboard ${i}`));
+      _.times(ADDED_DASHBOARDS, i =>
+        cy.createDashboard({ name: `dashboard ${i}` }),
+      );
       _.times(ADDED_QUESTIONS, i =>
         cy.createQuestion({
           name: `generated question ${i}`,
@@ -99,7 +101,8 @@ describe("scenarios > collection items listing", () => {
 
       it(testName, () => {
         ["A", "B", "C"].forEach((letter, i) => {
-          cy.createDashboard(`${letter} Dashboard`, {
+          cy.createDashboard({
+            name: `${letter} Dashboard`,
             collection_position: pinned ? i + 1 : null,
           });
 
@@ -213,9 +216,10 @@ describe("scenarios > collection items listing", () => {
 
     it("should allow to separately sort pinned and not pinned items", () => {
       ["A", "B", "C"].forEach((letter, i) => {
-        cy.createDashboard(`${letter} Dashboard`);
+        cy.createDashboard({ name: `${letter} Dashboard` });
 
-        cy.createDashboard(`${letter} Dashboard (pinned)`, {
+        cy.createDashboard({
+          name: `${letter} Dashboard (pinned)`,
           collection_position: i + 1,
         });
 
diff --git a/frontend/test/metabase/scenarios/collections/collection-types.cy.spec.js b/frontend/test/metabase/scenarios/collections/collection-types.cy.spec.js
index 37df198762f..fbb51f46ee7 100644
--- a/frontend/test/metabase/scenarios/collections/collection-types.cy.spec.js
+++ b/frontend/test/metabase/scenarios/collections/collection-types.cy.spec.js
@@ -188,7 +188,10 @@ function testOfficialBadgePresence(expectBadge = true) {
       collection_id: collectionId,
       query: TEST_QUESTION_QUERY,
     });
-    cy.createDashboard("Official Dashboard", { collection_id: collectionId });
+    cy.createDashboard({
+      name: "Official Dashboard",
+      collection_id: collectionId,
+    });
     cy.visit(`/collection/${collectionId}`);
   });
 
@@ -247,7 +250,7 @@ function testOfficialQuestionBadgeInRegularDashboard(expectBadge = true) {
         collection_id: collectionId,
         query: TEST_QUESTION_QUERY,
       },
-      dashboardName: "Regular Dashboard",
+      dashboardDetails: { name: "Regular Dashboard" },
     });
   });
 
diff --git a/frontend/test/metabase/scenarios/collections/collections.cy.spec.js b/frontend/test/metabase/scenarios/collections/collections.cy.spec.js
index a1bfbcdfe68..d23493689e0 100644
--- a/frontend/test/metabase/scenarios/collections/collections.cy.spec.js
+++ b/frontend/test/metabase/scenarios/collections/collections.cy.spec.js
@@ -205,7 +205,7 @@ describe("scenarios > collection_defaults", () => {
     describe("a new dashboard", () => {
       it("should be in the root collection", () => {
         // Make new dashboard and check collection name
-        cy.createDashboard(dashboard_name);
+        cy.createDashboard({ name: dashboard_name });
 
         cy.visit("/collection/root");
         cy.findByText(dashboard_name);
@@ -240,7 +240,7 @@ describe("scenarios > collection_defaults", () => {
     describe("a new dashboard", () => {
       it("should be in the root collection", () => {
         // Make new dashboard and check collection name
-        cy.createDashboard(dashboard_name);
+        cy.createDashboard({ name: dashboard_name });
 
         cy.visit("/collection/root");
         cy.findByText(dashboard_name);
@@ -600,7 +600,7 @@ describe("scenarios > collection_defaults", () => {
     it("collections list on the home page shouldn't depend on the name of the first 50 objects (metabase#16784)", () => {
       // Although there are already some objects in the default snapshot (3 questions, 1 dashboard, 3 collections),
       // let's create 50 more dashboards with the letter of alphabet `D` coming before the first letter of the existing collection `F`.
-      _.times(50, i => cy.createDashboard(`Dashboard ${i}`));
+      _.times(50, i => cy.createDashboard({ name: `Dashboard ${i}` }));
 
       cy.visit("/");
       // There is already a collection named "First collection" in the default snapshot
diff --git a/frontend/test/metabase/scenarios/collections/permissions.cy.spec.js b/frontend/test/metabase/scenarios/collections/permissions.cy.spec.js
index 52294cee839..ddb64f8917b 100644
--- a/frontend/test/metabase/scenarios/collections/permissions.cy.spec.js
+++ b/frontend/test/metabase/scenarios/collections/permissions.cy.spec.js
@@ -595,7 +595,7 @@ describe("collection permissions", () => {
 
       it("shouldn't render revision history steps when there was no diff (metabase#1926)", () => {
         cy.signInAsAdmin();
-        cy.createDashboard("foo").then(({ body }) => {
+        cy.createDashboard().then(({ body }) => {
           visitAndEditDashboard(body.id);
         });
 
diff --git a/frontend/test/metabase/scenarios/dashboard-filters/parameters.cy.spec.js b/frontend/test/metabase/scenarios/dashboard-filters/parameters.cy.spec.js
index 5723236b240..3cdd1b0e693 100644
--- a/frontend/test/metabase/scenarios/dashboard-filters/parameters.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard-filters/parameters.cy.spec.js
@@ -57,7 +57,7 @@ describe("scenarios > dashboard > parameters", () => {
   });
 
   it("should search across multiple fields", () => {
-    cy.createDashboard("my dash");
+    cy.createDashboard({ name: "my dash" });
 
     cy.visit("/collection/root");
     cy.findByText("my dash").click();
@@ -117,7 +117,7 @@ describe("scenarios > dashboard > parameters", () => {
   });
 
   it("should query with a 2 argument parameter", () => {
-    cy.createDashboard("my dash");
+    cy.createDashboard({ name: "my dash" });
 
     cy.visit("/collection/root");
     cy.findByText("my dash").click();
@@ -363,7 +363,7 @@ describe("scenarios > dashboard > parameters", () => {
       },
       display: "scalar",
     }).then(({ body: { id: card_id } }) => {
-      cy.createDashboard("16181D").then(({ body: { id: dashboard_id } }) => {
+      cy.createDashboard().then(({ body: { id: dashboard_id } }) => {
         // Add previously created question to the dashboard
         cy.request("POST", `/api/dashboard/${dashboard_id}/cards`, {
           cardId: card_id,
diff --git a/frontend/test/metabase/scenarios/dashboard/chained-filters.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/chained-filters.cy.spec.js
index 8084671e9e6..b95bd70013e 100644
--- a/frontend/test/metabase/scenarios/dashboard/chained-filters.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/chained-filters.cy.spec.js
@@ -59,56 +59,58 @@ function createQuestion(options, callback) {
 // Once created, add the provided questionId to the dashboard and then
 // map the city/state filters to the template-tags in the native query.
 function createDashboard({ dashboardName, questionId }, callback) {
-  cy.createDashboard(dashboardName).then(({ body: { id: dashboardId } }) => {
-    cy.request("PUT", `/api/dashboard/${dashboardId}`, {
-      parameters: [
-        {
-          name: "State",
-          slug: "state",
-          id: "e8f79be9",
-          type: "location/state",
-        },
-        {
-          name: "City",
-          slug: "city",
-          id: "170b8e99",
-          type: "location/city",
-          filteringParameters: ["e8f79be9"],
-        },
-      ],
-    });
-
-    cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
-      cardId: questionId,
-    }).then(({ body: { id: dashCardId } }) => {
-      cy.request("PUT", `/api/dashboard/${dashboardId}/cards`, {
-        cards: [
+  cy.createDashboard({ name: dashboardName }).then(
+    ({ body: { id: dashboardId } }) => {
+      cy.request("PUT", `/api/dashboard/${dashboardId}`, {
+        parameters: [
           {
-            id: dashCardId,
-            card_id: questionId,
-            row: 0,
-            col: 0,
-            sizeX: 10,
-            sizeY: 10,
-            parameter_mappings: [
-              {
-                parameter_id: "e8f79be9",
-                card_id: questionId,
-                target: ["dimension", ["template-tag", "state"]],
-              },
-              {
-                parameter_id: "170b8e99",
-                card_id: questionId,
-                target: ["dimension", ["template-tag", "city"]],
-              },
-            ],
+            name: "State",
+            slug: "state",
+            id: "e8f79be9",
+            type: "location/state",
+          },
+          {
+            name: "City",
+            slug: "city",
+            id: "170b8e99",
+            type: "location/city",
+            filteringParameters: ["e8f79be9"],
           },
         ],
       });
 
-      callback(dashboardId);
-    });
-  });
+      cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
+        cardId: questionId,
+      }).then(({ body: { id: dashCardId } }) => {
+        cy.request("PUT", `/api/dashboard/${dashboardId}/cards`, {
+          cards: [
+            {
+              id: dashCardId,
+              card_id: questionId,
+              row: 0,
+              col: 0,
+              sizeX: 10,
+              sizeY: 10,
+              parameter_mappings: [
+                {
+                  parameter_id: "e8f79be9",
+                  card_id: questionId,
+                  target: ["dimension", ["template-tag", "state"]],
+                },
+                {
+                  parameter_id: "170b8e99",
+                  card_id: questionId,
+                  target: ["dimension", ["template-tag", "city"]],
+                },
+              ],
+            },
+          ],
+        });
+
+        callback(dashboardId);
+      });
+    },
+  );
 }
 
 describe("scenarios > dashboard > chained filter", () => {
@@ -264,7 +266,7 @@ describe("scenarios > dashboard > chained filter", () => {
       name: "15170",
       query: { "source-table": PRODUCTS_ID },
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("15170D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         // Add filter to the dashboard
         cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
           parameters: [
diff --git a/frontend/test/metabase/scenarios/dashboard/click-behavior.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/click-behavior.cy.spec.js
index 8c3cac35bf7..d9bfdd15622 100644
--- a/frontend/test/metabase/scenarios/dashboard/click-behavior.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/click-behavior.cy.spec.js
@@ -25,7 +25,7 @@ describe("scenarios > dashboard > dashboard cards > click behavior", () => {
     }).then(({ body: { id: question1Id } }) => {
       cy.createNativeQuestion({ native: { query: "select 0" } }).then(
         ({ body: { id: nativeId } }) => {
-          cy.createDashboard("15993D").then(({ body: { id: dashboardId } }) => {
+          cy.createDashboard().then(({ body: { id: dashboardId } }) => {
             // Add native question to the dashboard
             cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
               cardId: nativeId,
diff --git a/frontend/test/metabase/scenarios/dashboard/dashboard-drill.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/dashboard-drill.cy.spec.js
index 1d98e9bb387..7229ca8effa 100644
--- a/frontend/test/metabase/scenarios/dashboard/dashboard-drill.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/dashboard-drill.cy.spec.js
@@ -71,7 +71,7 @@ describe("scenarios > dashboard > dashboard drill", () => {
       "13927",
       `SELECT PEOPLE.STATE, PEOPLE.CITY from PEOPLE;`,
     ).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("13927D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         cy.log("Add question to the dashboard");
 
         cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
@@ -407,7 +407,7 @@ describe("scenarios > dashboard > dashboard drill", () => {
       },
       display: "bar",
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("13785D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         cy.log("Add filter to the dashboard");
 
         cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
@@ -531,7 +531,7 @@ describe("scenarios > dashboard > dashboard drill", () => {
       name: "14919",
       query: { "source-table": PRODUCTS_ID },
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("14919D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         // Add previously added question to the dashboard
         cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
           cardId: QUESTION_ID,
@@ -605,7 +605,7 @@ describe("scenarios > dashboard > dashboard drill", () => {
         ],
       },
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("15331D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         // Add filter to the dashboard
         cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
           parameters: [
@@ -687,7 +687,7 @@ describe("scenarios > dashboard > dashboard drill", () => {
           "graph.metrics": ["VALUE"],
         },
       }).then(({ body: { id: QUESTION2_ID } }) => {
-        cy.createDashboard("15612D").then(({ body: { id: DASHBOARD_ID } }) => {
+        cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
           // Add the first question to the dashboard
           cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
             cardId: QUESTION1_ID,
@@ -752,7 +752,7 @@ describe("scenarios > dashboard > dashboard drill", () => {
         ],
       },
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("13289D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         // Add question to the dashboard
         cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
           cardId: QUESTION_ID,
@@ -919,45 +919,47 @@ function createDashboard(
   { dashboardName = "dashboard", questionId, visualization_settings },
   callback,
 ) {
-  cy.createDashboard(dashboardName).then(({ body: { id: dashboardId } }) => {
-    cy.request("PUT", `/api/dashboard/${dashboardId}`, {
-      parameters: [
-        {
-          name: "My Param",
-          slug: "my_param",
-          id: "e8f79be9",
-          type: "category",
-        },
-      ],
-    });
-
-    cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
-      cardId: questionId,
-    }).then(({ body: { id: dashCardId } }) => {
-      cy.request("PUT", `/api/dashboard/${dashboardId}/cards`, {
-        cards: [
+  cy.createDashboard({ name: dashboardName }).then(
+    ({ body: { id: dashboardId } }) => {
+      cy.request("PUT", `/api/dashboard/${dashboardId}`, {
+        parameters: [
           {
-            id: dashCardId,
-            card_id: questionId,
-            row: 0,
-            col: 0,
-            sizeX: 6,
-            sizeY: 6,
-            parameter_mappings: [
-              {
-                parameter_id: "e8f79be9",
-                card_id: questionId,
-                target: ["dimension", ["field", 22, { "source-field": 11 }]],
-              },
-            ],
-            visualization_settings,
+            name: "My Param",
+            slug: "my_param",
+            id: "e8f79be9",
+            type: "category",
           },
         ],
       });
 
-      callback(dashboardId);
-    });
-  });
+      cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
+        cardId: questionId,
+      }).then(({ body: { id: dashCardId } }) => {
+        cy.request("PUT", `/api/dashboard/${dashboardId}/cards`, {
+          cards: [
+            {
+              id: dashCardId,
+              card_id: questionId,
+              row: 0,
+              col: 0,
+              sizeX: 6,
+              sizeY: 6,
+              parameter_mappings: [
+                {
+                  parameter_id: "e8f79be9",
+                  card_id: questionId,
+                  target: ["dimension", ["field", 22, { "source-field": 11 }]],
+                },
+              ],
+              visualization_settings,
+            },
+          ],
+        });
+
+        callback(dashboardId);
+      });
+    },
+  );
 }
 
 function setParamValue(paramName, text) {
diff --git a/frontend/test/metabase/scenarios/dashboard/dashboard.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/dashboard.cy.spec.js
index 4d35f4a91e7..62b0d99a61d 100644
--- a/frontend/test/metabase/scenarios/dashboard/dashboard.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/dashboard.cy.spec.js
@@ -97,7 +97,7 @@ describe("scenarios > dashboard", () => {
       visualization_settings: {},
     });
 
-    cy.createDashboard("dash:11007");
+    cy.createDashboard({ name: "dash:11007" });
 
     cy.visit("/collection/root");
     // enter newly created dashboard
@@ -149,7 +149,7 @@ describe("scenarios > dashboard", () => {
       },
       display: "map",
     }).then(({ body: { id: questionId } }) => {
-      cy.createDashboard("13597D").then(({ body: { id: dashboardId } }) => {
+      cy.createDashboard().then(({ body: { id: dashboardId } }) => {
         // add filter (ID) to the dashboard
         cy.request("PUT", `/api/dashboard/${dashboardId}`, {
           parameters: [
@@ -220,7 +220,7 @@ describe("scenarios > dashboard", () => {
       name: "14473",
       native: { query: "SELECT COUNT(*) FROM PRODUCTS", "template-tags": {} },
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("14473D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         cy.log("Add 4 filters to the dashboard");
 
         cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
diff --git a/frontend/test/metabase/scenarios/dashboard/dashboard_local-only.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/dashboard_local-only.cy.spec.js
index 8b50fdd7ea0..9b69a1f61ba 100644
--- a/frontend/test/metabase/scenarios/dashboard/dashboard_local-only.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/dashboard_local-only.cy.spec.js
@@ -28,7 +28,7 @@ describe("LOCAL TESTING ONLY > dashboard", () => {
       name: "15694",
       query: { "source-table": PEOPLE_ID },
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("15694D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         // Add filter to the dashboard
         cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
           parameters: [
diff --git a/frontend/test/metabase/scenarios/dashboard/permissions.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/permissions.cy.spec.js
index 1046b26b766..668ebc0b139 100644
--- a/frontend/test/metabase/scenarios/dashboard/permissions.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/permissions.cy.spec.js
@@ -61,7 +61,7 @@ describe("scenarios > dashboard > permissions", () => {
       }).then(({ body: { id } }) => (secondQuestionId = id));
     });
 
-    cy.createDashboard("dashboard").then(({ body: { id: dashId } }) => {
+    cy.createDashboard().then(({ body: { id: dashId } }) => {
       cy.request("POST", `/api/dashboard/${dashId}/cards`, {
         cardId: firstQuestionId,
       }).then(({ body: { id: dashCardIdA } }) => {
diff --git a/frontend/test/metabase/scenarios/dashboard/text-box.cy.spec.js b/frontend/test/metabase/scenarios/dashboard/text-box.cy.spec.js
index f409c21369e..3857cdb9248 100644
--- a/frontend/test/metabase/scenarios/dashboard/text-box.cy.spec.js
+++ b/frontend/test/metabase/scenarios/dashboard/text-box.cy.spec.js
@@ -50,13 +50,15 @@ describe("scenarios > dashboard > text-box", () => {
   describe("when text-box is the only element on the dashboard", () => {
     beforeEach(() => {
       cy.server();
-      cy.createDashboard("Test Dashboard");
+      cy.createDashboard().then(({ body: { id } }) => {
+        cy.intercept("PUT", `/api/dashboard/${id}`).as("dashboardUpdated");
+
+        cy.visit(`/dashboard/${id}`);
+      });
     });
 
     // fixed in metabase#11358
     it("should load after save/refresh (metabase#12873)", () => {
-      cy.visit(`/dashboard/2`);
-
       cy.findByText("Test Dashboard");
       cy.findByText("This dashboard is looking empty.");
 
@@ -80,10 +82,6 @@ describe("scenarios > dashboard > text-box", () => {
     });
 
     it("should have a scroll bar for long text (metabase#8333)", () => {
-      cy.intercept("PUT", "/api/dashboard/2").as("dashboardUpdated");
-
-      cy.visit(`/dashboard/2`);
-
       addTextBox(
         "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
       );
diff --git a/frontend/test/metabase/scenarios/native-filters/reproductions/15163.cy.spec.js b/frontend/test/metabase/scenarios/native-filters/reproductions/15163.cy.spec.js
index bbd69a365c7..9796a41ddd9 100644
--- a/frontend/test/metabase/scenarios/native-filters/reproductions/15163.cy.spec.js
+++ b/frontend/test/metabase/scenarios/native-filters/reproductions/15163.cy.spec.js
@@ -33,7 +33,7 @@ const dashboardFilter = {
 };
 
 ["nodata+nosql", "nosql"].forEach(test => {
-  describe.skip("issue 14302", () => {
+  describe.skip("issue 15163", () => {
     beforeEach(() => {
       cy.intercept("POST", "/api/dataset").as("dataset");
 
@@ -41,7 +41,7 @@ const dashboardFilter = {
       cy.signInAsAdmin();
 
       cy.createNativeQuestion(nativeQuery).then(({ body: { id: card_id } }) => {
-        cy.createDashboard("15163D").then(({ body: { id: dashboard_id } }) => {
+        cy.createDashboard().then(({ body: { id: dashboard_id } }) => {
           cy.addFilterToDashboard({ filter: dashboardFilter, dashboard_id });
 
           // Add previously created question to the dashboard
diff --git a/frontend/test/metabase/scenarios/question/filter.cy.spec.js b/frontend/test/metabase/scenarios/question/filter.cy.spec.js
index c7d05d9a0f6..ab67a3b5b17 100644
--- a/frontend/test/metabase/scenarios/question/filter.cy.spec.js
+++ b/frontend/test/metabase/scenarios/question/filter.cy.spec.js
@@ -39,71 +39,69 @@ describe("scenarios > question > filter", () => {
           name: "Q2",
           query: { "source-table": `card__${Q1_ID}` },
         }).then(({ body: { id: Q2_ID } }) => {
-          cy.createDashboard("12985D").then(
-            ({ body: { id: DASHBOARD_ID } }) => {
-              cy.log("Add 2 filters to the dashboard");
+          cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
+            cy.log("Add 2 filters to the dashboard");
 
-              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
-                parameters: [
-                  {
-                    name: "Date Filter",
-                    slug: "date_filter",
-                    id: "78d4ba0b",
-                    type: "date/all-options",
-                  },
-                  {
-                    name: "Category",
-                    slug: "category",
-                    id: "20976cce",
-                    type: "category",
-                  },
-                ],
-              });
+            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
+              parameters: [
+                {
+                  name: "Date Filter",
+                  slug: "date_filter",
+                  id: "78d4ba0b",
+                  type: "date/all-options",
+                },
+                {
+                  name: "Category",
+                  slug: "category",
+                  id: "20976cce",
+                  type: "category",
+                },
+              ],
+            });
 
-              cy.log("Add nested card to the dashboard");
+            cy.log("Add nested card to the dashboard");
 
-              cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-                cardId: Q2_ID,
-              }).then(({ body: { id: DASH_CARD_ID } }) => {
-                cy.log("Connect dashboard filters to the nested card");
+            cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+              cardId: Q2_ID,
+            }).then(({ body: { id: DASH_CARD_ID } }) => {
+              cy.log("Connect dashboard filters to the nested card");
 
-                cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-                  cards: [
-                    {
-                      id: DASH_CARD_ID,
-                      card_id: Q2_ID,
-                      row: 0,
-                      col: 0,
-                      sizeX: 10,
-                      sizeY: 8,
-                      series: [],
-                      visualization_settings: {},
-                      // Connect both filters and to the card
-                      parameter_mappings: [
-                        {
-                          parameter_id: "78d4ba0b",
-                          card_id: Q2_ID,
-                          target: [
-                            "dimension",
-                            ["field", PRODUCTS.CREATED_AT, null],
-                          ],
-                        },
-                        {
-                          parameter_id: "20976cce",
-                          card_id: Q2_ID,
-                          target: [
-                            "dimension",
-                            ["field", PRODUCTS.CATEGORY, null],
-                          ],
-                        },
-                      ],
-                    },
-                  ],
-                });
+              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+                cards: [
+                  {
+                    id: DASH_CARD_ID,
+                    card_id: Q2_ID,
+                    row: 0,
+                    col: 0,
+                    sizeX: 10,
+                    sizeY: 8,
+                    series: [],
+                    visualization_settings: {},
+                    // Connect both filters and to the card
+                    parameter_mappings: [
+                      {
+                        parameter_id: "78d4ba0b",
+                        card_id: Q2_ID,
+                        target: [
+                          "dimension",
+                          ["field", PRODUCTS.CREATED_AT, null],
+                        ],
+                      },
+                      {
+                        parameter_id: "20976cce",
+                        card_id: Q2_ID,
+                        target: [
+                          "dimension",
+                          ["field", PRODUCTS.CATEGORY, null],
+                        ],
+                      },
+                    ],
+                  },
+                ],
               });
-              cy.visit(`/dashboard/${DASHBOARD_ID}`);
-            },
-          );
+            });
+            cy.visit(`/dashboard/${DASHBOARD_ID}`);
+          });
         });
       });
 
@@ -133,57 +131,55 @@ describe("scenarios > question > filter", () => {
           filter: [">", ["field", "count", { "base-type": "type/Integer" }], 1],
         },
       }).then(({ body: { id: QUESTION_ID } }) => {
-        cy.createDashboard("12985-v2D").then(
-          ({ body: { id: DASHBOARD_ID } }) => {
-            cy.log("Add a category filter to the dashboard");
+        cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
+          cy.log("Add a category filter to the dashboard");
 
-            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
-              parameters: [
-                {
-                  name: "Category",
-                  slug: "category",
-                  id: "7c4htcv8",
-                  type: "category",
-                },
-              ],
-            });
+          cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
+            parameters: [
+              {
+                name: "Category",
+                slug: "category",
+                id: "7c4htcv8",
+                type: "category",
+              },
+            ],
+          });
 
-            cy.log("Add previously created question to the dashboard");
+          cy.log("Add previously created question to the dashboard");
 
-            cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-              cardId: QUESTION_ID,
-            }).then(({ body: { id: DASH_CARD_ID } }) => {
-              cy.log("Connect dashboard filter to the aggregated card");
+          cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+            cardId: QUESTION_ID,
+          }).then(({ body: { id: DASH_CARD_ID } }) => {
+            cy.log("Connect dashboard filter to the aggregated card");
 
-              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-                cards: [
-                  {
-                    id: DASH_CARD_ID,
-                    card_id: QUESTION_ID,
-                    row: 0,
-                    col: 0,
-                    sizeX: 8,
-                    sizeY: 6,
-                    series: [],
-                    visualization_settings: {},
-                    // Connect filter to the card
-                    parameter_mappings: [
-                      {
-                        parameter_id: "7c4htcv8",
-                        card_id: QUESTION_ID,
-                        target: [
-                          "dimension",
-                          ["field", "CATEGORY", { "base-type": "type/Text" }],
-                        ],
-                      },
-                    ],
-                  },
-                ],
-              });
+            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+              cards: [
+                {
+                  id: DASH_CARD_ID,
+                  card_id: QUESTION_ID,
+                  row: 0,
+                  col: 0,
+                  sizeX: 8,
+                  sizeY: 6,
+                  series: [],
+                  visualization_settings: {},
+                  // Connect filter to the card
+                  parameter_mappings: [
+                    {
+                      parameter_id: "7c4htcv8",
+                      card_id: QUESTION_ID,
+                      target: [
+                        "dimension",
+                        ["field", "CATEGORY", { "base-type": "type/Text" }],
+                      ],
+                    },
+                  ],
+                },
+              ],
             });
-            cy.visit(`/dashboard/${DASHBOARD_ID}`);
-          },
-        );
+          });
+          cy.visit(`/dashboard/${DASHBOARD_ID}`);
+        });
       });
 
       cy.findByPlaceholderText("Category").click();
@@ -345,13 +341,12 @@ describe("scenarios > question > filter", () => {
       },
       display: "pie",
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("13960D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         cy.log(
           "Add filters to the dashboard and set the default value to the first one",
         );
 
         cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
-          name: "13960D",
           parameters: [
             {
               name: "Category",
diff --git a/frontend/test/metabase/scenarios/question/nested.cy.spec.js b/frontend/test/metabase/scenarios/question/nested.cy.spec.js
index a2f5463c840..aa124aa9cc2 100644
--- a/frontend/test/metabase/scenarios/question/nested.cy.spec.js
+++ b/frontend/test/metabase/scenarios/question/nested.cy.spec.js
@@ -210,7 +210,7 @@ describe("scenarios > question > nested", () => {
       },
     );
 
-    cy.createDashboard("13186D").then(({ body: { id: DASBOARD_ID } }) => {
+    cy.createDashboard().then(({ body: { id: DASBOARD_ID } }) => {
       cy.visit(`/dashboard/${DASBOARD_ID}`);
     });
 
diff --git a/frontend/test/metabase/scenarios/question/nulls.cy.spec.js b/frontend/test/metabase/scenarios/question/nulls.cy.spec.js
index ee86679e503..959265effd8 100644
--- a/frontend/test/metabase/scenarios/question/nulls.cy.spec.js
+++ b/frontend/test/metabase/scenarios/question/nulls.cy.spec.js
@@ -54,59 +54,61 @@ describe("scenarios > question > null", () => {
 
       display: "pie",
     }).then(({ body: { id: questionId } }) => {
-      cy.createDashboard("13626D").then(({ body: { id: dashboardId } }) => {
-        // add filter (ID) to the dashboard
-        cy.request("PUT", `/api/dashboard/${dashboardId}`, {
-          parameters: [
-            {
-              id: "1f97c149",
-              name: "ID",
-              slug: "id",
-              type: "id",
-            },
-          ],
-        });
-
-        // add previously created question to the dashboard
-        cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
-          cardId: questionId,
-        }).then(({ body: { id: dashCardId } }) => {
-          // connect filter to that question
-          cy.request("PUT", `/api/dashboard/${dashboardId}/cards`, {
-            cards: [
+      cy.createDashboard({ name: "13626D" }).then(
+        ({ body: { id: dashboardId } }) => {
+          // add filter (ID) to the dashboard
+          cy.request("PUT", `/api/dashboard/${dashboardId}`, {
+            parameters: [
               {
-                id: dashCardId,
-                card_id: questionId,
-                row: 0,
-                col: 0,
-                sizeX: 8,
-                sizeY: 6,
-                parameter_mappings: [
-                  {
-                    parameter_id: "1f97c149",
-                    card_id: questionId,
-                    target: ["dimension", ["field", ORDERS.ID, null]],
-                  },
-                ],
+                id: "1f97c149",
+                name: "ID",
+                slug: "id",
+                type: "id",
               },
             ],
           });
-        });
-        // NOTE: The actual "Assertion" phase begins here
-        cy.visit(`/dashboard/${dashboardId}?id=1`);
-        cy.findByText("13626D");
 
-        cy.log("Reported failing in v0.37.0.2");
-        cy.get(".DashCard").within(() => {
-          cy.get(".LoadingSpinner").should("not.exist");
-          cy.findByText("13626");
-          // [quarantine]: flaking in CircleCI, passing locally
-          // TODO: figure out the cause of the failed test in CI after #13721 is merged
-          // cy.get("svg[class*=PieChart__Donut]");
-          // cy.get("[class*=PieChart__Value]").contains("0");
-          // cy.get("[class*=PieChart__Title]").contains(/total/i);
-        });
-      });
+          // add previously created question to the dashboard
+          cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
+            cardId: questionId,
+          }).then(({ body: { id: dashCardId } }) => {
+            // connect filter to that question
+            cy.request("PUT", `/api/dashboard/${dashboardId}/cards`, {
+              cards: [
+                {
+                  id: dashCardId,
+                  card_id: questionId,
+                  row: 0,
+                  col: 0,
+                  sizeX: 8,
+                  sizeY: 6,
+                  parameter_mappings: [
+                    {
+                      parameter_id: "1f97c149",
+                      card_id: questionId,
+                      target: ["dimension", ["field", ORDERS.ID, null]],
+                    },
+                  ],
+                },
+              ],
+            });
+          });
+          // NOTE: The actual "Assertion" phase begins here
+          cy.visit(`/dashboard/${dashboardId}?id=1`);
+          cy.findByText("13626D");
+
+          cy.log("Reported failing in v0.37.0.2");
+          cy.get(".DashCard").within(() => {
+            cy.get(".LoadingSpinner").should("not.exist");
+            cy.findByText("13626");
+            // [quarantine]: flaking in CircleCI, passing locally
+            // TODO: figure out the cause of the failed test in CI after #13721 is merged
+            // cy.get("svg[class*=PieChart__Donut]");
+            // cy.get("[class*=PieChart__Value]").contains("0");
+            // cy.get("[class*=PieChart__Title]").contains(/total/i);
+          });
+        },
+      );
     });
   });
 
@@ -121,7 +123,7 @@ describe("scenarios > question > null", () => {
         native: { query: "SELECT 0", "template-tags": {} },
         display: "scalar",
       }).then(({ body: { id: Q2_ID } }) => {
-        cy.createDashboard("13801D").then(({ body: { id: DASHBOARD_ID } }) => {
+        cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
           cy.log("Add both previously created questions to the dashboard");
 
           [Q1_ID, Q2_ID].forEach((questionId, index) => {
diff --git a/frontend/test/metabase/scenarios/question/view.cy.spec.js b/frontend/test/metabase/scenarios/question/view.cy.spec.js
index a419669b285..c7e2d7ee9fb 100644
--- a/frontend/test/metabase/scenarios/question/view.cy.spec.js
+++ b/frontend/test/metabase/scenarios/question/view.cy.spec.js
@@ -99,7 +99,7 @@ describe("scenarios > question > view", () => {
       cy.findByText("Yes").click();
 
       // Native query saved in dasbhoard
-      cy.createDashboard("Dashboard");
+      cy.createDashboard();
 
       cy.createNativeQuestion({
         name: "Question",
diff --git a/frontend/test/metabase/scenarios/sharing/subscriptions.cy.spec.js b/frontend/test/metabase/scenarios/sharing/subscriptions.cy.spec.js
index 139de41135a..5d1f607fd70 100644
--- a/frontend/test/metabase/scenarios/sharing/subscriptions.cy.spec.js
+++ b/frontend/test/metabase/scenarios/sharing/subscriptions.cy.spec.js
@@ -15,7 +15,7 @@ describe("scenarios > dashboard > subscriptions", () => {
   });
 
   it("should not allow sharing if there are no dashboard cards", () => {
-    cy.createDashboard("15077D").then(({ body: { id: DASHBOARD_ID } }) => {
+    cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
       cy.visit(`/dashboard/${DASHBOARD_ID}`);
     });
     cy.findByText("This dashboard is looking empty.");
@@ -31,7 +31,7 @@ describe("scenarios > dashboard > subscriptions", () => {
   });
 
   it("should allow sharing if dashboard contains only text cards (metabase#15077)", () => {
-    cy.createDashboard("15077D").then(({ body: { id: DASHBOARD_ID } }) => {
+    cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
       cy.visit(`/dashboard/${DASHBOARD_ID}`);
     });
     cy.icon("pencil").click();
@@ -162,48 +162,50 @@ describe("scenarios > dashboard > subscriptions", () => {
           },
         },
       }).then(({ body: { id: QUESTION_ID } }) => {
-        cy.createDashboard("15705D").then(({ body: { id: DASHBOARD_ID } }) => {
-          // Add filter to the dashboard
-          cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
-            // Using the old dashboard filter syntax
-            parameters: [
-              {
-                name: "Quantity",
-                slug: "quantity",
-                id: "930e4001",
-                type: "category",
-                default: "20",
-              },
-            ],
-          });
-
-          // Add question to the dashboard
-          cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-            cardId: QUESTION_ID,
-          }).then(({ body: { id: DASH_CARD_ID } }) => {
-            // Connect filter to that question
-            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-              cards: [
+        cy.createDashboard({ name: "15705D" }).then(
+          ({ body: { id: DASHBOARD_ID } }) => {
+            // Add filter to the dashboard
+            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
+              // Using the old dashboard filter syntax
+              parameters: [
                 {
-                  id: DASH_CARD_ID,
-                  card_id: QUESTION_ID,
-                  row: 0,
-                  col: 0,
-                  sizeX: 12,
-                  sizeY: 10,
-                  parameter_mappings: [
-                    {
-                      parameter_id: "930e4001",
-                      card_id: QUESTION_ID,
-                      target: ["variable", ["template-tag", "qty"]],
-                    },
-                  ],
+                  name: "Quantity",
+                  slug: "quantity",
+                  id: "930e4001",
+                  type: "category",
+                  default: "20",
                 },
               ],
             });
-          });
-          assignRecipient({ dashboard_id: DASHBOARD_ID });
-        });
+
+            // Add question to the dashboard
+            cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+              cardId: QUESTION_ID,
+            }).then(({ body: { id: DASH_CARD_ID } }) => {
+              // Connect filter to that question
+              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+                cards: [
+                  {
+                    id: DASH_CARD_ID,
+                    card_id: QUESTION_ID,
+                    row: 0,
+                    col: 0,
+                    sizeX: 12,
+                    sizeY: 10,
+                    parameter_mappings: [
+                      {
+                        parameter_id: "930e4001",
+                        card_id: QUESTION_ID,
+                        target: ["variable", ["template-tag", "qty"]],
+                      },
+                    ],
+                  },
+                ],
+              });
+            });
+            assignRecipient({ dashboard_id: DASHBOARD_ID });
+          },
+        );
       });
       // Click anywhere outside to close the popover
       cy.findByText("15705D").click();
diff --git a/frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js
index dcd6eed72fb..58273f3a4ab 100644
--- a/frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js
+++ b/frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js
@@ -91,60 +91,62 @@ describe("scenarios > visualizations > drillthroughs > chart drill", () => {
         },
         display: "line",
       }).then(({ body: { id: Q2_ID } }) => {
-        cy.createDashboard("11442D").then(({ body: { id: DASHBOARD_ID } }) => {
-          cy.log("Add the first question to the dashboard");
-
-          cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-            cardId: Q1_ID,
-          }).then(({ body: { id: DASH_CARD_ID } }) => {
-            cy.log(
-              "Add additional series combining it with the second question",
-            );
-
-            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-              cards: [
-                {
-                  id: DASH_CARD_ID,
-                  card_id: Q1_ID,
-                  row: 0,
-                  col: 0,
-                  sizeX: 16,
-                  sizeY: 12,
-                  series: [
-                    {
-                      id: Q2_ID,
-                      model: "card",
-                    },
-                  ],
-                  visualization_settings: {},
-                  parameter_mappings: [],
-                },
-              ],
+        cy.createDashboard({ name: "11442D" }).then(
+          ({ body: { id: DASHBOARD_ID } }) => {
+            cy.log("Add the first question to the dashboard");
+
+            cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+              cardId: Q1_ID,
+            }).then(({ body: { id: DASH_CARD_ID } }) => {
+              cy.log(
+                "Add additional series combining it with the second question",
+              );
+
+              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+                cards: [
+                  {
+                    id: DASH_CARD_ID,
+                    card_id: Q1_ID,
+                    row: 0,
+                    col: 0,
+                    sizeX: 16,
+                    sizeY: 12,
+                    series: [
+                      {
+                        id: Q2_ID,
+                        model: "card",
+                      },
+                    ],
+                    visualization_settings: {},
+                    parameter_mappings: [],
+                  },
+                ],
+              });
             });
-          });
 
-          cy.visit(`/dashboard/${DASHBOARD_ID}`);
-
-          cy.log("The first series line");
-          cy.get(".sub.enable-dots._0")
-            .find(".dot")
-            .eq(0)
-            .click({ force: true });
-          cy.findByText(/Zoom in/i);
-          cy.findByText(/View these Orders/i);
-
-          // Click anywhere else to close the first action panel
-          cy.findByText("11442D").click();
-
-          // Second line from the second question
-          cy.log("The second series line");
-          cy.get(".sub.enable-dots._1")
-            .find(".dot")
-            .eq(0)
-            .click({ force: true });
-          cy.findByText(/Zoom in/i);
-          cy.findByText(/View these Products/i);
-        });
+            cy.visit(`/dashboard/${DASHBOARD_ID}`);
+
+            cy.log("The first series line");
+            cy.get(".sub.enable-dots._0")
+              .find(".dot")
+              .eq(0)
+              .click({ force: true });
+            cy.findByText(/Zoom in/i);
+            cy.findByText(/View these Orders/i);
+
+            // Click anywhere else to close the first action panel
+            cy.findByText("11442D").click();
+
+            // Second line from the second question
+            cy.log("The second series line");
+            cy.get(".sub.enable-dots._1")
+              .find(".dot")
+              .eq(0)
+              .click({ force: true });
+            cy.findByText(/Zoom in/i);
+            cy.findByText(/View these Products/i);
+          },
+        );
       });
     });
   });
@@ -171,60 +173,62 @@ describe("scenarios > visualizations > drillthroughs > chart drill", () => {
         },
         display: "line",
       }).then(({ body: { id: Q2_ID } }) => {
-        cy.createDashboard("13457D").then(({ body: { id: DASHBOARD_ID } }) => {
-          cy.log("Add the first question to the dashboard");
-
-          cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-            cardId: Q1_ID,
-          }).then(({ body: { id: DASH_CARD_ID } }) => {
-            cy.log(
-              "Add additional series combining it with the second question",
-            );
-
-            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-              cards: [
-                {
-                  id: DASH_CARD_ID,
-                  card_id: Q1_ID,
-                  row: 0,
-                  col: 0,
-                  sizeX: 16,
-                  sizeY: 12,
-                  series: [
-                    {
-                      id: Q2_ID,
-                      model: "card",
-                    },
-                  ],
-                  visualization_settings: {},
-                  parameter_mappings: [],
-                },
-              ],
+        cy.createDashboard({ name: "13457D" }).then(
+          ({ body: { id: DASHBOARD_ID } }) => {
+            cy.log("Add the first question to the dashboard");
+
+            cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+              cardId: Q1_ID,
+            }).then(({ body: { id: DASH_CARD_ID } }) => {
+              cy.log(
+                "Add additional series combining it with the second question",
+              );
+
+              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+                cards: [
+                  {
+                    id: DASH_CARD_ID,
+                    card_id: Q1_ID,
+                    row: 0,
+                    col: 0,
+                    sizeX: 16,
+                    sizeY: 12,
+                    series: [
+                      {
+                        id: Q2_ID,
+                        model: "card",
+                      },
+                    ],
+                    visualization_settings: {},
+                    parameter_mappings: [],
+                  },
+                ],
+              });
             });
-          });
 
-          cy.visit(`/dashboard/${DASHBOARD_ID}`);
-
-          cy.log("The first series line");
-          cy.get(".sub.enable-dots._0")
-            .find(".dot")
-            .eq(0)
-            .click({ force: true });
-          cy.findByText(/Zoom in/i);
-          cy.findByText(/View these Orders/i);
-
-          // Click anywhere else to close the first action panel
-          cy.findByText("13457D").click();
-
-          // Second line from the second question
-          cy.log("The third series line");
-          cy.get(".sub.enable-dots._2")
-            .find(".dot")
-            .eq(0)
-            .click({ force: true });
-          cy.findByText(/Zoom in/i);
-          cy.findByText(/View these Orders/i);
-        });
+            cy.visit(`/dashboard/${DASHBOARD_ID}`);
+
+            cy.log("The first series line");
+            cy.get(".sub.enable-dots._0")
+              .find(".dot")
+              .eq(0)
+              .click({ force: true });
+            cy.findByText(/Zoom in/i);
+            cy.findByText(/View these Orders/i);
+
+            // Click anywhere else to close the first action panel
+            cy.findByText("13457D").click();
+
+            // Second line from the second question
+            cy.log("The third series line");
+            cy.get(".sub.enable-dots._2")
+              .find(".dot")
+              .eq(0)
+              .click({ force: true });
+            cy.findByText(/Zoom in/i);
+            cy.findByText(/View these Orders/i);
+          },
+        );
       });
     });
   });
@@ -532,7 +536,7 @@ describe("scenarios > visualizations > drillthroughs > chart drill", () => {
       },
       display: "pie",
     }).then(({ body: { id: QUESTION_ID } }) => {
-      cy.createDashboard("15250D").then(({ body: { id: DASHBOARD_ID } }) => {
+      cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
         cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
           cardId: QUESTION_ID,
         }).then(({ body: { id: DASH_CARD_ID } }) => {
diff --git a/frontend/test/metabase/scenarios/visualizations/drillthroughs/dash_drill.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/drillthroughs/dash_drill.cy.spec.js
index dd66fc3c6a1..5a46f7e4179 100644
--- a/frontend/test/metabase/scenarios/visualizations/drillthroughs/dash_drill.cy.spec.js
+++ b/frontend/test/metabase/scenarios/visualizations/drillthroughs/dash_drill.cy.spec.js
@@ -88,7 +88,7 @@ describe("scenarios > visualizations > drillthroughs > dash_drill", () => {
           },
           display: "line",
         }).then(({ body: { id: CARD_ID } }) => {
-          cy.createDashboard(DASHBOARD_NAME).then(
+          cy.createDashboard({ name: DASHBOARD_NAME }).then(
             ({ body: { id: DASHBOARD_ID } }) => {
               // Prepare to wait for this specific XHR:
               // We need to do this because Cypress sees the string that is "card title" before card is fully rendered.
@@ -139,68 +139,64 @@ describe("scenarios > visualizations > drillthroughs > dash_drill", () => {
             ],
           },
         }).then(({ body: { id: QUESTION_ID } }) => {
-          cy.createDashboard("13415D").then(
-            ({ body: { id: DASHBOARD_ID } }) => {
-              cy.log("Add filter with the default value to the dashboard");
+          cy.createDashboard().then(({ body: { id: DASHBOARD_ID } }) => {
+            cy.log("Add filter with the default value to the dashboard");
+
+            cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
+              parameters: [
+                {
+                  id: "91bace6e",
+                  name: "Category",
+                  slug: "category",
+                  type: "category",
+                  default: ["Doohickey"],
+                },
+              ],
+            });
+
+            cy.log("Add previously created question to the dashboard");
+
+            cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+              cardId: QUESTION_ID,
+            }).then(({ body: { id: DASH_CARD_ID } }) => {
+              cy.log("Connect filter to that question");
 
-              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}`, {
-                parameters: [
+              cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+                cards: [
                   {
-                    id: "91bace6e",
-                    name: "Category",
-                    slug: "category",
-                    type: "category",
-                    default: ["Doohickey"],
+                    id: DASH_CARD_ID,
+                    card_id: QUESTION_ID,
+                    row: 0,
+                    col: 0,
+                    sizeX: 10,
+                    sizeY: 8,
+                    parameter_mappings: [
+                      {
+                        parameter_id: "91bace6e",
+                        card_id: QUESTION_ID,
+                        target: [
+                          "dimension",
+                          ["field", PRODUCTS.CATEGORY, null],
+                        ],
+                      },
+                    ],
                   },
                 ],
               });
+            });
+            cy.server();
+            cy.route("POST", `/api/card/${QUESTION_ID}/query`).as("cardQuery");
+            cy.route("POST", `/api/dataset`).as("dataset");
 
-              cy.log("Add previously created question to the dashboard");
+            cy.visit(`/dashboard/${DASHBOARD_ID}`);
 
-              cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-                cardId: QUESTION_ID,
-              }).then(({ body: { id: DASH_CARD_ID } }) => {
-                cy.log("Connect filter to that question");
-
-                cy.request("PUT", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-                  cards: [
-                    {
-                      id: DASH_CARD_ID,
-                      card_id: QUESTION_ID,
-                      row: 0,
-                      col: 0,
-                      sizeX: 10,
-                      sizeY: 8,
-                      parameter_mappings: [
-                        {
-                          parameter_id: "91bace6e",
-                          card_id: QUESTION_ID,
-                          target: [
-                            "dimension",
-                            ["field", PRODUCTS.CATEGORY, null],
-                          ],
-                        },
-                      ],
-                    },
-                  ],
-                });
-              });
-              cy.server();
-              cy.route("POST", `/api/card/${QUESTION_ID}/query`).as(
-                "cardQuery",
-              );
-              cy.route("POST", `/api/dataset`).as("dataset");
+            cy.wait("@cardQuery");
+            cy.findByText(QUESTION_NAME).click();
 
-              cy.visit(`/dashboard/${DASHBOARD_ID}`);
-
-              cy.wait("@cardQuery");
-              cy.findByText(QUESTION_NAME).click();
-
-              cy.wait("@dataset");
-              cy.findByText("Category is Doohickey");
-              cy.findByText("177"); // Doohickeys for 2016
-            },
-          );
+            cy.wait("@dataset");
+            cy.findByText("Category is Doohickey");
+            cy.findByText("177"); // Doohickeys for 2016
+          });
         });
       });
     });
@@ -216,14 +212,16 @@ function clickScalarCardTitle(card_name) {
 }
 
 function addCardToNewDashboard(dashboard_name, card_id) {
-  cy.createDashboard(dashboard_name).then(({ body: { id: DASHBOARD_ID } }) => {
-    // Add a card to it (with predefined size 6,4 simply for readability)
-    cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
-      cardId: card_id,
-      sizeX: 6,
-      sizeY: 4,
-    });
-    // Visit newly created dashboard
-    cy.visit(`/dashboard/${DASHBOARD_ID}`);
-  });
+  cy.createDashboard({ name: dashboard_name }).then(
+    ({ body: { id: DASHBOARD_ID } }) => {
+      // Add a card to it (with predefined size 6,4 simply for readability)
+      cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
+        cardId: card_id,
+        sizeX: 6,
+        sizeY: 4,
+      });
+      // Visit newly created dashboard
+      cy.visit(`/dashboard/${DASHBOARD_ID}`);
+    },
+  );
 }
diff --git a/frontend/test/metabase/scenarios/visualizations/line_chart.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/line_chart.cy.spec.js
index 28eb836adc8..65c7ceb8321 100644
--- a/frontend/test/metabase/scenarios/visualizations/line_chart.cy.spec.js
+++ b/frontend/test/metabase/scenarios/visualizations/line_chart.cy.spec.js
@@ -196,7 +196,7 @@ describe("scenarios > visualizations > line chart", () => {
             ],
           ],
         }).then(({ body: { id: question2Id } }) => {
-          cy.createDashboard("16249D").then(({ body: { id: dashboardId } }) => {
+          cy.createDashboard().then(({ body: { id: dashboardId } }) => {
             addBothSeriesToDashboard({
               dashboardId,
               firstCardId: question1Id,
@@ -245,7 +245,7 @@ describe("scenarios > visualizations > line chart", () => {
           },
           display: "line",
         }).then(({ body: { id: question2Id } }) => {
-          cy.createDashboard("16249D").then(({ body: { id: dashboardId } }) => {
+          cy.createDashboard().then(({ body: { id: dashboardId } }) => {
             addBothSeriesToDashboard({
               dashboardId,
               firstCardId: question1Id,
diff --git a/frontend/test/metabase/scenarios/visualizations/pivot_tables.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/pivot_tables.cy.spec.js
index b2219b6b38a..c3a2e97c21c 100644
--- a/frontend/test/metabase/scenarios/visualizations/pivot_tables.cy.spec.js
+++ b/frontend/test/metabase/scenarios/visualizations/pivot_tables.cy.spec.js
@@ -527,7 +527,7 @@ describe("scenarios > visualizations > pivot tables", () => {
         display: "pivot",
         visualization_settings: {},
       }).then(({ body: { id: QUESTION_ID } }) => {
-        cy.createDashboard(DASHBOARD_NAME).then(
+        cy.createDashboard({ name: DASHBOARD_NAME }).then(
           ({ body: { id: DASHBOARD_ID } }) => {
             cy.log("Add previously created question to that dashboard");
             cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
@@ -587,7 +587,7 @@ describe("scenarios > visualizations > pivot tables", () => {
           enable_embedding: true,
         });
 
-        cy.createDashboard(DASHBOARD_NAME).then(
+        cy.createDashboard({ name: DASHBOARD_NAME }).then(
           ({ body: { id: DASHBOARD_ID } }) => {
             cy.log("Add previously created question to that dashboard");
             cy.request("POST", `/api/dashboard/${DASHBOARD_ID}/cards`, {
diff --git a/frontend/test/metabase/scenarios/visualizations/scalar.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/scalar.cy.spec.js
index 6c745fe2076..861b36269f5 100644
--- a/frontend/test/metabase/scenarios/visualizations/scalar.cy.spec.js
+++ b/frontend/test/metabase/scenarios/visualizations/scalar.cy.spec.js
@@ -17,7 +17,7 @@ describe("scenarios > visualizations > scalar", () => {
   };
 
   Object.entries(SCREEN_SIZES).forEach(([size, viewport]) => {
-    it(`should render human readable numbers on ${size} screen size (metabase#12629)`, () => {
+    it(`should render human readable numbers on ${size} screen size (metabase`, () => {
       const [width, height] = viewport;
 
       cy.skipOn(size === "mobile");
@@ -31,7 +31,7 @@ describe("scenarios > visualizations > scalar", () => {
         },
         display: "scalar",
       }).then(({ body: { id: questionId } }) => {
-        cy.createDashboard("12629").then(({ body: { id: dashboardId } }) => {
+        cy.createDashboard().then(({ body: { id: dashboardId } }) => {
           // Add previously created question to the dashboard
           cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
             cardId: questionId,
diff --git a/frontend/test/snapshot-creators/default.cy.snap.js b/frontend/test/snapshot-creators/default.cy.snap.js
index 9d106baa0b8..c7091a35547 100644
--- a/frontend/test/snapshot-creators/default.cy.snap.js
+++ b/frontend/test/snapshot-creators/default.cy.snap.js
@@ -152,7 +152,7 @@ describe("snapshots", () => {
     });
 
     // dashboard 1: Orders in a dashboard
-    cy.createDashboard("Orders in a dashboard");
+    cy.createDashboard({ name: "Orders in a dashboard" });
     cy.request("POST", `/api/dashboard/1/cards`, { cardId: 1 }).then(
       ({ body: { id: dashCardId } }) => {
         cy.request("PUT", `/api/dashboard/1/cards`, {
-- 
GitLab