Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no test for autostart = true #5

Open
ride4sun opened this issue Oct 7, 2020 · 0 comments
Open

There is no test for autostart = true #5

ride4sun opened this issue Oct 7, 2020 · 0 comments

Comments

@ride4sun
Copy link

ride4sun commented Oct 7, 2020

trivial but important to test the good cases

   testWidgets(
        'shows dataBuilder after future completes successfully with autostart',
        (tester) async {
      final text = '3';
      final widget = MaterialApp(
        home: Futuristic(
          futureBuilder: () => goodFuture(),
          autoStart: true,
          busyBuilder: (_) => CircularProgressIndicator(),
          dataBuilder: (_, data) => Text(text),
        ),
      );
      await tester.pumpWidget(widget);
      await tester.pump();
      await tester.pump();
      expect(find.text(text), findsOneWidget);
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant