Skip to content

Commit

Permalink
Repro #20044: "Explore results" shown for no-data users (#20197)
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjaglumac authored and nemanjaglumac committed Feb 3, 2022
1 parent 02b9f63 commit 603cba6
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { restore } from "__support__/e2e/cypress";

const questionDetails = {
name: "20044",
native: {
query: "select 1",
},
};

describe("issue 20044", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
});

it("nodata user should not see 'Explore results' (metabase#20044)", () => {
cy.createNativeQuestion(questionDetails).then(({ body: { id } }) => {
cy.intercept("POST", `/api/card/${id}/query`).as("cardQuery");

cy.signIn("nodata");

cy.visit(`/question/${id}`);
cy.wait("@cardQuery");

cy.get(".cellData").contains("1");
cy.findByText("Explore results").should("not.exist");
});
});
});

0 comments on commit 603cba6

Please sign in to comment.