fix(learn): Archived and Recently deleted fold during a search
A search opened both sections whatever they were set to, so a tap on their headers did nothing while one was under way. A search still opens them, so their matches show, and a tap now folds them until the search ends, which brings them back as they were left before it. Whats-New: While searching the library, Archived and Recently deleted fold again when tapped. Whats-New-De: Beim Suchen in der Bibliothek lassen sich Archiviert und Zuletzt gelöscht wieder einklappen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
9b344141ef
commit
3ee29de391
1 changed files with 62 additions and 6 deletions
|
|
@ -683,6 +683,35 @@ void main() {
|
|||
expect(find.text('Kanji'), findsNothing, reason: 'the archive is closed');
|
||||
});
|
||||
|
||||
testWidgets('a search opens the archive, which a tap folds for the rest '
|
||||
'of the search', (tester) async {
|
||||
stored(
|
||||
'kanji',
|
||||
'Kanji',
|
||||
secondaryTitle: 'Japanese',
|
||||
archivedAt: DateTime.utc(2026, 10),
|
||||
);
|
||||
await showLibrary(tester);
|
||||
|
||||
await tester.tap(find.byTooltip('Search'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.enterText(find.byType(TextField), 'kan');
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Kanji'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.text('Archived'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Kanji'), findsNothing);
|
||||
|
||||
await tester.enterText(find.byType(TextField), 'kanj');
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Kanji'), findsNothing, reason: 'still folded');
|
||||
|
||||
await tester.tap(find.text('Archived'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Kanji'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a search lists titles starting with what is typed first, then '
|
||||
'those holding it as a word, then secondary titles, whatever was changed '
|
||||
'last', (tester) async {
|
||||
|
|
|
|||
Loading…
Reference in a new issue