chain-studio-flow-editor/test
flemming-it ae443c6f81 test(editor): three widget cases pin type-token recolouring
Locks the FlowYamlCodeController.buildTextSpan post-processing
against silent regression. The original 0.15.0 ship used the
wrong regex — `type: <name>` instead of `<field>: <name>` —
and no test caught it; the only signal was the user saying 'I
see no colours'. These cases would have flipped red.

Covers:

  - indented `field: bytes` value gets the wire-bytes hue +
    the 600 weight that signals 'recoloured by F∆I' (and not
    the highlighter's stock string colour)
  - top-level `name: text` is NOT flagged as a type decl
    even though the right-hand side reads as a known type
    token — the leading-whitespace guard must hold
  - explicit `type: bytes` row in a module-shape inputs list
    still gets recoloured (the regex now handles both shapes
    via the same key:value pattern)

Tests render the controller into a tiny MaterialApp tree, walk
the produced span tree, and assert colour+weight on the
matching leaf. Pumping a full second after layout drains the
analyzer's 500ms debounce timer so the harness doesn't leak it.

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-04 02:48:54 +02:00
..
editor_controller_test.dart feat(editor): properties-panel toggle + LabVIEW-style type colours 2026-06-02 11:13:01 +02:00
flow_analyzer_test.dart fix(editor): match real F∆I YAML type shape + warn on bad types 2026-06-04 02:24:29 +02:00
flow_graph_test.dart test(editor): exercise the extract-with-approval flow shape 2026-06-01 02:01:46 +02:00
flow_node_test.dart feat(editor): type-checked connections + card-height fix + widget tests 2026-06-02 01:29:00 +02:00
flow_yaml_controller_test.dart test(editor): three widget cases pin type-token recolouring 2026-06-04 02:48:54 +02:00