From 8f0b21b47dccd73d610be2c4e79ec591f1629f3a Mon Sep 17 00:00:00 2001
From: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Date: Tue, 30 Apr 2024 16:28:49 +0300
Subject: [PATCH] Update copy for native questions wihtout variables during
 column mapping (#41650)

---
 e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js  | 6 +++---
 .../DisabledNativeCardHelpText/tests/common.unit.spec.ts    | 4 ++--
 .../tests/enterprise.unit.spec.ts                           | 4 ++--
 .../DisabledNativeCardHelpText/tests/premium.unit.spec.ts   | 4 ++--
 frontend/src/metabase/dashboard/utils.ts                    | 6 +++---
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js b/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js
index 39cc40df9ad..049cbf8e425 100644
--- a/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js
+++ b/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js
@@ -354,9 +354,9 @@ describe("scenarios > dashboard > parameters", () => {
       // Confirm that it is not possible to connect filter to the updated question anymore (metabase#9299)
       cy.icon("pencil").click();
       cy.findByText(matchingFilterType.name).find(".Icon-gear").click();
-      cy.findByText(/Add a string variable to this question/).should(
-        "be.visible",
-      );
+      cy.findByText(
+        /A text variable in this card can only be connected to a text filter with Is operator/,
+      ).should("be.visible");
     });
   });
 
diff --git a/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/common.unit.spec.ts b/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/common.unit.spec.ts
index e2df85869c8..f0c48e4c102 100644
--- a/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/common.unit.spec.ts
+++ b/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/common.unit.spec.ts
@@ -8,7 +8,7 @@ describe("DashCardParameterMapper > DisabledNativeCardHelpText (OSS)", () => {
 
     expect(
       screen.getByText(
-        "Add a string variable to this question to connect it to a dashboard filter.",
+        "A text variable in this card can only be connected to a text filter with Is operator.",
       ),
     ).toBeInTheDocument();
     expect(screen.getByText("Learn how")).toBeInTheDocument();
@@ -19,7 +19,7 @@ describe("DashCardParameterMapper > DisabledNativeCardHelpText (OSS)", () => {
 
     expect(
       screen.getByText(
-        "Add a string variable to this question to connect it to a dashboard filter.",
+        "A text variable in this card can only be connected to a text filter with Is operator.",
       ),
     ).toBeInTheDocument();
     expect(screen.getByText("Learn how")).toBeInTheDocument();
diff --git a/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/enterprise.unit.spec.ts b/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/enterprise.unit.spec.ts
index d4d483a0326..4b00b1a9ff4 100644
--- a/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/enterprise.unit.spec.ts
+++ b/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/enterprise.unit.spec.ts
@@ -13,7 +13,7 @@ describe("DashCardParameterMapper > DisabledNativeCardHelpText (EE without token
 
     expect(
       screen.getByText(
-        "Add a string variable to this question to connect it to a dashboard filter.",
+        "A text variable in this card can only be connected to a text filter with Is operator.",
       ),
     ).toBeInTheDocument();
     expect(screen.getByText("Learn how")).toBeInTheDocument();
@@ -24,7 +24,7 @@ describe("DashCardParameterMapper > DisabledNativeCardHelpText (EE without token
 
     expect(
       screen.getByText(
-        "Add a string variable to this question to connect it to a dashboard filter.",
+        "A text variable in this card can only be connected to a text filter with Is operator.",
       ),
     ).toBeInTheDocument();
     expect(screen.getByText("Learn how")).toBeInTheDocument();
diff --git a/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/premium.unit.spec.ts b/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/premium.unit.spec.ts
index 7a542434821..c979150e727 100644
--- a/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/premium.unit.spec.ts
+++ b/frontend/src/metabase/dashboard/components/DashCard/DashCardParameterMapper/DisabledNativeCardHelpText/tests/premium.unit.spec.ts
@@ -17,7 +17,7 @@ describe("DashCardParameterMapper > DisabledNativeCardHelpText (EE with token)",
 
     expect(
       screen.getByText(
-        "Add a string variable to this question to connect it to a dashboard filter.",
+        "A text variable in this card can only be connected to a text filter with Is operator.",
       ),
     ).toBeInTheDocument();
     expect(screen.getByText("Learn how")).toBeInTheDocument();
@@ -28,7 +28,7 @@ describe("DashCardParameterMapper > DisabledNativeCardHelpText (EE with token)",
 
     expect(
       screen.getByText(
-        "Add a string variable to this question to connect it to a dashboard filter.",
+        "A text variable in this card can only be connected to a text filter with Is operator.",
       ),
     ).toBeInTheDocument();
     expect(screen.queryByText("Learn how")).not.toBeInTheDocument();
diff --git a/frontend/src/metabase/dashboard/utils.ts b/frontend/src/metabase/dashboard/utils.ts
index 5186741c9e3..5d8b70c0c49 100644
--- a/frontend/src/metabase/dashboard/utils.ts
+++ b/frontend/src/metabase/dashboard/utils.ts
@@ -138,15 +138,15 @@ export function showVirtualDashCardInfoText(
 
 export function getNativeDashCardEmptyMappingText(parameter: Parameter) {
   if (isDateParameter(parameter)) {
-    return t`Add a date variable to this question to connect it to a dashboard filter.`;
+    return t`A date variable in this card can only be connected to a time type with the single date option.`;
   }
 
   if (isNumberParameter(parameter)) {
-    return t`Add a number variable to this question to connect it to a dashboard filter.`;
+    return t`A number variable in this card can only be connected to a number filter with Equal to operator.`;
   }
 
   if (isStringParameter(parameter)) {
-    return t`Add a string variable to this question to connect it to a dashboard filter.`;
+    return t`A text variable in this card can only be connected to a text filter with Is operator.`;
   }
 
   return t`Add a variable to this question to connect it to a dashboard filter.`;
-- 
GitLab