diff --git a/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js b/e2e/test/scenarios/dashboard-filters/parameters.cy.spec.js index 39cc40df9aded370974225319429845c8ca8f3ce..049cbf8e4258ba1ae1e0e4b40182ac20b944af0f 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 e2df85869c8bcc54629f49d9be35c048c9650717..f0c48e4c10216dcb2655542994810051b356967b 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 d4d483a0326aeaf6504d86f3c773ddcd2abca271..4b00b1a9ff4e042fdf43a74381b19c5208892b1e 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 7a54243482186cc11a7373b6e577fb028b288a4d..c979150e7274bcf6c9aee8b17c0697f628b3febd 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 5186741c9e35f927468435136fcd089b0e75c69c..5d8b70c0c490581e1c2897261bc83956fc476a9f 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.`;