Skip to content
Snippets Groups Projects
Unverified Commit 785d5017 authored by Paul Rosenzweig's avatar Paul Rosenzweig Committed by GitHub
Browse files

Remove card id from questions updated by drills (#12960)

parent 69084dc6
No related branches found
No related tags found
No related merge requests found
......@@ -234,6 +234,7 @@ export function getCardAfterVisualizationClick(nextCard, previousCard) {
isMultiseriesQuestion
? previousCard.id
: nextCard.id,
id: null,
};
} else {
// Even though the card is currently clean, we might still apply dashboard parameters to it,
......
import {
restore,
signInAsNormalUser,
popover,
modal,
} from "__support__/cypress";
describe("scenarios > question > saved", () => {
before(restore);
beforeEach(signInAsNormalUser);
it("view and filter saved question", () => {
cy.visit("/question/1");
cy.findAllByText("Orders"); // question and table name appears
// filter to only orders with quantity=100
cy.findByText("Quantity").click();
popover().within(() => cy.findByText("Filter").click());
popover().within(() => {
cy.findByPlaceholderText("Search the list").type("100");
cy.findByText("Update filter").click();
});
cy.findByText("Quantity is equal to 100");
cy.findByText("Showing 2 rows"); // query updated
// check that save will give option to replace
cy.findByText("Save").click();
modal().within(() => {
cy.findByText('Replace original question, "Orders"');
cy.findByText("Save as new question");
cy.findByText("Cancel").click();
});
// click "Started from Orders" and check that the original question is restored
cy.findByText("Started from").within(() => cy.findByText("Orders").click());
cy.findByText("Showing first 2,000 rows"); // query updated
cy.findByText("Started from").should("not.exist");
cy.findByText("Quantity is equal to 100").should("not.exist");
});
});
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