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

#17212 Repro: Not possible to apply dashboard ID filter to a nested QB question (#17343)

* Add sane defaults to the card size in `createQuestionAndDashboard` custom command

* Add repro for #17212
parent 12dbf0d5
No related merge requests found
......@@ -6,6 +6,9 @@ Cypress.Commands.add(
({ body: { id: dashboardId } }) => {
cy.request("POST", `/api/dashboard/${dashboardId}/cards`, {
cardId: questionId,
// Add sane defaults for the dashboard card size
sizeX: 8,
sizeY: 6,
});
},
);
......
import {
restore,
editDashboard,
setFilter,
popover,
} from "__support__/e2e/cypress";
import { SAMPLE_DATASET } from "__support__/e2e/cypress_sample_dataset";
const { PRODUCTS_ID } = SAMPLE_DATASET;
const baseQuestion = {
query: { "source-table": PRODUCTS_ID },
};
describe.skip("issue 17212", () => {
beforeEach(() => {
restore();
cy.signInAsAdmin();
cy.createQuestion(baseQuestion).then(({ body: { id: baseQuestionId } }) => {
const questionDetails = {
query: { "source-table": `card__${baseQuestionId}` },
};
cy.createQuestionAndDashboard({ questionDetails }).then(
({ body: { card_id, dashboard_id } }) => {
cy.intercept("POST", `/api/card/${card_id}/query`).as("cardQuery");
cy.visit(`/dashboard/${dashboard_id}`);
cy.wait("@cardQuery");
},
);
});
});
it("should be able to add ID dashboard filter to the nested question (metabase#17212)", () => {
editDashboard();
setFilter("ID");
cy.findByText("No valid fields").should("not.exist");
cy.findByText("Column to filter on")
.next("a")
.click();
popover()
.contains("ID")
.click();
});
});
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