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
@@ -55,6 +55,7 @@ void main() {
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
await tester.pumpWidget(const MaterialApp(home: Scaffold(body: _Host())));
expect(tester.getTopLeft(find.text('Input')).dx, 16);
expect(find.text('line 0'), findsOneWidget);
// Empty space well right of the short title, left of the chevron.
final strip = tester.getRect(find.byType(StickySectionTitle));
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/ui/status/outcome_palette.dart';
void main() {
test('same outcome names share a colour; different names never do', () {
final palette = OutcomePalette([
'success',
'rejected',
'Success',
'approved',
'',
'rejected ',
]);
expect(palette.indexOf('success'), 0);
expect(palette.indexOf('SUCCESS'), 0);
expect(palette.indexOf('rejected'), 1);
expect(palette.indexOf('approved'), 2);
expect(palette.indexOf(''), isNull);
expect(palette.indexOf('never seen'), isNull);
});
test('the first fifty outcome colours are all distinct in both themes', () {
for (final brightness in Brightness.values) {
final colours = {
for (var i = 0; i < 50; i++) outcomeColorAt(i, brightness).toARGB32(),
};
expect(colours, hasLength(50), reason: '$brightness');
}
});
}