Something went wrong. Try again.
Something went wrong. Try again.
README.md
fixtures/ #
Small local web pages the tests drive instead of real sites, and the scripts that run against them.
hello.htmlandhello.aite: click a button, check the page changed (P1-3). Run it withnpm run aite -- run fixtures/hello.aite --config aite.config.json --headless --no-sandbox(the config must allowhttp://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 (awindow.openbutton, download links, a React controlled input).test/functional/spike.activation.test.tsserves them and records what plain events and trusted input each do in a real Chrome (results indocs/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.htmlwithpopup.htmlandpopup-stay.html(a window opened by a real click).test/functional/commands.e2e.test.tsruns 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 whatrunincludes, andcommands/checks/for whatcallruns. 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 athttp://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;--helpfor 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 verifybreaks 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.tsfails otherwise).