@@ -392,8 +392,8 @@ void main() {
392
392
});
393
393
394
394
group ('TopicAutocomplete' , () {
395
- void checkTopicShown (GetStreamTopicsEntry topic, PerAccountStore store, {required bool expected}) {
396
- check (find.text (topic.name.displayName ).evaluate ().length).equals (expected ? 1 : 0 );
395
+ void checkTopicShown (String topic, PerAccountStore store, {required bool expected}) {
396
+ check (find.text (topic).evaluate ().length).equals (expected ? 1 : 0 );
397
397
}
398
398
399
399
testWidgets ('options appear, disappear, and change correctly' , (WidgetTester tester) async {
@@ -410,24 +410,24 @@ void main() {
410
410
await tester.pumpAndSettle ();
411
411
412
412
// "topic three" and "topic two" appear, but not "topic one"
413
- checkTopicShown (topic1, store, expected: false );
414
- checkTopicShown (topic2, store, expected: true );
415
- checkTopicShown (topic3 , store, expected: true );
413
+ checkTopicShown ('Topic one' , store, expected: false );
414
+ checkTopicShown ('Topic two' , store, expected: true );
415
+ checkTopicShown ('Topic three' , store, expected: true );
416
416
417
417
// Finishing autocomplete updates topic box; causes options to disappear
418
418
await tester.tap (find.text ('Topic three' ));
419
419
await tester.pumpAndSettle ();
420
420
check (tester.widget <TextField >(topicInputFinder).controller! .text)
421
421
.equals (topic3.name.displayName);
422
- checkTopicShown (topic1, store, expected: false );
423
- checkTopicShown (topic2, store, expected: false );
424
- checkTopicShown (topic3 , store, expected: true ); // shown in `_TopicInput` once
422
+ checkTopicShown ('Topic one' , store, expected: false );
423
+ checkTopicShown ('Topic two' , store, expected: false );
424
+ checkTopicShown ('Topic three' , store, expected: true ); // shown in `_TopicInput` once
425
425
426
426
// Then a new autocomplete intent brings up options again
427
427
await tester.enterText (topicInputFinder, 'Topic' );
428
428
await tester.enterText (topicInputFinder, 'Topic T' );
429
429
await tester.pumpAndSettle ();
430
- checkTopicShown (topic2 , store, expected: true );
430
+ checkTopicShown ('Topic two' , store, expected: true );
431
431
});
432
432
433
433
testWidgets ('text selection is reset on choosing an option' , (tester) async {
0 commit comments