Merge branch 'main' into run/formats-wording

This commit is contained in:
2026-10-31 12:29:16 +00:00
18 changed files with 381 additions and 54 deletions
@@ -56,4 +56,40 @@ void main() {
expect(find.text('→ #failure'), findsOneWidget);
});
}
for (final cupertino in [false, true]) {
testWidgets('outcome chips are coloured by name, not by status '
'(${cupertino ? 'cupertino' : 'material'})', (tester) async {
// Every step completed: before, all three chips were the success colour.
final steps = [
for (final (i, outcome) in [
'success',
'rejected',
'success',
'approved',
].indexed)
{
'stage': 'stage$i',
'sequence': i + 1,
'status': 'completed',
'outcome': outcome,
},
];
final list = RunTimelineList(
visits: detailTimeline(steps),
cupertino: cupertino,
);
await tester.pumpWidget(
cupertino
? CupertinoApp(home: CupertinoPageScaffold(child: list))
: MaterialApp(home: Scaffold(body: list)),
);
Color chip(String text, [int at = 0]) =>
tester.widget<Text>(find.text(text).at(at)).style!.color!;
expect(chip('success'), chip('success', 1));
expect(chip('rejected'), isNot(chip('success')));
expect(chip('approved'), isNot(chip('success')));
expect(chip('approved'), isNot(chip('rejected')));
});
}
}