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

#14302 Repro: Native question with filter - dirty state without changes [ci skip] (#14304)

* Run each test in isolation

* Add repro for #14302
parent 00dc041e
Branches
Tags
No related merge requests found
......@@ -10,8 +10,10 @@ import { SAMPLE_DATASET } from "__support__/cypress_sample_dataset";
const { ORDERS } = SAMPLE_DATASET;
describe("scenarios > question > native", () => {
before(restore);
beforeEach(signInAsNormalUser);
beforeEach(() => {
restore();
signInAsNormalUser();
});
it("lets you create and run a SQL question", () => {
cy.visit("/question/new");
......@@ -277,4 +279,35 @@ describe("scenarios > question > native", () => {
cy.get(".ScalarValue").contains("1");
});
});
it.skip("should not make the question dirty when there are no changes (metabase#14302)", () => {
cy.request("POST", "/api/card", {
name: "14302",
dataset_query: {
type: "native",
native: {
query:
'SELECT "CATEGORY", COUNT(*)\nFROM "PRODUCTS"\nWHERE "PRICE" > {{PRICE}}\nGROUP BY "CATEGORY"',
"template-tags": {
PRICE: {
id: "39b51ccd-47a7-9df6-a1c5-371918352c79",
name: "PRICE",
"display-name": "Price",
type: "number",
default: "10",
required: true,
},
},
},
database: 1,
},
display: "table",
visualization_settings: {},
}).then(({ body: { id: QUESTION_ID } }) => {
cy.visit(`/question/${QUESTION_ID}`);
cy.findByText("14302");
cy.log("**Reported on v0.37.5 - Regression since v0.37.0**");
cy.findByText("Save").should("not.exist");
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment