Skip to content

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

Simplify test to remove network calls that were flaking (#62142)

Fraserec4b043c0018
diff --git a/e2e/test/scenarios/native/native-reproductions.cy.spec.ts b/e2e/test/scenarios/native/native-reproductions.cy.spec.ts
index 35ac6ceebfd..73f2821da1d 100644
--- a/e2e/test/scenarios/native/native-reproductions.cy.spec.ts
+++ b/e2e/test/scenarios/native/native-reproductions.cy.spec.ts
@@ -1,9 +1,7 @@
const { H } = cy;
-import { SAMPLE_DB_ID } from "e2e/support/cypress_data";
import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";
import type {
NativeQuestionDetails,
- QuestionDetails,
StructuredQuestionDetails,
} from "e2e/support/helpers";
import type { IconName } from "metabase/ui";
@@ -390,46 +388,20 @@ describe("issues 52811, 52812", () => {
});
describe("issue 52806", () => {
- const questionDetails: QuestionDetails = {
- name: "SQL",
- dataset_query: {
- database: SAMPLE_DB_ID,
- type: "native",
- native: {
- query: "SELECT * FROM ORDERS WHERE ID = {{id}}",
- "template-tags": {
- id: {
- id: "b22a5ce2-fe1d-44e3-8df4-f8951f7921bc",
- name: "id",
- "display-name": "ID",
- type: "number",
- default: "1",
- },
- },
- },
- },
- visualization_settings: {},
- };
-
beforeEach(() => {
H.restore();
cy.signInAsNormalUser();
});
- it(
- "should remove parameter values from the URL when leaving the query builder and discarding changes (metabase#52806)",
- { tags: "@flaky" },
- () => {
- cy.intercept("/api/automagic-dashboards/database/*/candidates").as(
- "candidates",
- );
- H.visitQuestionAdhoc(questionDetails);
- cy.findByTestId("main-logo-link").click();
- H.modal().button("Discard changes").click();
- cy.wait("@candidates");
- cy.location().should((location) => expect(location.search).to.eq(""));
- },
- );
+ it("should remove parameter values from the URL when leaving the query builder and discarding changes (metabase#52806)", () => {
+ cy.visit("/");
+ H.newButton("SQL query").click();
+ H.NativeEditor.focus().type("select {{x}}");
+ cy.findByTestId("main-logo-link").click();
+ H.modal().button("Discard changes").click();
+ cy.findByTestId("home-page");
+ cy.location().should((location) => expect(location.search).to.eq(""));
+ });
});
describe("issue 55951", () => {