flutter_gherkin
flutter_gherkin copied to clipboard
The waitUntilTypeExistsStep will not work
trafficstars
In the waitUntilTypeExistsStep (here) the expectation is that a String parameter is converted into a Type. However, without reflection, this will not be possible and the code fails with an exception:
Exception: type 'String' is not a subtype of type 'Type'
The problem is caused by these lines where we tell the findBy method that the ofType argument is a FindType.type.
context.world.appDriver.findBy(ofType, FindType.type),
This resolves to calling this method and the code will throw an exception.
Finder byType(Type type, {bool skipOffstage = true})
As possible solution, albeit a little clunky, could be to have a predefined Set of types that can be iterated over to match on the String via it's name. But then you have a fixed list of Types unless you could also pass new types in via the World object.