feat(app): pipeline rows show the last run's status glyph, as the web
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/ui/status/run_status_icon.dart';
|
||||
import 'package:pipelines_app/features/pipelines/screen.dart';
|
||||
import 'package:pipelines_app/features/pipelines/widgets/pipeline_list_panel.dart';
|
||||
|
||||
@@ -38,14 +39,17 @@ void main() {
|
||||
);
|
||||
|
||||
// The version trails the title line; the recorded facts are one line and
|
||||
// the run line keeps the web's state word and fragments.
|
||||
// the run line is the web's status glyph plus its fragments.
|
||||
expect(find.text('v2'), findsOneWidget);
|
||||
expect(
|
||||
find.text('id 1 · 2 stages · 1 schedule · updated 17 Oct 21:26'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.textContaining('Succeeded · '), findsOneWidget);
|
||||
expect(find.textContaining('Failed · '), findsOneWidget);
|
||||
final glyphs = tester
|
||||
.widgetList<RunStatusIcon>(find.byType(RunStatusIcon))
|
||||
.map((icon) => icon.label);
|
||||
expect(glyphs, unorderedEquals(['Succeeded', 'Failed']));
|
||||
expect(find.textContaining('Succeeded'), findsNothing);
|
||||
expect(find.text('no runs recorded'), findsOneWidget);
|
||||
});
|
||||
|
||||
@@ -131,7 +135,12 @@ void main() {
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('v2'), findsOneWidget);
|
||||
expect(find.textContaining('Succeeded · '), findsOneWidget);
|
||||
expect(
|
||||
find.byWidgetPredicate(
|
||||
(widget) => widget is RunStatusIcon && widget.label == 'Succeeded',
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
} finally {
|
||||
debugDefaultTargetPlatformOverride = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user