fix(chat): use stock Navigator Back at every screen width
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:pipelines_app/features/chat/conversation/chat_thread_view.dart';
|
||||
import 'package:pipelines_app/features/chat/ui/sessions/chat_sessions_screen.dart';
|
||||
|
||||
import '../core/transport/pipelines_client_test.dart' show FakeChannel;
|
||||
import '../native_back.dart';
|
||||
|
||||
ServerEndpoint webServer() => ServerEndpoint.resolve(
|
||||
base: Uri.parse('http://127.0.0.1:8096/'),
|
||||
@@ -188,6 +189,7 @@ void main() {
|
||||
await replySessions(tester, channel);
|
||||
await replySubscribe(tester, channel);
|
||||
await replyHistory(tester, channel);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(provider.value.uri.path, '/chat/s1');
|
||||
expect(find.byType(ChatThreadView), findsOneWidget);
|
||||
@@ -234,10 +236,9 @@ void main() {
|
||||
// The open chat takes over the app bar: one Back there, and no
|
||||
// second header row under it.
|
||||
expect(find.byKey(const Key('chat-thread-header')), findsNothing);
|
||||
await tester.tap(find.byKey(const ValueKey('shell.back')));
|
||||
await tester.pump();
|
||||
// The bar hands back to the list on the next frame.
|
||||
await tester.pump();
|
||||
await tester.tap(findNativeBack());
|
||||
// A real Navigator pop finishes its native reverse transition.
|
||||
await tester.pumpAndSettle();
|
||||
expect(provider.value.uri.path, '/chat');
|
||||
expect(find.byType(ChatThreadView), findsNothing);
|
||||
expect(find.byType(ChatSessionsScreen), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user