Skip to content

Commit a2399a8

Browse files
committed
autocomplete test [nfc]: Move TypingNotifier disable to setup helper
This wasn't needed in the topic-autocomplete test -- we only send typing notifications when editing the content input, not the topic.
1 parent 0abe2b7 commit a2399a8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/widgets/autocomplete_test.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ import 'test_app.dart';
3030
Future<Finder> setupToComposeInput(WidgetTester tester, {
3131
required List<User> users,
3232
}) async {
33+
TypingNotifier.debugEnable = false;
34+
addTearDown(TypingNotifier.debugReset);
35+
3336
addTearDown(testBinding.reset);
3437
await testBinding.globalStore.add(eg.selfAccount, eg.initialSnapshot());
3538
final store = await testBinding.globalStore.perAccount(eg.selfAccount.id);
@@ -132,9 +135,6 @@ void main() {
132135
final composeInputFinder = await setupToComposeInput(tester, users: [user1, user2, user3]);
133136
final store = await testBinding.globalStore.perAccount(eg.selfAccount.id);
134137

135-
TypingNotifier.debugEnable = false;
136-
addTearDown(TypingNotifier.debugReset);
137-
138138
// Options are filtered correctly for query
139139
// TODO(#226): Remove this extra edit when this bug is fixed.
140140
await tester.enterText(composeInputFinder, 'hello @user ');
@@ -186,9 +186,6 @@ void main() {
186186
final topicInputFinder = await setupToTopicInput(tester, topics: [topic1, topic2, topic3]);
187187
final store = await testBinding.globalStore.perAccount(eg.selfAccount.id);
188188

189-
TypingNotifier.debugEnable = false;
190-
addTearDown(TypingNotifier.debugReset);
191-
192189
// Options are filtered correctly for query
193190
// TODO(#226): Remove this extra edit when this bug is fixed.
194191
await tester.enterText(topicInputFinder, 'Topic');

0 commit comments

Comments
 (0)