23 lines
858 B
Dart
23 lines
858 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
|
|
|
|
/// Wide screens deliberately repeat the selected title in the visible list.
|
|
Finder runDetailText(String text) =>
|
|
find.descendant(of: find.byType(RunDetailView), matching: find.text(text));
|
|
|
|
/// Stage identity and visit coordinates are separate rendered fields now.
|
|
void expectVisitHeading(WidgetTester tester, String stage, num sequence) {
|
|
final pane = find.byKey(const Key('run-visit-pane'));
|
|
expect(pane, findsOneWidget);
|
|
final title = find.descendant(
|
|
of: pane,
|
|
matching: find.byKey(const Key('run-visit-title')),
|
|
);
|
|
expect(tester.widget<Text>(title).data, stage);
|
|
expect(
|
|
find.descendant(of: pane, matching: find.text('Visit $sequence')),
|
|
findsOneWidget,
|
|
);
|
|
}
|