Skip to content

feat(platform): add tests from a path and show what they cover - #4813

Merged
yannickmonney merged 3 commits into
mainfrom
feat/automation-test-coverage
Oct 11, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
feat/automation-test-coverage

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

Tests start from where the automation already is, and say which of its paths they cover (P5 S10b2). Builds on the Setup form of #4812.

Add test

  • When the automation has more to start from, Add test opens a menu: Blank test (as before), From the trigger's input and For an untested path.
  • From the trigger's input starts with the input the bound trigger hands a run: a schedule firing at a fixed moment, a webhook's sample delivery or an event's example. The test gets the same input every time it runs.
  • For an untested path lists each possible path no test goes down yet, in the Paths list's own words ("Path 2: Publish is skipped"). Picking one adds a test named after the path (Takes path 2). The test simulates each failure the path needs and expects each step's state on it. Its description says which condition the input must make true or false. Once every path has a test, the menu reads Every path has a test, greyed out.

Coverage

  • After a run, the line above the tests says how many possible paths they go down (Covers 1 of 2 paths). Selecting it opens the canvas's Possible paths.
  • Each path in Possible paths ends in Tested by with the tests' names, or Not tested.
  • A test counts for the path its latest result actually took. A result changed since counts for none.
  • Long path clauses now wrap instead of being cut off (FlowPathList, @tale/ui). One line still reads as a pill.

Docs and manual

  • The testing page (EN/DE/FR) describes the menu and the coverage line, with a new screenshot from the pipeline (automation-test-coverage).
  • The tests demo (Order discounts) gains a conditional Review step, for an order of a thousand or more. Neither test reaches it, so the shot shows one of two paths covered. automation-tests and automation-test-setup are recaptured with it.
  • Manual: AUTO-F172, AUTO-F173, and a reference row for the automated coverage.

Verification (local)

  • Platform tsc; oxlint on the changed files and the automations, routes and engine trees.

  • The whole server and PII projects: 87,723 of 87,724 pass. The one red, tests/guards/automation-legacy-agent-flow.test.ts, was red on main too; fix(cli): repair merge-group checks #4809 has since updated its pinned hash. This branch touches neither file.

  • The whole platform UI suite: 7,526 of 7,526. Automations browser tests: 93 of 93.

  • @tale/ui unit (4,094) and browser (223, incl. the flow components), services/docs (709) and services/ui-docs (106) tests, lint:links, lint:manual, knip, format.

  • New tests:

    • which tests go down which path, with a result changed since counting for none (coverage.test.ts);
    • the Paths list naming the tests on each path (paths.test.ts);
    • the add menu, its submenu of untested paths, the all-tested item and the coverage line opening the paths (automation-tests-panel.test.tsx);
    • a test from the trigger's input in the editor (automation-editor.test.tsx).
  • Live in Chromium on a local stack (a weekly digest with a conditional Publish step):

    • The menu offers Blank test and For an untested path → "Path 1: Publish runs" / "Path 2: Publish is skipped".
    • The new Takes path 2 says "Make the condition of Publish false, so it is skipped." Until its input does, its run goes down Path 1 and the test fails, as it should.
    • Covers 1 of 2 paths opens Possible paths: Path 1 "Tested by Takes path 2" (the path the run took), Path 2 "Not tested".
    • No console errors.
  • The capture pipeline's run on Order discounts: after Run all, Path 2 (Review skipped) reads "Tested by Small order pays full price and Big order gets 10% off", now on two lines, and Path 1 "Not tested".

The Paths list's clause chips truncated at the list's width, so a clause naming the tests that go down a path lost its end. A chip now wraps its words onto a second line; one line still reads as a pill.
Add test opens a menu when the automation has more to start from: a blank test, a test from the bound trigger's input, or a test for a possible path no test goes down yet, named after the path, with what the path needs in its description. Once tests have run, the line above the list says how many paths they cover and opens the canvas's Possible paths, where each path names the tests that go down it or says it is not tested.
The testing page describes Add test's menu and the coverage line, with a new screenshot of the possible paths after Run all. The tests demo gains a Review step for orders of a thousand or more, which neither test reaches, so the shot shows one of two paths covered; the two earlier tests shots are taken again with it.
@yannickmonney yannickmonney changed the title feat(platform): add tests from the trigger or an untested path, and show what they cover feat(platform): add tests from a path and show what they cover Oct 11, 2026
@yannickmonney
yannickmonney merged commit 5481c09 into main Oct 11, 2026
@yannickmonney
yannickmonney deleted the feat/automation-test-coverage branch October 11, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant