Merge branch 'main' into worktree-agent-aab11f4f1fe3dff6b
# Conflicts: # app/test/features/runs/ui/run_list_row_test.dart
This commit is contained in:
@@ -181,7 +181,7 @@ void main() {
|
||||
await pumpDeepLink(tester, RunDetailTestPlatform.material, stage: 'plan');
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expectVisitHeading(tester, 'plan', 5);
|
||||
expectVisitHeading(tester, 'plan', 2);
|
||||
});
|
||||
|
||||
testWidgets('a Graph click opens the same latest visit as the stage route', (
|
||||
@@ -195,7 +195,7 @@ void main() {
|
||||
// The web client's graph click takes the last visit in sequence order, not
|
||||
// the last row in reply order, so both entry points agree.
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expectVisitHeading(tester, 'plan', 5);
|
||||
expectVisitHeading(tester, 'plan', 2);
|
||||
});
|
||||
|
||||
testWidgets('an out-of-range visit is clamped to the stage last visit', (
|
||||
@@ -209,7 +209,7 @@ void main() {
|
||||
);
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expectVisitHeading(tester, 'plan', 5);
|
||||
expectVisitHeading(tester, 'plan', 2);
|
||||
});
|
||||
|
||||
testWidgets('a declared but unvisited stage selects its graph node', (
|
||||
@@ -259,7 +259,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expectVisitHeading(tester, 'plan', 5);
|
||||
expectVisitHeading(tester, 'plan', 2);
|
||||
});
|
||||
|
||||
testWidgets('a route change applies its visit and a plain route closes it', (
|
||||
@@ -301,7 +301,7 @@ void main() {
|
||||
|
||||
rebuild(() => visit = 1);
|
||||
await tester.pumpAndSettle();
|
||||
expectVisitHeading(tester, 'plan', 5);
|
||||
expectVisitHeading(tester, 'plan', 2);
|
||||
|
||||
rebuild(() => stage = null);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -14,8 +14,8 @@ Finder runDetailText(String text) => find.descendant(
|
||||
);
|
||||
|
||||
/// The stage page's bar names the stage over its visit (and run): the title
|
||||
/// is keyed `run-visit-title` and the subtitle starts `Visit <sequence>`.
|
||||
void expectVisitHeading(WidgetTester tester, String stage, num sequence) {
|
||||
/// is keyed `run-visit-title` and the subtitle starts `Visit <stage visit>`.
|
||||
void expectVisitHeading(WidgetTester tester, String stage, num visit) {
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
final heading = find.byKey(const Key('run-visit-title'));
|
||||
expect(
|
||||
@@ -25,7 +25,7 @@ void expectVisitHeading(WidgetTester tester, String stage, num sequence) {
|
||||
expect(
|
||||
find.descendant(
|
||||
of: heading,
|
||||
matching: find.textContaining(RegExp('^Visit $sequence( ·|\$)')),
|
||||
matching: find.textContaining(RegExp('^Visit $visit( ·|\$)')),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
@@ -100,7 +100,7 @@ void main() {
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsNothing);
|
||||
expect(find.byType(RunTimelineList), findsOneWidget);
|
||||
expect(find.text('plan · visit 1'), findsOneWidget);
|
||||
expect(find.text('plan · Visit 1'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} visit pane at 320 with 2x dark text', (
|
||||
|
||||
@@ -201,17 +201,17 @@ void main() {
|
||||
matching: find.byType(Scrollable),
|
||||
);
|
||||
await tester.scrollUntilVisible(
|
||||
find.textContaining('build · visit 3'),
|
||||
find.textContaining('build · Visit 1').last,
|
||||
200,
|
||||
scrollable: timelineScroll,
|
||||
);
|
||||
expect(find.textContaining('build · visit 3'), findsOneWidget);
|
||||
expect(find.textContaining('build · Visit 1').last, findsOneWidget);
|
||||
await tester.scrollUntilVisible(
|
||||
find.textContaining('test · visit 4'),
|
||||
find.textContaining('test · Visit 1').last,
|
||||
200,
|
||||
scrollable: timelineScroll,
|
||||
);
|
||||
expect(find.textContaining('test · visit 4'), findsOneWidget);
|
||||
expect(find.textContaining('test · Visit 1').last, findsOneWidget);
|
||||
|
||||
final before = tester
|
||||
.state<ScrollableState>(timelineScroll)
|
||||
|
||||
@@ -58,7 +58,7 @@ void main() {
|
||||
);
|
||||
Rect at(String text) => tester.getRect(find.text(text));
|
||||
final title = at('Ship the release notes');
|
||||
final age = at('12h ago');
|
||||
final age = at('12h');
|
||||
final subtitle = at('release · 2m 5s · 3 steps');
|
||||
|
||||
expect(age.center.dy, moreOrLessEquals(title.center.dy));
|
||||
|
||||
@@ -113,7 +113,7 @@ void main() {
|
||||
);
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expectVisitHeading(tester, 'build', 2);
|
||||
expectVisitHeading(tester, 'build', 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -65,13 +65,13 @@ void main() {
|
||||
await _openVisitChanges(tester);
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
// The body keeps the landed viewer's own identity for that visit.
|
||||
// The stage is already named in the page bar, so Changes does not repeat it.
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byType(ChangesViewer),
|
||||
matching: find.text('plan'),
|
||||
),
|
||||
findsOneWidget,
|
||||
findsNothing,
|
||||
);
|
||||
expect(find.text('Visit 1 · completed'), findsOneWidget);
|
||||
expect(find.text('lib/plan.dart'), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user