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

.tap() throws pumpandSettle timedout when tap to navigating on the fluter view #1626 #1644

Closed
ashwinichannaveerappa opened this issue Aug 16, 2023 · 3 comments
Assignees

Comments

@ashwinichannaveerappa
Copy link

Steps to reproduce

Steps to reproduce:

  1. The screen which contains rev animation
    image

  2. Tap on continue button

    await _requestAndGrantMicrophonePermission($);

    if (await $(S.current.skip).visible) {
      while (await $(S.current.skip).visible) {
        await $(S.current.skip).tap();
      }
    }else{
      await $(S.current.continue_).waitUntilVisible();

      await $(S.current.continue_).tap();

    }

Actual results

java.lang.AssertionError: Dart test failed: tests.course_test
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following assertion was thrown running a test:
pumpAndSettle timed out

When the exception was thrown, this was the stack:
#0 WidgetTester.pumpAndSettle. (package:flutter_test/src/widget_tester.dart:707:11)

#1 TestAsyncUtils.guard. (package:flutter_test/src/test_async_utils.dart:114:7)
The test description was:
Assigned Courses Test
═════════════════════════════════════════════════════════════════

at pl.leancode.patrol.PatrolJUnitRunner.runDartTest(PatrolJUnitRunner.java:130)
at pl.leancode.patrol.example.MainActivityTest.runDartTest(MainActivityTest.java:30)

Logs

No response

Patrol version

You're using Patrol CLI 2.0, which has breaking changes.
Read the migration guide at https://patrol.leancode.co/v2.
Disable this warning by setting the PATROL_MIGRATED environment variable.

Update available! 2.1.1 → 2.1.2
Run patrol update to update

patrol_cli v2.1.1

Patrol Doctor output

You're using Patrol CLI 2.0, which has breaking changes.
Read the migration guide at https://patrol.leancode.co/v2.
Disable this warning by setting the PATROL_MIGRATED environment variable.

Patrol CLI version: 2.1.1
Program adb found in C:\Users\achannav\scoop\shims\adb.exe
Env var $ANDROID_HOME set to C:\Users\achannav\AppData\Local\Android\sdk

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Version
10.0.19045.3324], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all
of its default components
[√] Android Studio (version 2022.1)
[√] IntelliJ IDEA Community Edition (version 2021.3)
[√] VS Code (version 1.81.0)
[√] Connected device (4 available)
[√] Network resources

! Doctor found issues in 1 category.

@jBorkowska
Copy link
Collaborator

Hi @ashwinichannaveerappa, if you have issues with animations, try using settlePolicy argument in tap() method. By default it is andSettle, so if there are infinite animations, Patrol will wait for 10 seconds and throw an exception if the animation didn't finish. You might want to change it to trySettle, so the exception won't be thrown after those 10 seconds

@ashwinichannaveerappa
Copy link
Author

@jBorkowska thanks a lot for the quick response. settlepolicy() worked like a charm.

await $(S.current.continue_).tap(settlePolicy: SettlePolicy.trySettle);

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants