Fix feed tag search and prepare 2.0.1+22

This commit is contained in:
2026-06-03 13:10:57 +03:00
parent af62ddf0da
commit f0bf2ea515
46 changed files with 4262 additions and 4154 deletions
@@ -57,6 +57,48 @@ void main() {
expect(changed, 'video');
});
testWidgets('clear button removes all committed tags', (tester) async {
String? changed;
await tester.pumpWidget(_Harness(
child: TagInputSearchBar(
initialValue: 'touhou video',
onSubmitted: (_) {},
onChanged: (value) {
changed = value;
},
),
));
await tester.tap(find.byTooltip('Clear'));
await tester.pump();
expect(find.text('touhou'), findsNothing);
expect(find.text('video'), findsNothing);
expect(changed, '');
});
testWidgets('external initial value replaces committed tags', (tester) async {
await tester.pumpWidget(_Harness(
child: TagInputSearchBar(
initialValue: 'old_tag',
onSubmitted: (_) {},
),
));
expect(find.text('old_tag'), findsOneWidget);
await tester.pumpWidget(_Harness(
child: TagInputSearchBar(
initialValue: 'new_tag',
onSubmitted: (_) {},
),
));
await tester.pump();
expect(find.text('old_tag'), findsNothing);
expect(find.text('new_tag'), findsOneWidget);
});
testWidgets('suggestion appends active tag as a chip', (tester) async {
String? applied;
await tester.pumpWidget(_Harness(