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
Exception: Guarded function conflict error during tap in latest RC 3.0.0-rc.9 #231
Comments
@amitkumar-qa could you add your code here for that step. I can't see any unawaited calls to pumpAndSettle |
Actually I think this is solved by this PR #230 You could try that branch and see if you experience the same issue |
@jonsamwell Yes might be, leme try this branch |
@amitkumar-qa could you give this a go in the latest rc relesae |
@jonsamwell Sure , let me check |
Thanks |
FYI If you create your own step file using the exact same code as for tap_widget_with_text_step.dart, rename all cases of I believe the issue here is with |
I can confirm that this error happens before Scenarios as well. This issue is also intermittent. Could be a race condition? |
…n the pre-defined steps in favour of the implicit `pumpAndSettle` calls used in the `WidgetTesterAppDriverAdapter`. - Added ability to add a `appLifecyclePumpHandler` to override the default handler that determines how the app is pumped during lifecycle events. Useful if your app has a long splash screen etc. Parameter is on `executeTestSuite`. - Added ability to ensure feature paths are relative when generating reports `useAbsolutePaths` on the `GherkinTestSuite` attribute * BREAKING CHANGE: The parameters on `executeTestSuite` are now keyed to allow for the above changes
Should be fixed in Fixed in 3.0,0-rc-11 |
Hi @jonsamwell This issue still persists in 3.0,0-rc-11 also , and its all about "context.world.appDriver.waitForAppToSettle()" , it might be because pumpandsettle is stuck if app page has infinite animation. |
You should be able to set the configuration parameter `
waitImplicitlyAfterAction`
to false to stop the implicit pump and settle actions.
…On Fri, Jun 24, 2022, 6:00 PM amitkumar-qa ***@***.***> wrote:
Hi @jonsamwell <https://github.com/jonsamwell> This issue still persists
in 3.0,0-rc-11 also , and its all about
"context.world.appDriver.waitForAppToSettle()" , it might be because
pumpandsettle is stuck if app page has infinite animation.
So @WernerRaathAtPolymorph <https://github.com/WernerRaathAtPolymorph>
solution mentioned above works where i need to omit waitForAppToSettle().
Thank you so much guys.
I encountered one more issue related to screenshot in 3.0,0-rc-11, have
raised it separately-#235
<#235>
—
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4F7ILUTFPN5GJOWOXRGZLVQVTJTANCNFSM5ZH3USRA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jonsamwell I tried with waitImplicitlyAfterAction`=true.
|
…ng tests which can affect how frames are painted and the speed of the test run, I've removed the default value which might be responsible for #231
@amitkumar-qa try the new rc-15 release, I've removed the default frame binding policy as it was set to benchmarking which can not schedule all frames. |
@jonsamwell I will check and update you on this soon |
…on Android (thanks to @youssef-t for the solution) - Fix #216 - ensure step exceptions and `expect` failure results are added as errors to the json report - Scenarios can now have descriptions which also appear in the json reporter output
@jonsamwell Getting error while taping on element in android ,
Below function gives error:
Future selectClientDetails(String contactName) async { await appDriver.tap(clientDropdown); }
In above function appDriver is object of AppDriverAdapter.
Error below:
I/flutter ( 7983): × Then User selects client "[test@test.com](mailto:test@test.com)" # :0 took 3ms I/flutter ( 7983): Exception: Guarded function conflict. I/flutter ( 7983): You must use "await" with all Future-returning test APIs. I/flutter ( 7983): The guarded method "pumpAndSettle" from class WidgetTester was called from package:flutter_gherkin/src/flutter/adapters/widget_tester_app_driver_adapter.dart on line 21. I/flutter ( 7983): Then, the "selectClientDetails" method from class InvoiceDetailsPage was called from file:///Users/ak/repo/integration_test/gherkin/steps/invoice_steps/invoice_details_page_steps.dart on line 10. I/flutter ( 7983): The first method (WidgetTester.pumpAndSettle) had not yet finished executing at the time that the second method (InvoiceDetailsPage.selectClientDetails) was called. Since both are guarded, and the second was not a nested call inside the first, the first must complete its execution before the second can be called. Typically, this is achieved by putting an "await" statement in front of the call to the first. I/flutter ( 7983): I/flutter ( 7983): When the first method (WidgetTester.
The text was updated successfully, but these errors were encountered: