From 884901f20a9a421d3e9cd80c41e80ba949af8de0 Mon Sep 17 00:00:00 2001
From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Date: Fri, 14 Jun 2024 11:00:58 +0200
Subject: [PATCH] Remove "is empty" and "not empty" from time-series chrome
 (#44164)

* Remove "is empty" and "not empty" from time-series chrome

* Fix unit test
---
 .../DatePicker/DateOperatorPicker/constants.ts         | 10 ----------
 .../TimeseriesFilterPicker.unit.spec.tsx               |  6 ++----
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/frontend/src/metabase/querying/components/DatePicker/DateOperatorPicker/constants.ts b/frontend/src/metabase/querying/components/DatePicker/DateOperatorPicker/constants.ts
index 472aa18a9ae..e00e302e8ff 100644
--- a/frontend/src/metabase/querying/components/DatePicker/DateOperatorPicker/constants.ts
+++ b/frontend/src/metabase/querying/components/DatePicker/DateOperatorPicker/constants.ts
@@ -43,14 +43,4 @@ export const OPERATOR_OPTIONS: OperatorOption[] = [
     value: "between",
     operators: ["between"],
   },
-  {
-    label: t`Is empty`,
-    value: "is-null",
-    operators: ["is-null"],
-  },
-  {
-    label: t`Not empty`,
-    value: "not-null",
-    operators: ["not-null"],
-  },
 ];
diff --git a/frontend/src/metabase/querying/components/TimeseriesChrome/TimeseriesFilterPicker/TimeseriesFilterPicker.unit.spec.tsx b/frontend/src/metabase/querying/components/TimeseriesChrome/TimeseriesFilterPicker/TimeseriesFilterPicker.unit.spec.tsx
index 580c61bfb51..9b011244ba9 100644
--- a/frontend/src/metabase/querying/components/TimeseriesChrome/TimeseriesFilterPicker/TimeseriesFilterPicker.unit.spec.tsx
+++ b/frontend/src/metabase/querying/components/TimeseriesChrome/TimeseriesFilterPicker/TimeseriesFilterPicker.unit.spec.tsx
@@ -76,13 +76,11 @@ describe("TimeseriesFilterPicker", () => {
 
     await userEvent.click(screen.getByText("All time"));
     await userEvent.click(await screen.findByDisplayValue("All time"));
-    await userEvent.click(await screen.findByText("Is empty"));
+    await userEvent.click(await screen.findByText("Current"));
     await userEvent.click(screen.getByText("Apply"));
 
     expect(getNextFilterParts()).toMatchObject({
-      operator: "is-null",
-      column: expect.anything(),
-      values: [],
+      value: "current",
     });
   });
 
-- 
GitLab