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

#15444 Repro: Can't run native query with default field filter value set (#15490)

parent 952f838b
No related branches found
No related tags found
No related merge requests found
......@@ -568,4 +568,42 @@ describe("scenarios > question > native", () => {
cy.findAllByText("Gizmo").should("not.exist");
});
});
it.skip("should run with the default field filter set (metabase#15444)", () => {
cy.intercept("POST", "/api/dataset").as("dataset");
cy.visit("/");
cy.icon("sql").click();
cy.get(".ace_content").type("select * from products where {{category}}", {
parseSpecialCharSequences: false,
});
// Change filter type from "Text" to Field Filter
cy.get(".AdminSelect")
.contains("Text")
.click();
popover()
.findByText("Field Filter")
.click();
popover()
.findByText("Products")
.click();
popover()
.findByText("Category")
.click();
cy.findByText("Required?").scrollIntoView();
// Add the default value
cy.findByText("Enter a default value...").click();
popover()
.findByText("Doohickey")
.click();
cy.findByRole("button", { name: "Add filter" }).click();
cy.get(".NativeQueryEditor .Icon-play").click();
cy.wait("@dataset").then(xhr => {
expect(xhr.response.body.error).not.to.exist;
});
cy.get(".Visualization").within(() => {
cy.findAllByText("Doohickey");
cy.findAllByText("Gizmo").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