fix(chat): use stock Navigator Back at every screen width

This commit is contained in:
2026-10-24 12:36:17 +01:00
parent 0ecd4a8487
commit f22afabd94
16 changed files with 262 additions and 53 deletions
+6 -5
View File
@@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import '../native_back.dart';
import 'package:pipelines_app/application/app_route.dart';
import 'package:pipelines_app/application/app_router.dart';
import 'package:pipelines_app/application/pipelines_app.dart';
@@ -160,11 +161,11 @@ void main() {
await replyDetail(tester, channel, 1);
expect(find.text('Run 1'), findsWidgets);
expect(find.byKey(const ValueKey('shell.back')), findsOneWidget);
expect(findNativeBack(), findsOneWidget);
expect(provider.value.uri.path, '/runs/1');
expect(find.text('Pipelines — Not implemented'), findsNothing);
await tester.tap(find.byKey(const ValueKey('shell.back')));
await tester.tap(findNativeBack());
await tester.pump();
expect(provider.value.uri.path, '/runs');
expect(find.text('Deep-linked run'), findsWidgets);
@@ -267,7 +268,7 @@ void main() {
await tester.pump();
expect(provider.value.uri.path, '/runs/2');
await replyDetail(tester, channel, 2);
expect(find.byKey(const ValueKey('shell.back')), findsOneWidget);
expect(findNativeBack(), findsOneWidget);
// The engine's browser Back arrives as new route information.
await provider.didPushRouteInformation(
@@ -277,7 +278,7 @@ void main() {
// The bar returns to the tab's own after the closed run hands it back.
await tester.pump();
expect(find.text('Beta run'), findsWidgets);
expect(find.byKey(const ValueKey('shell.back')), findsNothing);
expect(findNativeBack(), findsNothing);
// Forward re-opens the same run.
await provider.didPushRouteInformation(
@@ -286,7 +287,7 @@ void main() {
await tester.pump();
await replyDetail(tester, channel, 2);
await tester.pump();
expect(find.byKey(const ValueKey('shell.back')), findsOneWidget);
expect(findNativeBack(), findsOneWidget);
});
testWidgets('a malformed boot path is corrected to /pipelines', (