diff --git a/frontend/test/metabase/scenarios/question/reproductions/20551-filter-starts-with.cy.spec.js b/frontend/test/metabase/scenarios/question/reproductions/20551-filter-starts-with.cy.spec.js new file mode 100644 index 0000000000000000000000000000000000000000..f219a0716ed1685e3cbba98b08c89c876f0dd89d --- /dev/null +++ b/frontend/test/metabase/scenarios/question/reproductions/20551-filter-starts-with.cy.spec.js @@ -0,0 +1,26 @@ +import { restore, openProductsTable, filter } from "__support__/e2e/cypress"; + +describe("issue 20551", () => { + beforeEach(() => { + restore(); + cy.signInAsAdmin(); + }); + + it("should allow filtering with includes, rather than starts with (metabase#20551)", () => { + openProductsTable({ mode: "notebook" }); + filter({ mode: "notebook" }); + cy.findByText("Category").click(); + + // Make sure input field is auto-focused + cy.focused() + .should("have.attr", "placeholder", "Search the list") + .type("i"); + + // All categories that contain `i` + cy.findByText("Doohickey"); + cy.findByText("Gizmo"); + cy.findByText("Widget"); + + cy.findByText("Gadget").should("not.exist"); + }); +});