Merge branch 'worktree-agent-a099cbf073f6e9e51' into integrate/shell-wide
# Conflicts: # app/lib/features/runs/ui/run_detail_tabs.dart
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/shell/empty_detail_pane.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
|
||||
@@ -52,7 +53,10 @@ void main() {
|
||||
testWidgets('a wide window keeps the tab bar and list beside the open chat '
|
||||
'at $size', (tester) async {
|
||||
await _pumpShell(tester, size);
|
||||
expect(find.text('Select a chat to open it here.'), findsOneWidget);
|
||||
expect(
|
||||
find.widgetWithText(EmptyDetailPane, 'Select a chat to open it here.'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
isFalse,
|
||||
|
||||
@@ -112,9 +112,9 @@ void main() {
|
||||
|
||||
await _pumpPipelines(tester, gateway: gateway, pipelineId: 1, version: 2);
|
||||
|
||||
// The detail is open (not the "Select a pipeline." placeholder), and the
|
||||
// The detail is open (not the "Select a pipeline to open it here." placeholder), and the
|
||||
// detail request names the route's pinned version.
|
||||
expect(find.text('Select a pipeline.'), findsNothing);
|
||||
expect(find.text('Select a pipeline to open it here.'), findsNothing);
|
||||
expect(find.text('Alpha review'), findsWidgets);
|
||||
expect(
|
||||
gateway
|
||||
|
||||
@@ -116,7 +116,7 @@ void main() {
|
||||
|
||||
expect(find.text('pipeline 2 was not found'), findsOneWidget);
|
||||
expect(find.text('Retry'), findsOneWidget);
|
||||
expect(find.text('Select a pipeline.'), findsNothing);
|
||||
expect(find.text('Select a pipeline to open it here.'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('the list switches between all and scheduled pipelines', (
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/shell/empty_detail_pane.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
import 'package:pipelines_app/features/pipelines/ui/run_pipeline_wording.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
@@ -25,7 +26,13 @@ void main() {
|
||||
expect(find.textContaining('run 42'), findsNothing);
|
||||
// A pipeline that never ran shows its summary alone, with no status dot.
|
||||
expect(find.text('no runs recorded'), findsNothing);
|
||||
expect(find.text('Select a pipeline.'), findsOneWidget);
|
||||
expect(
|
||||
find.widgetWithText(
|
||||
EmptyDetailPane,
|
||||
'Select a pipeline to open it here.',
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.tap(find.byKey(const Key('pipeline-row-1')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -218,7 +218,8 @@ void main() {
|
||||
);
|
||||
// The grid spans the Summary, and its one fact is at the start of the
|
||||
// line rather than a half-width block centred on the page.
|
||||
expect(grid.width, moreOrLessEquals(900));
|
||||
// Full Summary width, up to the shared reading cap (840) on wide panes.
|
||||
expect(grid.width, moreOrLessEquals(840));
|
||||
expect(stage.left, moreOrLessEquals(16));
|
||||
expect(stage.center.dx, lessThan(450));
|
||||
expect(find.byType(CupertinoListSection), findsNothing);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/ui/layout/reading_width.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/run_graph_preview.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/run_more_menu.dart';
|
||||
import 'package:pipelines_app/features/graph/widgets/run_graph_view.dart';
|
||||
@@ -113,8 +114,10 @@ void main() {
|
||||
expect(widePill.right, 1000 - 16);
|
||||
expect(widePill.bottom, 844 - 16);
|
||||
expect(widePill.width, lessThan(1000 * 0.6));
|
||||
// Beside the bar the content takes taps: the body spans the width.
|
||||
expect(tester.getRect(body).width, 1000);
|
||||
// Beside the bar the content takes taps: the body spans the reading
|
||||
// width from the leading edge (Summary is capped on a wide pane).
|
||||
expect(tester.getRect(body).left, 0);
|
||||
expect(tester.getRect(body).width, kReadingMaxWidth);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} missing graph states the exact wording', (
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/features/runs/screen.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/run_detail_view.dart';
|
||||
import 'run_detail_finders.dart';
|
||||
import 'package:pipelines_app/shell/empty_detail_pane.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/segmented_bar.dart';
|
||||
|
||||
class _Gateway implements ApiGateway {
|
||||
@@ -154,6 +155,11 @@ void main() {
|
||||
) async {
|
||||
await tester.pumpWidget(_materialScreen(gateway));
|
||||
await _mountList(tester, gateway);
|
||||
// Beside the list, nothing open yet: the shared empty-pane placeholder.
|
||||
expect(
|
||||
find.widgetWithText(EmptyDetailPane, 'Select a run to open it here.'),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.tap(find.text('Beta run'));
|
||||
await tester.pump();
|
||||
|
||||
@@ -13,8 +13,9 @@ Future<void> pumpSchedules(
|
||||
ValueChanged<SavedSchedule>? onOpen,
|
||||
double textScale = 1,
|
||||
bool settle = true,
|
||||
Size size = const Size(390, 844),
|
||||
}) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
addTearDown(tester.view.resetDevicePixelRatio);
|
||||
|
||||
@@ -29,7 +29,9 @@ void main() {
|
||||
);
|
||||
|
||||
expect(find.text('2 schedules'), findsOneWidget);
|
||||
expect(find.textContaining('not pipeline definitions'), findsOneWidget);
|
||||
// The strip carries the count only; the helper line lives in the
|
||||
// empty state.
|
||||
expect(find.textContaining('not pipeline definitions'), findsNothing);
|
||||
// Two lines per row: the name with its next run, then the timer
|
||||
// and pinned pipeline version. The editor holds the rest.
|
||||
expect(find.text('Research batteries'), findsOneWidget);
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/schedules/ui/list/schedule_list_toolbar.dart';
|
||||
import 'package:pipelines_app/features/schedules/ui/list/schedule_list_view.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
|
||||
import 'schedule_list_test_support.dart';
|
||||
import 'schedule_screen_harness.dart';
|
||||
|
||||
/// On a wide window the rows share the toolbar strip's width, and the strip
|
||||
/// is one row: the field, the filter and the count as a muted label.
|
||||
void main() {
|
||||
for (final cupertino in [false, true]) {
|
||||
final host = cupertino ? 'Cupertino' : 'Material';
|
||||
|
||||
testWidgets('$host 1200: rows end under the strip and the strip is one '
|
||||
'row', (tester) async {
|
||||
await pumpSchedules(
|
||||
tester,
|
||||
cupertino: cupertino,
|
||||
size: const Size(1200, 800),
|
||||
gateway: FakeSchedulesGateway(
|
||||
(type, fields) async => schedulesReply([
|
||||
scheduleRecord(nextDue: '2026-10-22T09:00:00'),
|
||||
pausedRecord(),
|
||||
]),
|
||||
),
|
||||
);
|
||||
final strip = tester.getRect(find.byKey(scheduleToolbarKey));
|
||||
final row = tester.getRect(find.byKey(appListRowSurfaceKey).first);
|
||||
expect(row.left, 0);
|
||||
expect(row.width, kScheduleListMaxWidth);
|
||||
// The row's trailing time ends inside the strip's trailing edge.
|
||||
// The trailing time is the row's rightmost text, whatever its wording.
|
||||
final time = find
|
||||
.descendant(
|
||||
of: find.byKey(appListRowSurfaceKey).first,
|
||||
matching: find.byType(Text),
|
||||
)
|
||||
.evaluate()
|
||||
.map((element) => tester.getRect(find.byWidget(element.widget)))
|
||||
.reduce((a, b) => a.right >= b.right ? a : b);
|
||||
expect(time.right, lessThanOrEqualTo(strip.right - 12 + 0.5));
|
||||
|
||||
// Field, filter and count on one line.
|
||||
final field = tester.getRect(find.byKey(scheduleSearchFieldKey));
|
||||
final filter = tester.getRect(find.byKey(scheduleFilterKey));
|
||||
final count = tester.getRect(find.text('2 schedules'));
|
||||
expect((field.center.dy - filter.center.dy).abs(), lessThan(4));
|
||||
expect((count.center.dy - filter.center.dy).abs(), lessThan(4));
|
||||
expect(find.textContaining('not pipeline definitions'), findsNothing);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user