From 9a252b67afb18e023db58ea5b13c047829330247 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Sat, 7 Nov 2026 19:39:35 +0000 Subject: [PATCH] Follow settings topic navigation in template wiring tests --- .../application/templates_wiring_test.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test/application/templates_wiring_test.dart b/app/test/application/templates_wiring_test.dart index 51265d09..bc5e9b99 100644 --- a/app/test/application/templates_wiring_test.dart +++ b/app/test/application/templates_wiring_test.dart @@ -18,6 +18,7 @@ import '../features/templates/ui/template_gallery_test_support.dart' show GalleryGateway, galleryTemplates, pumpGallery, templatesReply; import 'pipelines_app_test.dart' show webServer; import 'pipelines_replies.dart'; +import '../features/settings/settings_topic_test_helper.dart'; import 'package:pipelines_app/ui/adaptive/segmented_bar.dart'; List> requestsOf(FakeChannel channel, String type) => @@ -103,15 +104,9 @@ Future openSettings( 'build': {'version': 'probe'}, 'time': 'fixture', }); - // It then loads the server's ntfy notification settings. - await reply(tester, channel, 'notification_settings', 1, { - 'type': 'notification_settings', - 'notification_settings': { - 'run_finished': true, - 'chat_needs_you': true, - 'chat_reply_finished': false, - }, - }); + // Hidden notification settings do not load during this navigation flow. + expect(requestsOf(channel, 'notification_settings'), isEmpty); + await selectSettingsTopic(tester, 'Connection'); } Future openTemplates( @@ -120,6 +115,7 @@ Future openTemplates( PlatformRouteInformationProvider provider, { int listRead = 1, }) async { + await selectSettingsTopic(tester, 'Tools'); await tester.ensureVisible(find.byKey(SettingsKeys.templates)); await tester.tap(find.byKey(SettingsKeys.templates)); await tester.pump(); @@ -241,6 +237,8 @@ void main() { expect(provider.value.uri.path, '/settings'); expect(find.byType(TemplatesScreen), findsNothing); + expect(find.byKey(SettingsKeys.templates), findsOneWidget); + await selectSettingsTopic(tester, 'Connection'); expect(find.text('edited url'), findsOneWidget); expect(find.text('Server URL'), findsOneWidget); expect(sockets, 1); @@ -255,6 +253,8 @@ void main() { await tester.pumpAndSettle(); expect(provider.value.uri.path, '/settings'); expect(find.byType(TemplatesScreen), findsNothing); + expect(find.byKey(SettingsKeys.templates), findsOneWidget); + await selectSettingsTopic(tester, 'Connection'); expect(find.text('edited url'), findsOneWidget); expect(requestsOf(channel, 'list_templates'), hasLength(2)); expect(sockets, 1);