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

Click on DropdownMenuItem #287

Open
HeropolisDa2ny opened this issue Apr 6, 2023 · 0 comments
Open

Click on DropdownMenuItem #287

HeropolisDa2ny opened this issue Apr 6, 2023 · 0 comments

Comments

@HeropolisDa2ny
Copy link

Hi viewers-developers, I am trying to test a DropdownButton, however the tapping test on an item fails even if the previous test has verified that the child (DropdownMenuItem) exists.

With my personal steps :

... previous steps to make appear the DropdownButton
Then I have an "EntityDropdownButton" # succeed
When I tap the "EntityDropdownButton" button # succeed 
Then I have a "entityN1DropdownMenuItem" # succeed
When I tap the "entityN1DropdownMenuItem" button # fail

I caught this error :

TimeoutException after 0:00:10.000000: Future not completed

My functionnalities are basic, based on these methods :

find.byValueKey
FlutterDriverUtils.isPresent
FlutterDriverUtils.tap

But even if I am using the pre-coded steps :

... previous steps to make appear the DropdownButton
Then I have an "EntityDropdownButton" # succeed
When I tap the "EntityDropdownButton" button # succeed
Then I expect the text "entityN1" to be present # succeed
Then I tap the element that contains the text "entityN1" # fail

I caught this error :

Exception: DriverError: Error in Flutter application: Uncaught extension error while executing scrollIntoView: Bad state: Too many elements
#0      Iterable.single (dart:core/iterable.dart:656:24)
#1      CommandHandlerFactory._scrollIntoView (package:flutter_driver/src/common/handler_factory.dart:402:54)
<asynchronous suspension>
#2      FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:372:31)
<asynchronous suspension>
#3      BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:856:18)
<asynchronous suspension>


#0      VMServiceFlutterDriver.sendCommand (package:flutter_driver/src/driver/vmservice_driver.dart:341:7)
<asynchronous suspension>
#1      FlutterDriver.scrollIntoView (package:flutter_driver/src/driver/driver.dart:402:5)
<asynchronous suspension>
#2      TapWidgetWithTextStep.<anonymous closure> (package:flutter_gherkin/src/flutter/steps/tap_widget_with_text_step.dart:18:7)
<asynchronous suspension>
#3      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:871:15)
<asynchronous suspension>
#4      StepDefinitionGeneric.run.<anonymous closure> (package:gherkin/src/gherkin/steps/step_definition.dart:42:26)
<asynchronous suspension>
#5      Perf.measure (package:gherkin/src/utils/perf.dart:11:14)
<asynchronous suspension>
#6      StepDefinitionGeneric.run (package:gherkin/src/gherkin/steps/step_definition.dart:37:7)
<asynchronous suspension>
#7      FeatureFileRunner._runWithinTest (package:gherkin/src/feature_file_runner.dart:365:22)
<asynchronous suspension>
#8      FeatureFileRunner._runStep (package:gherkin/src/feature_file_runner.dart:334:16)
<asynchronous suspension>
#9      FeatureFileRunner._runScenario (package:gherkin/src/feature_file_runner.dart:256:24)
<asynchronous suspension>
#10     FeatureFileRunner._runScenarioInZone.<anonymous closure> (package:gherkin/src/feature_file_runner.dart:149:24)
<asynchronous suspension>

My question is how being able to test a dropdown with its children ?

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