README.md

fixtures/ #

Small local web pages the tests drive instead of real sites, and the scripts that run against them.

  • hello.html and hello.aite: click a button, check the page changed (P1-3). Run it with npm run aite -- run fixtures/hello.aite --config aite.config.json --headless --no-sandbox (the config must allow http://127.0.0.1:4780).

A script inside a folder called fixtures/ gets that folder served on the port of its start page.

  • spike/: pages for the P1-5 spike (a window.open button, download links, a React controlled input). test/functional/spike.activation.test.ts serves them and records what plain events and trusted input each do in a real Chrome (results in docs/decisions.md, D11).
  • commands/: pages for P2-3 and P2-5, one per area, plain HTML you can read: links.html (a relative and an absolute link, a download link), form.html (fields, select, checkbox, radio, disabled/hidden/covered/far-away/twin buttons, double click, keys, drag), timing.html (things that appear, disappear and change after Start, and a page that makes requests for about two seconds), pop.html with popup.html and popup-stay.html (a window opened by a real click). test/functional/commands.e2e.test.ts runs a script against each in a real Chrome. A page "reports" a click that must not happen by fetching /beacon/NAME, which the test's fixture server logs.
  • commands/scripts/: one passing and at least one failing script for every command (click.pass.aite, click.fail-hidden.aite, ...), commands/scripts/shared/ for what run includes, and commands/checks/ for what call runs. The first lines of each script say what it must do: # expect: pass, # expect: fail REASON COMMAND [in FILE] (the first failed command has that reason), or # expect: refused "TEXT" (the script is refused with that text, nothing runs). The scripts name the page at http://127.0.0.1:4780; the self-check gives every run its own port.
  • The self-check runs all of them: npm run selfcheck (options: --repeat N, --parallel N, --only TEXT, --list; --help for the rest). Exit 0: every run did what its script says. Exit 1: one did something else. Exit 3: it could not run (for example the extension did not load): a failure, never a skip. npm run selfcheck -- --sabotage verify breaks the built extension on purpose (one command turned off) and must exit 1; CI checks that. A new command is not finished until it has a passing and a failing script here (test/functional/fixtureScripts.test.ts fails otherwise).