feat: 统一首页与推荐搜索入口
This commit is contained in:
1 parent
933333b0fe
commit
9aa797504b
18 files changed
+325
-107
No files matched your search
@@ -23,44 +23,6 @@ void main() {
|
||||
logic.dispose();
|
||||
});
|
||||
|
||||
testWidgets('should_focus_search_only_for_new_request_on_active_page', (
|
||||
tester,
|
||||
) async {
|
||||
final logic = DiscoverLogic();
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: TextField(
|
||||
controller: logic.search,
|
||||
focusNode: logic.searchFocus,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
logic.syncSearch(
|
||||
active: false,
|
||||
request: 1,
|
||||
previousRequest: 0,
|
||||
isActive: () => false,
|
||||
);
|
||||
await tester.pump();
|
||||
expect(logic.searchFocus.hasFocus, isFalse);
|
||||
|
||||
logic.syncSearch(
|
||||
active: true,
|
||||
request: 2,
|
||||
previousRequest: 1,
|
||||
isActive: () => true,
|
||||
);
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
expect(logic.searchFocus.hasFocus, isTrue);
|
||||
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
logic.dispose();
|
||||
});
|
||||
|
||||
testWidgets('should_forward_action_when_embedded_or_pop_when_standalone', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in new issue
Block a user