polish compact pipeline and run lists

This commit is contained in:
2026-10-31 02:11:24 +00:00
parent 24a9a61219
commit 6a7dfae2a1
9 changed files with 199 additions and 529 deletions
@@ -43,7 +43,9 @@ void main() {
expect(running.progress, '1 step · at review');
});
testWidgets('a run row places its facts in the corners', (tester) async {
testWidgets('a normal row groups its title, age, and one subtitle', (
tester,
) async {
tester.view.physicalSize = const Size(800, 400);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
@@ -56,21 +58,16 @@ void main() {
);
Rect at(String text) => tester.getRect(find.text(text));
final title = at('Ship the release notes');
final number = at('#42');
final pipeline = at('release');
final duration = at('2m 5s');
final steps = at('3 steps');
// Left column: run, pipeline, time; right column: number, duration, steps.
expect(number.center.dy, moreOrLessEquals(title.center.dy));
expect(duration.center.dy, moreOrLessEquals(pipeline.center.dy));
expect(pipeline.top, greaterThanOrEqualTo(title.bottom));
expect(steps.top, greaterThanOrEqualTo(duration.bottom));
for (final right in [number, duration, steps]) {
expect(right.right, greaterThan(800 - 32));
}
final age = at('12h ago');
final subtitle = at('release · 2m 5s · 3 steps');
expect(age.center.dy, moreOrLessEquals(title.center.dy));
expect(subtitle.top, greaterThanOrEqualTo(title.bottom));
expect(find.text('#42'), findsNothing);
expect(find.byIcon(Icons.check_circle_outline), findsOneWidget);
});
testWidgets('uses a muted pipeline fallback only when it is absent', (
testWidgets('includes a pipeline fallback in its single subtitle', (
tester,
) async {
await tester.pumpWidget(
@@ -84,7 +81,10 @@ void main() {
),
);
expect(find.text('Pipeline unavailable'), findsOneWidget);
expect(
find.text('Pipeline unavailable · 2m 5s · 3 steps'),
findsOneWidget,
);
});
testWidgets('gives a list action menu a per-run key', (tester) async {