flutter_gherkin
flutter_gherkin copied to clipboard
Afterscenario hook keep on running if any expect condition gets failed in scenario step
Expect condition func:
Future
Expect condition failure log:
I/flutter ( 1151): │ 💡 onAfterStep 'Then Verify user sees invoice details page' StepExecutionResult.error I/flutter ( 1151): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter ( 1151): × Then Verify user sees invoice details page # :0 took 3ms I/flutter ( 1151): Expected: exactly one matching node in the widget tree I/flutter ( 1151): Actual: _TextFinder:<zero widgets with text "New Invoice" (ignoring offstage widgets)> I/flutter ( 1151): Which: means none were found but one was expected I/flutter ( 1151): I/flutter ( 1151): Expected: exactly one matching node in the widget tree I/flutter ( 1151): Actual: _TextFinder:<zero widgets with text "New Invoice" (ignoring offstage widgets)> I/flutter ( 1151): Which: means none were found but one was expected I/flutter ( 1151): I/flutter ( 1151): #0 fail (package:test_api/src/expect/expect.dart:137:31) I/flutter ( 1151): #1 _expect (package:test_api/src/expect/expect.dart:132:3) I/flutter ( 1151): #2 expect (package:test_api/src/expect/expect.dart:46:3) I/flutter ( 1151): #3 expect (package:flutter_test/src/widget_tester.dart:455:16) I/flutter ( 1151): #4 InvoiceDetailsPage.verifyInvoiceDetailsPageDisplay
Logs after scenario:
I/flutter ( 1151): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter ( 1151): │ 💡 running hook after scenario 'test scenario-1' I/flutter ( 1151): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── D/EGL_emulation( 1151): app_time_stats: avg=4.90ms min=2.20ms max=40.51ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.76ms min=2.09ms max=4.93ms count=58 D/EGL_emulation( 1151): app_time_stats: avg=3.88ms min=3.15ms max=5.86ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.81ms min=3.02ms max=4.35ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.71ms min=2.17ms max=4.41ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.66ms min=2.29ms max=4.25ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.73ms min=2.10ms max=4.55ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.71ms min=2.23ms max=4.50ms count=58 D/EGL_emulation( 1151): app_time_stats: avg=3.86ms min=2.44ms max=5.99ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.76ms min=2.59ms max=6.69ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.67ms min=2.68ms max=5.55ms count=61 D/EGL_emulation( 1151): app_time_stats: avg=3.91ms min=2.44ms max=5.53ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.80ms min=2.86ms max=5.87ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.87ms min=2.23ms max=5.83ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.66ms min=2.60ms max=6.65ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.86ms min=2.63ms max=5.67ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.81ms min=2.43ms max=5.66ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.57ms min=2.44ms max=5.48ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.62ms min=2.40ms max=6.30ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=4.34ms min=2.30ms max=15.50ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.31ms min=2.29ms max=4.60ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.35ms min=2.44ms max=5.05ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.28ms min=2.31ms max=4.46ms count=61 D/EGL_emulation( 1151): app_time_stats: avg=3.42ms min=2.58ms max=4.32ms count=61 D/EGL_emulation( 1151): app_time_stats: avg=3.53ms min=2.33ms max=4.93ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.63ms min=2.21ms max=5.74ms count=55 D/EGL_emulation( 1151): app_time_stats: avg=3.34ms min=2.21ms max=4.59ms count=55 D/EGL_emulation( 1151): app_time_stats: avg=3.41ms min=2.66ms max=5.71ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.65ms min=2.62ms max=5.60ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.57ms min=2.62ms max=5.00ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.59ms min=2.62ms max=5.21ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.85ms min=2.83ms max=5.59ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.66ms min=2.65ms max=5.84ms count=58 D/EGL_emulation( 1151): app_time_stats: avg=3.73ms min=2.49ms max=5.41ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.56ms min=2.52ms max=5.60ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.69ms min=2.49ms max=6.15ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.35ms min=2.37ms max=4.35ms count=55 D/EGL_emulation( 1151): app_time_stats: avg=3.61ms min=2.42ms max=5.74ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.49ms min=2.09ms max=5.65ms count=51 D/EGL_emulation( 1151): app_time_stats: avg=3.57ms min=2.38ms max=6.12ms count=54 D/EGL_emulation( 1151): app_time_stats: avg=3.35ms min=2.29ms max=5.97ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.60ms min=2.30ms max=7.87ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.44ms min=2.28ms max=5.71ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.74ms min=2.47ms max=6.08ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.91ms min=2.62ms max=5.98ms count=47 D/EGL_emulation( 1151): app_time_stats: avg=3.73ms min=2.46ms max=5.88ms count=42 D/EGL_emulation( 1151): app_time_stats: avg=3.52ms min=2.59ms max=6.45ms count=55 D/EGL_emulation( 1151): app_time_stats: avg=3.74ms min=2.37ms max=5.94ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.88ms min=2.45ms max=6.03ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.20ms min=2.37ms max=4.47ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.51ms min=2.40ms max=5.25ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=4.15ms min=2.29ms max=11.38ms count=44 D/EGL_emulation( 1151): app_time_stats: avg=3.64ms min=2.29ms max=5.74ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.60ms min=2.15ms max=8.15ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.78ms min=2.15ms max=6.48ms count=42 D/EGL_emulation( 1151): app_time_stats: avg=4.14ms min=2.50ms max=6.66ms count=44 D/EGL_emulation( 1151): app_time_stats: avg=4.14ms min=2.64ms max=7.28ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.91ms min=2.43ms max=5.99ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.36ms min=2.48ms max=5.74ms count=46 D/EGL_emulation( 1151): app_time_stats: avg=3.85ms min=2.47ms max=6.75ms count=46 D/EGL_emulation( 1151): app_time_stats: avg=3.97ms min=2.52ms max=6.27ms count=47 D/EGL_emulation( 1151): app_time_stats: avg=3.59ms min=2.24ms max=6.43ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.12ms min=2.10ms max=4.06ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.16ms min=2.21ms max=4.48ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.07ms min=2.12ms max=5.56ms count=47 D/EGL_emulation( 1151): app_time_stats: avg=3.51ms min=2.21ms max=5.86ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.37ms min=2.36ms max=5.21ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.29ms min=2.25ms max=4.60ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.36ms min=2.25ms max=6.73ms count=43 D/EGL_emulation( 1151): app_time_stats: avg=3.48ms min=2.23ms max=6.20ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.33ms min=2.19ms max=6.43ms count=47 D/EGL_emulation( 1151): app_time_stats: avg=2.79ms min=1.99ms max=4.02ms count=46 D/EGL_emulation( 1151): app_time_stats: avg=3.51ms min=2.13ms max=6.10ms count=44 D/EGL_emulation( 1151): app_time_stats: avg=3.34ms min=2.02ms max=4.48ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.47ms min=2.18ms max=5.84ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=4.16ms min=2.32ms max=6.63ms count=43 D/EGL_emulation( 1151): app_time_stats: avg=3.70ms min=2.35ms max=6.44ms count=51 D/EGL_emulation( 1151): app_time_stats: avg=3.49ms min=2.36ms max=5.53ms count=47 D/EGL_emulation( 1151): app_time_stats: avg=3.57ms min=2.40ms max=6.12ms count=44 D/EGL_emulation( 1151): app_time_stats: avg=3.87ms min=2.64ms max=5.68ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.98ms min=2.68ms max=6.14ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.77ms min=2.28ms max=6.08ms count=45 D/EGL_emulation( 1151): app_time_stats: avg=3.92ms min=2.45ms max=7.09ms count=46 D/EGL_emulation( 1151): app_time_stats: avg=3.85ms min=2.61ms max=6.45ms count=47 D/EGL_emulation( 1151): app_time_stats: avg=3.62ms min=2.52ms max=5.59ms count=52 D/EGL_emulation( 1151): app_time_stats: avg=3.55ms min=2.49ms max=5.78ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.65ms min=2.33ms max=5.77ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.52ms min=2.38ms max=5.92ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.27ms min=2.06ms max=5.15ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.41ms min=2.42ms max=5.72ms count=50 D/EGL_emulation( 1151): app_time_stats: avg=3.39ms min=2.37ms max=6.20ms count=51 D/EGL_emulation( 1151): app_time_stats: avg=3.36ms min=2.46ms max=4.28ms count=53 D/EGL_emulation( 1151): app_time_stats: avg=3.25ms min=2.43ms max=4.92ms count=52 D/EGL_emulation( 1151): app_time_stats: avg=3.47ms min=2.33ms max=5.33ms count=53 D/EGL_emulation( 1151): app_time_stats: avg=3.48ms min=2.24ms max=6.37ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.25ms min=2.33ms max=4.96ms count=53 D/EGL_emulation( 1151): app_time_stats: avg=3.24ms min=2.20ms max=4.89ms count=54 D/EGL_emulation( 1151): app_time_stats: avg=3.22ms min=2.40ms max=5.15ms count=53 D/EGL_emulation( 1151): app_time_stats: avg=3.32ms min=2.28ms max=5.66ms count=58 D/EGL_emulation( 1151): app_time_stats: avg=3.12ms min=2.42ms max=4.73ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.10ms min=2.18ms max=4.71ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.50ms min=2.32ms max=5.61ms count=48 D/EGL_emulation( 1151): app_time_stats: avg=3.67ms min=2.50ms max=6.05ms count=46 D/EGL_emulation( 1151): app_time_stats: avg=3.79ms min=2.75ms max=5.91ms count=52 D/EGL_emulation( 1151): app_time_stats: avg=3.91ms min=2.73ms max=5.71ms count=49 D/EGL_emulation( 1151): app_time_stats: avg=3.75ms min=2.59ms max=5.64ms count=51 D/EGL_emulation( 1151): app_time_stats: avg=3.41ms min=2.48ms max=5.61ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.57ms min=2.36ms max=4.77ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.28ms min=2.28ms max=5.20ms count=54 D/EGL_emulation( 1151): app_time_stats: avg=3.45ms min=2.52ms max=5.25ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.59ms min=2.38ms max=7.27ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=4.16ms min=2.38ms max=13.17ms count=57 D/EGL_emulation( 1151): app_time_stats: avg=3.73ms min=2.25ms max=9.74ms count=54 D/EGL_emulation( 1151): app_time_stats: avg=3.50ms min=2.37ms max=9.26ms count=60 D/EGL_emulation( 1151): app_time_stats: avg=3.49ms min=2.46ms max=5.03ms count=56 D/EGL_emulation( 1151): app_time_stats: avg=3.63ms min=2.62ms max=5.47ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.41ms min=2.32ms max=4.84ms count=59 D/EGL_emulation( 1151): app_time_stats: avg=3.46ms min=2.53ms max=6.08ms count=58 D/EGL_emulation( 1151): app_time_stats: avg=3.48ms min=2.61ms max=4.56ms count=61 D/EGL_emulation( 1151): app_time_stats: avg=3.28ms min=2.58ms max=4.32ms count=59
@jonsamwell One more point:
In case of any issue with StepExecutionResult , same above issue happening , run keeps running infinite time:
onAfterStep 'Then User selects client "' StepExecutionResult.error
Looking forward for your input or fix soon
@amitkumar-qa I am not quite sure what the error is here? Please create a reproducible sample I can debug. Thanks
@jonsamwell
Ex:
When you select a country from dropdown , you expect one widget with a country name , if widget is not available there , then after scenario keep on running:
Step:
StepDefinitionGeneric selectCountryDetails() { return then1<String, FlutterWidgetTesterWorld>( 'User selects country {String}', (String text, context) async { final invoiceDetailsPage = InvoiceDetailsPage(context.world.appDriver); await invoiceDetailsPage.selectCountry(text); }); }
Ex:
Future<void> selectCountry(String countryName) async { await appDriver.tap(countryDropdown); expect(find.text(countryName), findsOneWidget); }
In above function , if countryname is not visible in dropdown then , afterscenario keep on running infinite time after step
Below is step error:
Expected: exactly one matching node in the widget tree I/flutter (12886): Actual: _TextFinder:<zero widgets with text <country>" (ignoring offstage widgets)> I/flutter (12886): Which: means none were found but one was expected I/flutter (12886): I/flutter (12886): Expected: exactly one matching node in the widget tree I/flutter (12886): Actual: _TextFinder:<zero widgets with text "[email protected]" (ignoring offstage widgets)> I/flutter (12886): Which: means none were found but one was expected I/flutter (12886): I/flutter (12886): #0 fail (package:test_api/src/expect/expect.dart:137:31) I/flutter (12886): #1 _expect (package:test_api/src/expect/expect.dart:132:3) I/flutter (12886): #2 expect (package:test_api/src/expect/expect.dart:46:3) I/flutter (12886): #3 expect (package:flutter_test/src/widget_tester.dart:455:16)
After scenario keep on running , seems like after scenario is not working properly if step condition failed using expect:
I/flutter (12886): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (12886): │ 💡 running hook after scenario 'select country Examples: (1)' I/flutter (12886): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── D/EGL_emulation(12886): app_time_stats: avg=1512.03ms min=1512.03ms max=1512.03ms count=1 D/EGL_emulation(12886): app_time_stats: avg=116.89ms min=112.69ms max=123.63ms count=9 D/EGL_emulation(12886): app_time_stats: avg=116.88ms min=113.57ms max=123.98ms count=9 D/EGL_emulation(12886): app_time_stats: avg=116.66ms min=112.49ms max=121.35ms count=9 D/EGL_emulation(12886): app_time_stats: avg=116.48ms min=114.57ms max=122.81ms count=9 D/EGL_emulation(12886): app_time_stats: avg=116.81ms min=114.11ms max=118.96ms count=9 D/EGL_emulation(12886): app_time_stats: avg=116.43ms min=114.42ms max=118.94ms count=9
Could you try on the latest version I have just published? I have a test that almost replicated this in the latest release so are you able to do a minimal code reproduction I can debug?
@jonsamwell I tested it on 3.0.0-rc.16 now and same results as above recently mentioned
OK, I'll wait for you to produce a sample that displays this error so I can debug
Could you try again in 3.0.0-rc.17?
Sorry I am not sure what the error is here? Could you explain further and provide a simple reproduction of the issue I can use to resolve the problem
On Tue, Jun 28, 2022, 8:12 PM amitkumar-qa @.***> wrote:
One more point: In case of any issue with StepExecutionResult , same above issue happening , run keeps running infinite time: onAfterStep 'Then User selects client "' StepExecutionResult.error
— Reply to this email directly, view it on GitHub https://github.com/jonsamwell/flutter_gherkin/issues/238#issuecomment-1168522950, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4F7IO3KVRFNDCNHTQEW2TVRLF2DANCNFSM52BNLO4Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>