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

Integration test for WebView should constantly call WidgetTester.pump otherwise it will get frozen for slow page loading #2485

Open
1 of 2 tasks
laishere opened this issue Dec 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@laishere
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently, when I run the cookie_manager integration test, it fails sometimes and the whole program get frozen.

Expected Behavior

Shouldn't get frozen

Steps with code example to reproduce

Steps with code example to reproduce
// Just run the integration test a couple of times if needed (Loading a slower website to make sure it happen)

Stacktrace/Logs

Stacktrace/Logs
<Replace this line by pasting your stacktrace or logs here>

Flutter version

v3.24.3

Operating System, Device-specific and/or Tool

Android API 30

Plugin version

v6.1.5

Additional information

}
final url = WebUri(await pageLoaded.future);
if (defaultTargetPlatform == TargetPlatform.android) {

My workaround:

+    while (!pageLoaded.isCompleted) {
+      await tester.pump();
+    }
     final url = WebUri(await pageLoaded.future);

We could write a helper function for this in general.

Self grab

  • I'm ready to work on this issue!
@laishere laishere added the bug Something isn't working label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant