Skip to content
Snippets Groups Projects
Unverified Commit ff21b86b authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Consolidate E2E tests with nested questions (#24888)

* Delete unused scenarios from 12568

* Refactor repro for 12568

* Refactor repro 12507

* Refactor repro 10474

* Refactor repro 14787

* Refactor repro 14724

* Refactor repro 15352

* Refactor repro 15808

* Refactor repro 15397

* Merge repros 15808, 16938, 18364

* Move repro for #11561 over to nested questions spec
parent eb1026e0
No related branches found
No related tags found
No related merge requests found
import { restore } from "__support__/e2e/helpers";
const questionDetails = {
name: "REVIEWS SQL",
native: { query: "select REVIEWER from REVIEWS LIMIT 1" },
};
describe("issue 18364", () => {
beforeEach(() => {
cy.intercept("POST", "/api/card").as("cardCreated");
restore();
cy.signInAsAdmin();
});
it("should be able to save a nested question (metabase#18364)", () => {
cy.createNativeQuestion(questionDetails, { visitQuestion: true });
cy.findByText("Explore results").click();
cy.findByText("Save").click();
cy.get(".Modal").button("Save").click();
cy.wait("@cardCreated").then(({ response: { body } }) => {
expect(body.error).not.to.exist;
});
cy.button("Failed").should("not.exist");
});
});
This diff is collapsed.
import {
enterCustomColumnDetails,
getNotebookStep,
modal,
openOrdersTable,
openProductsTable,
popover,
......@@ -242,50 +241,6 @@ describe("scenarios > question > notebook", () => {
});
});
describe("nested", () => {
it("should create a nested question with post-aggregation filter", () => {
openProductsTable({ mode: "notebook" });
summarize({ mode: "notebook" });
popover().within(() => {
cy.findByText("Count of rows").click();
});
cy.findByText("Pick a column to group by").click();
popover().within(() => {
cy.findByText("Category").click();
});
cy.findByText("Filter").click();
popover().within(() => {
cy.findByText("Category").click();
cy.findByText("Gadget").click();
cy.findByText("Add filter").click();
});
visualize();
cy.findByText("Gadget").should("exist");
cy.findByText("Gizmo").should("not.exist");
cy.findByText("Save").click();
modal().within(() => {
cy.findByLabelText("Name").type("post aggregation");
cy.findByText("Save").click();
});
cy.findByText("Not now").click();
cy.icon("notebook").click();
cy.reload();
cy.findByText("Category").should("exist");
cy.findByText("Category is Gadget").should("exist");
});
});
describe("arithmetic (metabase#13175)", () => {
beforeEach(() => {
openOrdersTable({ mode: "notebook" });
......
import { restore } from "__support__/e2e/helpers";
describe("issue 16938", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.intercept("POST", "/api/dataset").as("dataset");
});
it("should allow to browse object details when exploring native query results (metabase#16938)", () => {
const ORDER_ID = 1;
cy.createNativeQuestion(
{
name: "Orders",
native: {
query: "select * from orders",
},
},
{ visitQuestion: true },
);
cy.button(/Explore results/i).click();
cy.wait("@dataset");
getFirstTableColumn().eq(1).should("contain", ORDER_ID).click();
cy.findByTestId("object-detail").within(() => {
cy.findByText("37.65");
});
});
});
function getFirstTableColumn() {
return cy.get(".TableInteractive-cellWrapper--firstColumn");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment