From a0767a00c71f6deb36a827bdabbcf0d73f974aea Mon Sep 17 00:00:00 2001 From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> Date: Wed, 25 May 2022 19:56:32 +0200 Subject: [PATCH] Repro #22822: Do not offer "Explore results" unless the database supports it (#22948) --- ...e-results-unsupported-databases.cy.spec.js | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 frontend/test/metabase/scenarios/native/reproductions/22822-explore-results-unsupported-databases.cy.spec.js diff --git a/frontend/test/metabase/scenarios/native/reproductions/22822-explore-results-unsupported-databases.cy.spec.js b/frontend/test/metabase/scenarios/native/reproductions/22822-explore-results-unsupported-databases.cy.spec.js new file mode 100644 index 00000000000..497f5172e15 --- /dev/null +++ b/frontend/test/metabase/scenarios/native/reproductions/22822-explore-results-unsupported-databases.cy.spec.js @@ -0,0 +1,26 @@ +import { restore } from "__support__/e2e/cypress"; + +const MONGO_DB_ID = 2; + +const questionDetails = { + name: "22822", + database: MONGO_DB_ID, + native: { + query: '[{"$limit": 2}]', + collection: "products", + }, +}; + +describe.skip("issue 22822", () => { + beforeEach(() => { + restore("mongo-4"); + cy.signInAsAdmin(); + }); + + it("should not show 'Explore Results' for databases that do not support nested queries (metabase#22822)", () => { + cy.createNativeQuestion(questionDetails, { visitQuestion: true }); + + cy.findByTextEnsureVisible("Rustic Paper Wallet"); + cy.findByText("Explore results").should("not.exist"); + }); +}); -- GitLab