fix(chat): remove remaining router Back interception
This commit is contained in:
@@ -71,7 +71,7 @@ void main() {
|
||||
router = AppRouterDelegate(
|
||||
initial: AppRoute.chat,
|
||||
cupertino: false,
|
||||
onPopToChat: () => router.goTo(AppRoute.chat),
|
||||
onPopToChat: () => fail('Chat Back must not use the router override'),
|
||||
onPopToRuns: () {},
|
||||
builder: (_, route) => AdaptiveShell(
|
||||
destination: AppDestination.chat,
|
||||
@@ -115,6 +115,14 @@ void main() {
|
||||
isTrue,
|
||||
reason: 'Chat must be pushed, not swapped into the main page',
|
||||
);
|
||||
expect(
|
||||
find.byWidgetPredicate(
|
||||
(widget) => widget is PopScope && !widget.canPop,
|
||||
),
|
||||
findsNothing,
|
||||
reason:
|
||||
'The main-screen Back interceptor must not block an open chat',
|
||||
);
|
||||
expect(
|
||||
tester.widget<BackButton>(findNativeBack()).onPressed,
|
||||
isNull,
|
||||
|
||||
Reference in New Issue
Block a user