feat(apps/home): 新增 HomeScreen 录音交互与导航组件
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:social_app/features/home/ui/navigation/home_return_policy.dart';
|
||||
|
||||
void main() {
|
||||
group('resolveHomeReturnAction', () {
|
||||
test('business route with back stack prefers pop', () {
|
||||
final action = resolveHomeReturnAction(canPop: true, isAuthEntry: false);
|
||||
expect(action, HomeReturnAction.pop);
|
||||
});
|
||||
|
||||
test('business route without back stack falls back to go home', () {
|
||||
final action = resolveHomeReturnAction(canPop: false, isAuthEntry: false);
|
||||
expect(action, HomeReturnAction.goHome);
|
||||
});
|
||||
|
||||
test('auth entry always goes home directly', () {
|
||||
final action = resolveHomeReturnAction(canPop: true, isAuthEntry: true);
|
||||
expect(action, HomeReturnAction.goHome);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user