@@ -6,7 +6,7 @@ import 'package:appflowy/generated/locale_keys.g.dart';
66import 'package:appflowy/shared/icon_emoji_picker/icon_picker.dart' ;
77import 'package:appflowy/workspace/presentation/command_palette/command_palette.dart' ;
88import 'package:appflowy/workspace/presentation/command_palette/widgets/search_field.dart' ;
9- import 'package:appflowy/workspace/presentation/command_palette/widgets/search_result_tile .dart' ;
9+ import 'package:appflowy/workspace/presentation/command_palette/widgets/search_result_cell .dart' ;
1010import 'package:appflowy_backend/protobuf/flowy-folder/view.pbenum.dart' ;
1111import 'package:appflowy_editor/appflowy_editor.dart' ;
1212import 'package:easy_localization/easy_localization.dart' ;
@@ -44,22 +44,22 @@ void main() {
4444 await tester.pumpAndSettle (const Duration (milliseconds: 200 ));
4545
4646 // Expect two search results "ViewOna" and "ViewOne" (Distance 1 to ViewOna)
47- expect (find.byType (SearchResultTile ), findsNWidgets (2 ));
47+ expect (find.byType (SearchResultCell ), findsNWidgets (2 ));
4848
4949 // The score should be higher for "ViewOna" thus it should be shown first
5050 final secondDocumentWidget = tester
51- .widget (find.byType (SearchResultTile ).first) as SearchResultTile ;
52- expect (secondDocumentWidget.result.data , secondDocument);
51+ .widget (find.byType (SearchResultCell ).first) as SearchResultCell ;
52+ expect (secondDocumentWidget.item.displayName , secondDocument);
5353
5454 // Change search to "ViewOne"
5555 await tester.enterText (searchFieldFinder, firstDocument);
5656 await tester.pumpAndSettle (const Duration (seconds: 1 ));
5757
5858 // The score should be higher for "ViewOne" thus it should be shown first
5959 final firstDocumentWidget = tester.widget (
60- find.byType (SearchResultTile ).first,
61- ) as SearchResultTile ;
62- expect (firstDocumentWidget.result.data , firstDocument);
60+ find.byType (SearchResultCell ).first,
61+ ) as SearchResultCell ;
62+ expect (firstDocumentWidget.item.displayName , firstDocument);
6363 });
6464
6565 testWidgets ('Displaying icons in search results' , (tester) async {
@@ -89,11 +89,11 @@ void main() {
8989 );
9090 await tester.enterText (searchFieldFinder, 'Page-$randomValue ' );
9191 await tester.pumpAndSettle (const Duration (milliseconds: 200 ));
92- expect (find.byType (SearchResultTile ), findsNWidgets (2 ));
92+ expect (find.byType (SearchResultCell ), findsNWidgets (2 ));
9393
9494 /// check results
9595 final svgs = find.descendant (
96- of: find.byType (SearchResultTile ),
96+ of: find.byType (SearchResultCell ),
9797 matching: find.byType (FlowySvg ),
9898 );
9999 expect (svgs, findsNWidgets (2 ));
0 commit comments