feat(app): graphs draw stages in one row with Failure and Success below, as the web and TUI

This commit is contained in:
2026-10-23 16:02:15 +01:00
parent c12e1dc936
commit 15f83c19dd
5 changed files with 617 additions and 19 deletions
@@ -262,6 +262,31 @@ void main() {
_expectNoOverlaps(tester);
});
testWidgets('stages run in one row with Failure and Success below it', (
tester,
) async {
await tester.pumpWidget(_materialHost(linearGraph()));
await _settle(tester);
// As the web and the TUI: the stages read left to right on one row.
final stages = [
for (final key in ['plan', 'build', 'ship']) _nodeRect(tester, key),
];
for (final rect in stages.skip(1)) {
expect(rect.center.dy, moreOrLessEquals(stages.first.center.dy));
}
expect(stages[0].right, lessThan(stages[1].left));
expect(stages[1].right, lessThan(stages[2].left));
// The ends share a lower row, Failure on the left.
final failure = _nodeRect(tester, '#failure');
final success = _nodeRect(tester, '#success');
expect(failure.top, moreOrLessEquals(success.top));
expect(failure.top, greaterThan(stages.first.bottom));
expect(failure.right, lessThan(success.left));
_expectNoOverlaps(tester);
});
testWidgets('unknown endpoints stay honest and invent no node', (
tester,
) async {