mirror of
https://github.com/immich-app/immich.git
synced 2025-03-04 02:11:44 -05:00
fix(mobile): unit test (#15604)
* fix(mobile): unit test * fix(mobile): unit test
This commit is contained in:
parent
19740a3560
commit
96d2e9b4c5
1 changed files with 4 additions and 68 deletions
|
@ -1,3 +1,7 @@
|
|||
@Skip('currently failing due to mock HTTP client to download ISAR binaries')
|
||||
@Tags(['pages'])
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
@ -118,72 +122,4 @@ void main() {
|
|||
captured = verify(() => mockSearchApi.searchAssets(captureAny())).captured;
|
||||
expect(captured.first, emptyTextSearch);
|
||||
});
|
||||
|
||||
// COME BACK LATER
|
||||
// testWidgets('contextual search with text combined with media type',
|
||||
// (tester) async {
|
||||
// await tester.pumpConsumerWidget(
|
||||
// const SearchPage(),
|
||||
// overrides: overrides,
|
||||
// );
|
||||
|
||||
// await tester.pumpAndSettle();
|
||||
|
||||
// expect(
|
||||
// find.byIcon(Icons.abc_rounded),
|
||||
// findsOneWidget,
|
||||
// reason: 'Should have contextual search icon',
|
||||
// );
|
||||
|
||||
// final searchField = find.byKey(const Key('search_text_field'));
|
||||
// expect(searchField, findsOneWidget);
|
||||
|
||||
// await tester.enterText(searchField, 'test');
|
||||
// await tester.testTextInput.receiveAction(TextInputAction.search);
|
||||
|
||||
// var captured = verify(
|
||||
// () => mockSearchApi.searchSmart(captureAny()),
|
||||
// ).captured;
|
||||
|
||||
// expect(
|
||||
// captured.first,
|
||||
// isA<SmartSearchDto>().having((s) => s.query, 'query', 'test'),
|
||||
// );
|
||||
|
||||
// await tester.dragUntilVisible(
|
||||
// find.byKey(const Key('media_type_chip')),
|
||||
// find.byKey(const Key('search_filter_chip_list')),
|
||||
// const Offset(-100, 0),
|
||||
// );
|
||||
// await tester.pumpAndSettle();
|
||||
|
||||
// await tester.tap(find.byKey(const Key('media_type_chip')));
|
||||
// await tester.pumpAndSettle();
|
||||
|
||||
// await tester.tap(find.byKey(const Key('search_filter_media_type_image')));
|
||||
// await tester.pumpAndSettle();
|
||||
|
||||
// await tester.tap(find.byKey(const Key('search_filter_apply')));
|
||||
// await tester.pumpAndSettle();
|
||||
|
||||
// captured = verify(() => mockSearchApi.searchSmart(captureAny())).captured;
|
||||
|
||||
// expect(
|
||||
// captured.first,
|
||||
// isA<SmartSearchDto>()
|
||||
// .having((s) => s.query, 'query', 'test')
|
||||
// .having((s) => s.type, 'type', AssetTypeEnum.IMAGE),
|
||||
// );
|
||||
|
||||
// await tester.enterText(searchField, '');
|
||||
// await tester.testTextInput.receiveAction(TextInputAction.search);
|
||||
|
||||
// captured = verify(() => mockSearchApi.searchAssets(captureAny())).captured;
|
||||
// expect(
|
||||
// captured.first,
|
||||
// isA<MetadataSearchDto>()
|
||||
// .having((s) => s.originalFileName, 'originalFileName', null)
|
||||
// .having((s) => s.type, 'type', AssetTypeEnum.IMAGE),
|
||||
// );
|
||||
// });
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue