mirror of
https://github.com/maputnik/editor.git
synced 2026-07-09 07:27:35 +00:00
8af1cfd5f8
Pure file moves (no content changes) so git records them as renames and history/blame is preserved through the migration that follows: cypress/e2e/*.cy.ts -> e2e/*.spec.ts cypress/e2e/*-driver.ts -> e2e/*-driver.ts cypress/fixtures/ -> e2e/fixtures/ cypress.config.ts -> playwright.config.ts InputAutocomplete.cy.tsx -> InputAutocomplete.browser.test.tsx Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
675 B
TypeScript
19 lines
675 B
TypeScript
import InputAutocomplete from "./InputAutocomplete";
|
|
import { mount } from "cypress/react";
|
|
|
|
const fruits = ["apple", "banana", "cherry"];
|
|
|
|
describe("<InputAutocomplete />", () => {
|
|
it("filters options when typing", () => {
|
|
mount(
|
|
<InputAutocomplete aria-label="Fruit" options={fruits.map(f => [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");
|
|
});
|
|
});
|