feat: switch main navigation to stateful shell tabs

This commit is contained in:
qzl
2026-03-20 15:31:08 +08:00
parent a99973fb96
commit 0476f7f80c
5 changed files with 17 additions and 7 deletions
@@ -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', () {