From c266bba027c456acefc4f6debde679b06a24c5ff Mon Sep 17 00:00:00 2001 From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> Date: Fri, 3 Jun 2022 21:19:02 +0200 Subject: [PATCH] Repro #22518: Changing model definition will not show changes until after browser refresh (#23149) [skip ci] * Add repro for #22518 * Reinforce the test * Skip repro --- .../models/reproductions/22518.cy.spec.js | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 frontend/test/metabase/scenarios/models/reproductions/22518.cy.spec.js diff --git a/frontend/test/metabase/scenarios/models/reproductions/22518.cy.spec.js b/frontend/test/metabase/scenarios/models/reproductions/22518.cy.spec.js new file mode 100644 index 00000000000..57dcfb5bacb --- /dev/null +++ b/frontend/test/metabase/scenarios/models/reproductions/22518.cy.spec.js @@ -0,0 +1,43 @@ +import { + restore, + openQuestionActions, + summarize, + sidebar, +} from "__support__/e2e/cypress"; + +describe.skip("issue 22518", () => { + beforeEach(() => { + restore(); + cy.signInAsAdmin(); + + cy.createNativeQuestion( + { + native: { + query: "select 1 id, 'a' foo", + }, + dataset: true, + }, + { visitQuestion: true }, + ); + }); + + it("UI should immediately reflect model query changes upon saving (metabase#22518)", () => { + openQuestionActions(); + cy.findByText("Edit query definition").click(); + + cy.get(".ace_content").type(", 'b' bar"); + + cy.findByText("Save changes").click(); + + cy.findAllByTestId("header-cell") + .should("have.length", 3) + .and("contain", "BAR"); + + summarize(); + + sidebar() + .should("contain", "ID") + .and("contain", "FOO") + .and("contain", "BAR"); + }); +}); -- GitLab