Skip to content

Commit

Permalink
Add E2E repro for #40608
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjaglumac committed Apr 2, 2024
1 parent b6d1e17 commit 806b353
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions e2e/test/scenarios/question/notebook.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,22 @@ describe("scenarios > question > notebook", { tags: "@slow" }, () => {
});
});

it("should properly render previews (metabase#28726), (metabase#29959)", () => {
openOrdersTable({ mode: "notebook" });
it("should properly render previews (metabase#28726, metabase#29959, metabase#40608)", () => {
startNewQuestion();

cy.log(
"Preview should not be possible without the source data (metabase#40608)",
);
cy.findByTestId("step-data-0-0").within(() => {
cy.findByText("Pick your starting data").should("exist");
cy.icon("play").should("not.be.visible");
});

popover().within(() => {
cy.findByTextEnsureVisible("Raw Data").click();
cy.findByTextEnsureVisible("Orders").click();
});

cy.findByTestId("step-data-0-0").within(() => {
cy.icon("play").click();
assertTableRowCount(10);
Expand All @@ -691,12 +705,12 @@ describe("scenarios > question > notebook", { tags: "@slow" }, () => {

cy.button("Row limit").click();
cy.findByTestId("step-limit-0-0").within(() => {
cy.findByPlaceholderText("Enter a limit").type("5").blur();
cy.findByPlaceholderText("Enter a limit").type("5").realPress("Tab");

cy.icon("play").click();
assertTableRowCount(5);

cy.findByDisplayValue("5").type("{selectall}50").blur();
cy.findByDisplayValue("5").type("{selectall}50").realPress("Tab");
cy.button("Refresh").click();
assertTableRowCount(10);
});
Expand Down

0 comments on commit 806b353

Please sign in to comment.