Skip to content

Commit 1fd5844

Browse files
committed
home test [nfc]: Name a helper more helpfully
1 parent 64cfee9 commit 1fd5844

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/widgets/home_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ void main () {
336336
checkOnLoadingPage();
337337
}
338338

339-
Future<void> tapChooseAccount(WidgetTester tester) async {
339+
Future<void> tapTryAnotherAccount(WidgetTester tester) async {
340340
await tester.tap(find.text('Try another account'));
341341
await tester.pump(Duration.zero); // tap the button
342342
await tester.pump(const Duration(milliseconds: 250)); // wait for animation
@@ -377,7 +377,7 @@ void main () {
377377
testBinding.globalStore.loadPerAccountDuration = loadPerAccountDuration;
378378
await prepare(tester);
379379
await tester.pump(kTryAnotherAccountWaitPeriod);
380-
await tapChooseAccount(tester);
380+
await tapTryAnotherAccount(tester);
381381

382382
await tester.tap(find.byType(BackButton));
383383
await tester.pump(Duration.zero); // tap the button
@@ -392,7 +392,7 @@ void main () {
392392
testBinding.globalStore.loadPerAccountDuration = loadPerAccountDuration;
393393
await prepare(tester);
394394
await tester.pump(kTryAnotherAccountWaitPeriod);
395-
await tapChooseAccount(tester);
395+
await tapTryAnotherAccount(tester);
396396

397397
testBinding.globalStore.loadPerAccountDuration = loadPerAccountDuration * 2;
398398
await chooseAccountWithEmail(tester, eg.otherAccount.email);
@@ -410,7 +410,7 @@ void main () {
410410
testBinding.globalStore.loadPerAccountDuration = loadPerAccountDuration;
411411
await prepare(tester);
412412
await tester.pump(kTryAnotherAccountWaitPeriod);
413-
await tapChooseAccount(tester);
413+
await tapTryAnotherAccount(tester);
414414

415415
// While still loading, choose a different account.
416416
await chooseAccountWithEmail(tester, eg.otherAccount.email);
@@ -432,7 +432,7 @@ void main () {
432432

433433
await tester.pump(kTryAnotherAccountWaitPeriod);
434434
// While still loading the first account, choose a different account.
435-
await tapChooseAccount(tester);
435+
await tapTryAnotherAccount(tester);
436436
await chooseAccountWithEmail(tester, eg.otherAccount.email);
437437
// User cannot go back because the navigator stack
438438
// was cleared after choosing an account.
@@ -443,7 +443,7 @@ void main () {
443443

444444
await tester.pump(kTryAnotherAccountWaitPeriod);
445445
// While still loading the second account, choose a different account.
446-
await tapChooseAccount(tester);
446+
await tapTryAnotherAccount(tester);
447447
await chooseAccountWithEmail(tester, thirdAccount.email);
448448
// User cannot go back because the navigator stack
449449
// was cleared after choosing an account.
@@ -460,7 +460,7 @@ void main () {
460460
testBinding.globalStore.loadPerAccountDuration = loadPerAccountDuration;
461461
await prepare(tester);
462462
await tester.pump(kTryAnotherAccountWaitPeriod);
463-
await tapChooseAccount(tester);
463+
await tapTryAnotherAccount(tester);
464464

465465
// Stall while on ChoooseAccountPage so that the account finished loading.
466466
await tester.pump(loadPerAccountDuration);
@@ -476,7 +476,7 @@ void main () {
476476
testBinding.globalStore.loadPerAccountDuration = loadPerAccountDuration;
477477
await prepare(tester);
478478
await tester.pump(kTryAnotherAccountWaitPeriod);
479-
await tapChooseAccount(tester);
479+
await tapTryAnotherAccount(tester);
480480

481481
// Stall while on ChoooseAccountPage so that the account finished loading.
482482
await tester.pump(loadPerAccountDuration);

0 commit comments

Comments
 (0)