Share one list row across runs, pipelines, chat, search and schedules
AppListRow (Material + Cupertino) with avatar, bold title and trailing time, one muted line, one overflow menu style, inset dividers, selected and emphasised states and a compact mode. Pipelines get a legible initial avatar, schedule rows shrink to two lines with Edit/Pause/Delete in an overflow menu, and the shell chat list scrolls behind the bar.
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/ui/layout/app_list_row.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/floating_destination_bar.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
@@ -53,7 +54,7 @@ void main() {
|
||||
await _pumpShell(tester, size);
|
||||
expect(find.text('Select a chat to open it here.'), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<ListTile>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
isFalse,
|
||||
);
|
||||
|
||||
@@ -66,11 +67,11 @@ void main() {
|
||||
expect(find.byKey(const ValueKey('chat-thread-a')), findsOneWidget);
|
||||
expect(find.text('Second chat'), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<ListTile>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
isTrue,
|
||||
);
|
||||
expect(
|
||||
tester.widget<ListTile>(find.byKey(const Key('chat-row-b'))).selected,
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-b'))).selected,
|
||||
isFalse,
|
||||
);
|
||||
// The shell bar keeps the list's controls; the pane bar has the chat's
|
||||
@@ -91,11 +92,11 @@ void main() {
|
||||
expect(find.byKey(const ValueKey('chat-thread-a')), findsNothing);
|
||||
expect(find.byKey(const ValueKey('chat-thread-b')), findsOneWidget);
|
||||
expect(
|
||||
tester.widget<ListTile>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
isFalse,
|
||||
);
|
||||
expect(
|
||||
tester.widget<ListTile>(find.byKey(const Key('chat-row-b'))).selected,
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-b'))).selected,
|
||||
isTrue,
|
||||
);
|
||||
expect(navigator.canPop(), isFalse);
|
||||
@@ -123,7 +124,7 @@ void main() {
|
||||
await tester.pageBack();
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
tester.widget<ListTile>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
tester.widget<AppListRow>(find.byKey(const Key('chat-row-a'))).selected,
|
||||
isFalse,
|
||||
);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:ui' show Tristate;
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/chat_sessions_screen.dart';
|
||||
|
||||
import 'chat_test_harness.dart';
|
||||
@@ -59,24 +60,23 @@ void main() {
|
||||
Tristate.isTrue,
|
||||
active,
|
||||
);
|
||||
if (cupertino) {
|
||||
final tile = tester.widget<CupertinoListTile>(row);
|
||||
expect(
|
||||
tile.backgroundColor,
|
||||
active
|
||||
? CupertinoColors.tertiarySystemFill.resolveFrom(
|
||||
tester.element(row),
|
||||
)
|
||||
: isNull,
|
||||
);
|
||||
} else {
|
||||
final tile = tester.widget<ListTile>(row);
|
||||
expect(tile.selected, active);
|
||||
expect(
|
||||
tile.selectedTileColor,
|
||||
Theme.of(tester.element(row)).colorScheme.secondaryContainer,
|
||||
);
|
||||
}
|
||||
expect(tester.widget<AppListRow>(row).selected, active);
|
||||
final surface = find.descendant(
|
||||
of: row,
|
||||
matching: find.byKey(appListRowSurfaceKey),
|
||||
);
|
||||
final color = cupertino
|
||||
? tester.widget<ColoredBox>(surface).color
|
||||
: tester.widget<Material>(surface).color;
|
||||
expect(
|
||||
color,
|
||||
active
|
||||
? AppListRow.selectedColor(
|
||||
tester.element(row),
|
||||
cupertino: cupertino,
|
||||
)
|
||||
: const Color(0x00000000),
|
||||
);
|
||||
}
|
||||
|
||||
expectRow('a', true);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/session_list_cupertino.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/session_row_content.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/session_row_style.dart';
|
||||
|
||||
/// A grouped Cupertino list, the host the web client runs on macOS/iOS.
|
||||
/// The Cupertino list, the host the web client runs on macOS/iOS.
|
||||
Future<void> _pumpRows(
|
||||
WidgetTester tester,
|
||||
List<JsonMap> sessions, {
|
||||
@@ -193,7 +194,7 @@ void main() {
|
||||
|
||||
// Unread is bold with an accent time and dot; read rows are not.
|
||||
expect(_styleOf(tester, 'Unread chat').fontWeight, FontWeight.w700);
|
||||
expect(_styleOf(tester, 'Read chat').fontWeight, FontWeight.w500);
|
||||
expect(_styleOf(tester, 'Read chat').fontWeight, FontWeight.w600);
|
||||
expect(find.byKey(const Key('chat-row-unread')), findsOneWidget);
|
||||
final accent = CupertinoTheme.of(
|
||||
tester.element(find.text('5 min ago')),
|
||||
@@ -216,10 +217,10 @@ void main() {
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.byType(CupertinoListTile), findsNWidgets(2));
|
||||
expect(find.byType(AppListRow), findsNWidgets(2));
|
||||
expect(
|
||||
tester.getTopLeft(find.byKey(const Key('chat-row-s2'))).dy,
|
||||
greaterThan(
|
||||
greaterThanOrEqualTo(
|
||||
tester.getBottomLeft(find.byKey(const Key('chat-row-s1'))).dy,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/session_list_material.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/session_row_content.dart';
|
||||
import 'expand_closed.dart';
|
||||
|
||||
/// The Android host: a Material grouped list with its native separators.
|
||||
/// The Android host: the Material list with the shared row's dividers.
|
||||
Future<void> _pumpRows(
|
||||
WidgetTester tester,
|
||||
List<JsonMap> sessions, {
|
||||
@@ -107,11 +108,16 @@ void main() {
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
// Native Material separators sit between rows, not around the group.
|
||||
expect(find.byType(Divider), findsOneWidget);
|
||||
// One inset divider between the rows, none after the last; it starts
|
||||
// under the text, not at the edge.
|
||||
expect(find.byKey(appListRowDividerKey), findsOneWidget);
|
||||
expect(
|
||||
tester.getTopLeft(find.byKey(appListRowDividerKey)).dx,
|
||||
closeTo(title.left, 1),
|
||||
);
|
||||
expect(
|
||||
tester.getTopLeft(find.byKey(const Key('chat-row-s2'))).dy,
|
||||
greaterThan(
|
||||
greaterThanOrEqualTo(
|
||||
tester.getBottomLeft(find.byKey(const Key('chat-row-s1'))).dy,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -4,6 +4,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/layout/app_list_row.dart';
|
||||
import 'package:pipelines_app/features/pipelines/screen.dart';
|
||||
import 'package:pipelines_app/shell/detail_page.dart';
|
||||
|
||||
@@ -24,17 +25,32 @@ void main() {
|
||||
// Filter and sort are app-bar actions; no toolbar row without a filter.
|
||||
expect(find.byKey(const Key('pipeline-toolbar')), findsNothing);
|
||||
// Each pipeline has a deterministic tinted initial rather than one generic
|
||||
// flow icon, while the title follows native ListTile spacing.
|
||||
// flow icon, while the title follows the shared row's spacing.
|
||||
expect(find.byKey(const Key('pipeline-avatar-1')), findsOneWidget);
|
||||
expect(
|
||||
tester.getTopLeft(find.text('Alpha review')).dx,
|
||||
greaterThan(listLeft),
|
||||
);
|
||||
|
||||
// Inset dividers between rows, none after the last.
|
||||
expect(
|
||||
find.descendant(of: list, matching: find.byType(Divider)),
|
||||
find.descendant(of: list, matching: find.byKey(appListRowDividerKey)),
|
||||
findsNWidgets(fixture.summaries.length - 1),
|
||||
);
|
||||
// The divider starts under the title, not at the list edge.
|
||||
expect(
|
||||
tester.getTopLeft(find.byKey(appListRowDividerKey).first).dx,
|
||||
closeTo(tester.getTopLeft(find.text('Alpha review')).dx, 1),
|
||||
);
|
||||
// The initial is legible: a 40px circle with a large glyph.
|
||||
final avatar = find.byKey(const Key('pipeline-avatar-1'));
|
||||
expect(tester.getSize(avatar), const Size.square(40));
|
||||
expect(
|
||||
tester
|
||||
.getSize(find.descendant(of: avatar, matching: find.text('A')))
|
||||
.height,
|
||||
greaterThanOrEqualTo(14),
|
||||
);
|
||||
|
||||
// The title's trailing time and the one muted facts line replace the old
|
||||
// version/id, run metadata, and graph stack.
|
||||
@@ -196,7 +212,7 @@ void main() {
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
testWidgets('Cupertino keeps native tiles with the same row identity', (
|
||||
testWidgets('Cupertino keeps the shared row with the same row identity', (
|
||||
tester,
|
||||
) async {
|
||||
debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
|
||||
@@ -211,7 +227,12 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(CupertinoListTile), findsWidgets);
|
||||
expect(
|
||||
tester
|
||||
.widget<AppListRow>(find.byKey(const Key('pipeline-row-1')))
|
||||
.cupertino,
|
||||
isTrue,
|
||||
);
|
||||
expect(find.text('2 stages · 1 schedule'), findsOneWidget);
|
||||
expect(find.textContaining('v2 · #'), findsNothing);
|
||||
expect(find.byKey(const Key('pipeline-avatar-1')), findsOneWidget);
|
||||
|
||||
@@ -61,13 +61,18 @@ void main() {
|
||||
expect(find.text('Schedules (1)'), findsOneWidget);
|
||||
expect(find.text('Research batteries'), findsOneWidget);
|
||||
expect(
|
||||
find.text('Every 24h · mon, wed · Europe/London'),
|
||||
find.text('v3 · Every 24h · mon, wed · Europe/London'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.byKey(scheduleAddKey), findsOneWidget);
|
||||
// Edit, Pause and Delete are the row's overflow menu.
|
||||
await tester.tap(find.byKey(scheduleRowMenuKey(8)));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(scheduleRowEditKey(8)), findsOneWidget);
|
||||
expect(find.byKey(scheduleRowToggleKey(8)), findsOneWidget);
|
||||
expect(find.byKey(scheduleRowDeleteKey(8)), findsOneWidget);
|
||||
await tester.tapAt(const Offset(4, 4));
|
||||
await tester.pumpAndSettle();
|
||||
expect(gateway.callsOf('list_schedules').single.fields, {'pipeline_id': 1});
|
||||
|
||||
await tester.tap(find.text('Source'));
|
||||
|
||||
@@ -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/layout/app_list_row.dart';
|
||||
import '../../native_back.dart';
|
||||
import 'package:pipelines_app/features/graph/widgets/definition_graph_view.dart';
|
||||
import 'package:pipelines_app/features/pipelines/pipeline_repository.dart';
|
||||
@@ -122,7 +123,13 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(CupertinoPageScaffold), findsOneWidget);
|
||||
expect(find.byType(CupertinoListTile), findsWidgets);
|
||||
// The shared list row, in its Cupertino form.
|
||||
expect(
|
||||
tester
|
||||
.widget<AppListRow>(find.byKey(const Key('pipeline-row-1')))
|
||||
.cupertino,
|
||||
isTrue,
|
||||
);
|
||||
expect(find.byType(CupertinoActionSheet), findsNothing);
|
||||
await tester.tap(find.byKey(const Key('pipeline-row-1')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.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';
|
||||
import 'package:pipelines_app/features/pipelines/screen.dart';
|
||||
@@ -129,7 +130,7 @@ void main() {
|
||||
await tester.tap(find.byTooltip('Refresh'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final row = tester.widget<ListTile>(
|
||||
final row = tester.widget<AppListRow>(
|
||||
find.byKey(const Key('pipeline-row-1')),
|
||||
);
|
||||
expect(row.selected, isTrue);
|
||||
|
||||
@@ -30,16 +30,15 @@ void main() {
|
||||
|
||||
expect(find.text('2 schedules'), findsOneWidget);
|
||||
expect(find.textContaining('not pipeline definitions'), findsOneWidget);
|
||||
// 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);
|
||||
expect(find.text('Find battery chemistry sources'), findsOneWidget);
|
||||
expect(find.text('Pipeline 4 · v2'), findsOneWidget);
|
||||
expect(find.text('Workspace: /srv/research'), findsOneWidget);
|
||||
expect(find.text('Timer: Every 24h · mon, wed'), findsOneWidget);
|
||||
expect(find.text('Timezone: Europe/London'), findsOneWidget);
|
||||
expect(find.text('22 Oct 09:00'), findsOneWidget);
|
||||
expect(
|
||||
find.text('Next due: 2026-10-22 09:00 (your local time)'),
|
||||
find.text('Every 24h · mon, wed · Pipeline 4 · v2'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('Find battery chemistry sources'), findsNothing);
|
||||
|
||||
await tester.scrollUntilVisible(
|
||||
find.text('Nightly report'),
|
||||
@@ -50,11 +49,8 @@ void main() {
|
||||
),
|
||||
);
|
||||
expect(find.text('Nightly report'), findsOneWidget);
|
||||
expect(find.text('Pipeline 7 · v5'), findsOneWidget);
|
||||
expect(find.text('Workspace: /srv/reports'), findsOneWidget);
|
||||
expect(find.text('Timer: 10:00, 18:30'), findsOneWidget);
|
||||
expect(find.text('Timezone: Server timezone'), findsOneWidget);
|
||||
expect(find.text('Next due: Paused'), findsOneWidget);
|
||||
expect(find.text('10:00, 18:30 · Pipeline 7 · v5'), findsOneWidget);
|
||||
expect(find.text('Paused'), findsOneWidget);
|
||||
|
||||
if (cupertino) {
|
||||
expect(find.byType(CupertinoSearchTextField), findsOneWidget);
|
||||
|
||||
@@ -18,6 +18,20 @@ Future<void> _tapSave(WidgetTester tester) async {
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
/// Edit, Pause/Enable and Delete live in the row's overflow menu.
|
||||
Future<void> _openMenu(WidgetTester tester, int id) async {
|
||||
await tester.ensureVisible(find.byKey(scheduleRowMenuKey(id)));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(scheduleRowMenuKey(id)));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
Future<void> _pick(WidgetTester tester, Key item, int id) async {
|
||||
await _openMenu(tester, id);
|
||||
await tester.tap(find.byKey(item));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
void main() {
|
||||
testWidgets('lists this pipeline schedules with server values and states', (
|
||||
tester,
|
||||
@@ -46,21 +60,24 @@ void main() {
|
||||
|
||||
expect(find.text('Schedules (2)'), findsOneWidget);
|
||||
expect(find.text('Research batteries'), findsOneWidget);
|
||||
// Two lines: the name with its next run, then version and timer words.
|
||||
expect(
|
||||
find.text('Every 24h · mon, wed · Europe/London'),
|
||||
find.text('v2 · Every 24h · mon, wed · Europe/London'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('Paused'), findsWidgets);
|
||||
expect(find.text('Nightly report'), findsOneWidget);
|
||||
expect(
|
||||
find.text('10:00, 18:30 · Server timezone'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('Enabled'), findsOneWidget);
|
||||
expect(find.text('Paused'), findsWidgets);
|
||||
expect(find.text('Paused'), findsWidgets);
|
||||
expect(find.byKey(scheduleRowEditKey(8)), findsOneWidget);
|
||||
expect(find.text('v5 · 10:00, 18:30 · Server timezone'), findsOneWidget);
|
||||
expect(find.bySemanticsLabel(RegExp('Enabled')), findsOneWidget);
|
||||
expect(find.bySemanticsLabel(RegExp('Paused')), findsOneWidget);
|
||||
expect(find.text('Paused'), findsOneWidget);
|
||||
// The prompt and the inline text buttons are gone from the row.
|
||||
expect(find.text('Edit'), findsNothing);
|
||||
expect(find.byKey(scheduleRowMenuKey(8)), findsOneWidget);
|
||||
await _openMenu(tester, 9);
|
||||
expect(find.byKey(scheduleRowEditKey(9)), findsOneWidget);
|
||||
expect(find.byKey(scheduleRowToggleKey(9)), findsOneWidget);
|
||||
expect(find.text('Enable'), findsOneWidget);
|
||||
expect(find.byKey(scheduleRowDeleteKey(9)), findsOneWidget);
|
||||
expect(gateway.calls.map((call) => call.type), ['list_schedules']);
|
||||
expect(gateway.calls.single.fields, {'pipeline_id': 4});
|
||||
});
|
||||
@@ -187,7 +204,7 @@ void main() {
|
||||
});
|
||||
await pumpScheduleSection(tester, gateway: gateway);
|
||||
|
||||
await tester.tap(find.byKey(scheduleRowEditKey(8)));
|
||||
await _pick(tester, scheduleRowEditKey(8), 8);
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
tester
|
||||
@@ -238,14 +255,14 @@ void main() {
|
||||
});
|
||||
await pumpScheduleSection(tester, gateway: gateway);
|
||||
|
||||
await tester.tap(find.byKey(scheduleRowToggleKey(8)));
|
||||
await _pick(tester, scheduleRowToggleKey(8), 8);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
final call = gateway.callsOf('save_schedule').single;
|
||||
expect(call.fields.containsKey('request_key'), isFalse);
|
||||
expect(call.fields['schedule'], {...original, 'enabled': false});
|
||||
expect(find.text('Paused'), findsWidgets);
|
||||
expect(find.text('Paused'), findsWidgets);
|
||||
expect(find.text('Paused'), findsOneWidget);
|
||||
await _openMenu(tester, 8);
|
||||
expect(find.byKey(scheduleRowToggleKey(8)), findsOneWidget);
|
||||
expect(find.text('Enable'), findsOneWidget);
|
||||
expect(gateway.calls.map((call) => call.type), [
|
||||
@@ -264,11 +281,12 @@ void main() {
|
||||
});
|
||||
await pumpScheduleSection(tester, gateway: gateway);
|
||||
|
||||
await tester.tap(find.byKey(scheduleRowToggleKey(8)));
|
||||
await _pick(tester, scheduleRowToggleKey(8), 8);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(scheduleRowErrorKey(8)), findsOneWidget);
|
||||
expect(find.text('conflict: revision 3 is stale'), findsOneWidget);
|
||||
await _openMenu(tester, 8);
|
||||
expect(find.text('Pause'), findsOneWidget);
|
||||
expect(gateway.callsOf('list_schedules'), hasLength(1));
|
||||
});
|
||||
@@ -291,7 +309,7 @@ void main() {
|
||||
});
|
||||
await pumpScheduleSection(tester, gateway: gateway);
|
||||
|
||||
await tester.tap(find.byKey(scheduleRowDeleteKey(8)));
|
||||
await _pick(tester, scheduleRowDeleteKey(8), 8);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Delete Research batteries?'), findsOneWidget);
|
||||
expect(
|
||||
@@ -304,7 +322,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
expect(gateway.callsOf('delete_schedule'), isEmpty);
|
||||
|
||||
await tester.tap(find.byKey(scheduleRowDeleteKey(8)));
|
||||
await _pick(tester, scheduleRowDeleteKey(8), 8);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(scheduleDeleteConfirmKey));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -333,7 +351,7 @@ void main() {
|
||||
});
|
||||
await pumpScheduleSection(tester, gateway: gateway);
|
||||
|
||||
await tester.tap(find.byKey(scheduleRowDeleteKey(8)));
|
||||
await _pick(tester, scheduleRowDeleteKey(8), 8);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byKey(scheduleDeleteConfirmKey));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -392,10 +410,10 @@ void main() {
|
||||
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(find.byKey(scheduleAddKey), findsOneWidget);
|
||||
await tester.ensureVisible(find.byKey(scheduleRowDeleteKey(8)));
|
||||
await tester.pumpAndSettle();
|
||||
await _openMenu(tester, 8);
|
||||
expect(find.byKey(scheduleRowEditKey(8)), findsOneWidget);
|
||||
expect(find.byKey(scheduleRowToggleKey(8)), findsOneWidget);
|
||||
expect(find.byKey(scheduleRowDeleteKey(8)), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:pipelines_app/features/search/search_screen.dart';
|
||||
import 'package:pipelines_app/features/search/ui/search_bar_controls.dart';
|
||||
import 'package:pipelines_app/features/search/ui/search_bounds_note.dart';
|
||||
import 'package:pipelines_app/features/search/ui/search_layout.dart';
|
||||
import 'package:pipelines_app/features/search/ui/search_result_view.dart';
|
||||
import 'package:pipelines_app/ui/layout/app_list_row.dart';
|
||||
import 'package:pipelines_app/ui/adaptive/segmented_bar.dart';
|
||||
|
||||
import 'search_screen_test.dart'
|
||||
@@ -95,7 +95,7 @@ void main() {
|
||||
expect(find.textContaining('Results truncated'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('$host: rows show a bold title, a kind tag and one line', (
|
||||
testWidgets('$host: rows are the shared row: title, kind-led line', (
|
||||
tester,
|
||||
) async {
|
||||
_size(tester, 390);
|
||||
@@ -110,8 +110,10 @@ void main() {
|
||||
|
||||
final row = find.byKey(const ValueKey('search.result.run:11:4:output'));
|
||||
expect(row, findsOneWidget);
|
||||
expect(tester.widget<AppListRow>(row).cupertino, cupertino);
|
||||
// The kind leads the one muted line, before the snippet.
|
||||
expect(
|
||||
find.descendant(of: row, matching: find.byType(SearchKindTag)),
|
||||
find.descendant(of: row, matching: find.textContaining('Field · ')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user