import InputAutocomplete from "./InputAutocomplete"; import { mount } from "cypress/react"; const fruits = ["apple", "banana", "cherry"]; describe("", () => { it("filters options when typing", () => { mount( [f, f])} /> ); cy.get("input").focus(); cy.get(".maputnik-autocomplete-menu-item").should("have.length", 3); cy.get("input").type("ch"); cy.get(".maputnik-autocomplete-menu-item").should("have.length", 1).and("contain", "cherry"); cy.get(".maputnik-autocomplete-menu-item").click(); cy.get("input").should("have.value", "cherry"); }); });