You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today (with gherkin 3.1.0), one way to use a custom World instance is to cast it inside the method onAfterScenarioWorldCreated. This solution is still a workaround and your suggestion would be the cleanest way to do it.
Future<void> onAfterScenarioWorldCreated(
World world,
String scenario,
Iterable<Tag> tags,
) async {
assert(world isMyWorld, "world is not an instance of MyWorld");
MyWorld myWorld = world asMyWorld;
...
}
I propose to generify the methods that use the World objects in the Hook class such as:
And use something like:
This way we can use our own instances of World
The text was updated successfully, but these errors were encountered: