From 06c100f458154e8db61b00d3a58d2c3938dea96d Mon Sep 17 00:00:00 2001
From: Anton Kulyk <kuliks.anton@gmail.com>
Date: Thu, 28 Oct 2021 19:18:48 +0300
Subject: [PATCH] Repro #18589 (#18730)

---
 .../18589-numeric-binning-in-joins.cy.spec.js | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 frontend/test/metabase/scenarios/question/reproductions/18589-numeric-binning-in-joins.cy.spec.js

diff --git a/frontend/test/metabase/scenarios/question/reproductions/18589-numeric-binning-in-joins.cy.spec.js b/frontend/test/metabase/scenarios/question/reproductions/18589-numeric-binning-in-joins.cy.spec.js
new file mode 100644
index 00000000000..720876f983f
--- /dev/null
+++ b/frontend/test/metabase/scenarios/question/reproductions/18589-numeric-binning-in-joins.cy.spec.js
@@ -0,0 +1,44 @@
+import {
+  restore,
+  openOrdersTable,
+  getNotebookStep,
+  popover,
+} from "__support__/e2e/cypress";
+
+describe("issue 18589", () => {
+  beforeEach(() => {
+    restore();
+    cy.signInAsAdmin();
+    cy.intercept("POST", "/api/dataset").as("dataset");
+  });
+
+  it.skip("should not bin numeric fields in join condition by default (metabase#18589)", () => {
+    openOrdersTable({ mode: "notebook" });
+
+    joinTable("Reviews");
+    selectFromDropdown("Quantity");
+    selectFromDropdown("Rating");
+
+    cy.findByText("Summarize").click();
+    selectFromDropdown("Count of rows");
+
+    getNotebookStep("summarize").within(() => {
+      cy.icon("play").click();
+      cy.wait("@dataset");
+      cy.findByText("2.860.368");
+    });
+  });
+});
+
+function joinTable(table) {
+  cy.findByText("Join data").click();
+  popover()
+    .findByText(table)
+    .click();
+}
+
+function selectFromDropdown(option, clickOpts) {
+  popover()
+    .findByText(option)
+    .click(clickOpts);
+}
-- 
GitLab