Skip to content

Commit

Permalink
Fix repo_creation_test.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Pabon authored Aug 14, 2024
1 parent 4807e6f commit 4eea17e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/widget/repo_creation_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,7 @@ void main() {

await tester.enterText(find.byKey(ValueKey('token')), token);
await repoImportObserver.waitUntil((state) => state is ShareTokenValid);
await tester.pump();

await tester.tap(find.text('IMPORT A REPOSITORY'));
await tester.pumpAndSettle();
await repoCreationObserver
.waitUntil((state) => !state.loading && state.token != null);
await tester.pump();

// The repo token is shown.
expect(
Expand All @@ -198,6 +192,14 @@ void main() {
findsOne,
);

await tester.tap(find.widgetWithText(ElevatedButton, 'IMPORT A REPOSITORY'));
await tester.pump();

await repoCreationObserver
.waitUntil((state) => !state.loading && state.token != null);
await tester.pump();

expect(find.widgetWithText(TextFormField, token), findsOne);
// The name field is autofilled with the suggested name.
expect(
find.descendant(
Expand Down

0 comments on commit 4eea17e

Please sign in to comment.