feat: switch main navigation to stateful shell tabs
This commit is contained in:
@@ -3,6 +3,11 @@ import 'package:social_app/features/home/ui/navigation/home_return_policy.dart';
|
||||
|
||||
void main() {
|
||||
group('resolveHomeReturnAction', () {
|
||||
test('dock home action should always resolve to goHome', () {
|
||||
final action = resolveHomeReturnAction(canPop: true, isAuthEntry: false);
|
||||
expect(action, HomeReturnAction.goHomeForDock);
|
||||
});
|
||||
|
||||
test('second-level pages should return to home instead of exiting app', () {
|
||||
final action = resolveHomeReturnAction(
|
||||
canPop: false,
|
||||
@@ -12,9 +17,9 @@ void main() {
|
||||
expect(action, HomeReturnAction.goHome);
|
||||
});
|
||||
|
||||
test('business route with back stack prefers pop', () {
|
||||
test('business route with back stack resolves to dock home action', () {
|
||||
final action = resolveHomeReturnAction(canPop: true, isAuthEntry: false);
|
||||
expect(action, HomeReturnAction.pop);
|
||||
expect(action, HomeReturnAction.goHomeForDock);
|
||||
});
|
||||
|
||||
test('business route without back stack falls back to go home', () {
|
||||
|
||||
Reference in New Issue
Block a user