chore(lib): update to latest gherkin version
fix(steps): ensure element is scroll into view in the well known tap step
This commit is contained in:
parent
e4270dcd44
commit
a3bebfdedc
|
@ -1,5 +1,9 @@
|
|||
## [1.1.7+6] - 04/03/2019
|
||||
* Updated to latest Gherkin library (see https://github.com/jonsamwell/dart_gherkin/blob/master/CHANGELOG.md#117---04032020) - this includes a breaking change to the `Hook` inteface that will need to be updated if any of the `Scenerio` level methods are implemented
|
||||
* Ensured the well known step `I tap the ".." button` scroll the element into view first
|
||||
|
||||
## [1.1.7+5] - 03/02/2019
|
||||
* Updated to latest Gherkin library (see https://github.com/jonsamwell/dart_gherkin/blob/master/CHANGELOG.md#1163---03022019)
|
||||
* Updated to latest Gherkin library (see https://github.com/jonsamwell/dart_gherkin/blob/master/CHANGELOG.md#1164---03022020)
|
||||
|
||||
## [1.1.7+4] - 31/01/2019
|
||||
* Update check to determine if any devices are connected to run tests against
|
||||
|
|
|
@ -26,6 +26,8 @@ Available as a Dart package https://pub.dartlang.org/packages/flutter_gherkin
|
|||
Then I end up with 2
|
||||
```
|
||||
|
||||
NOTE: If you are using a Flutter branch other than the current stable version 1.12.x you will need to use the release candiate version of this library due to a breaking change with the way the flutter driver logs output.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
<!-- TOC -->
|
||||
|
|
|
@ -21,14 +21,20 @@ class HookExample extends Hook {
|
|||
/// Run before a scenario and it steps are executed
|
||||
@override
|
||||
Future<void> onBeforeScenario(
|
||||
TestConfiguration config, String scenario) async {
|
||||
TestConfiguration config,
|
||||
String scenario,
|
||||
Iterable<Tag> tags,
|
||||
) async {
|
||||
print("running hook before scenario '$scenario'");
|
||||
}
|
||||
|
||||
/// Run after a scenario has executed
|
||||
@override
|
||||
Future<void> onAfterScenario(
|
||||
TestConfiguration config, String scenario) async {
|
||||
TestConfiguration config,
|
||||
String scenario,
|
||||
Iterable<Tag> tags,
|
||||
) async {
|
||||
print("running hook after scenario '$scenario'");
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -27,6 +27,7 @@ class FlutterAppRunnerHook extends Hook {
|
|||
Future<void> onBeforeScenario(
|
||||
TestConfiguration config,
|
||||
String scenario,
|
||||
Iterable<Tag> tags,
|
||||
) async {
|
||||
final flutterConfig = _castConfig(config);
|
||||
if (_flutterRunProcessHandler == null) {
|
||||
|
@ -38,6 +39,7 @@ class FlutterAppRunnerHook extends Hook {
|
|||
Future<void> onAfterScenario(
|
||||
TestConfiguration config,
|
||||
String scenario,
|
||||
Iterable<Tag> tags,
|
||||
) async {
|
||||
final flutterConfig = _castConfig(config);
|
||||
haveRunFirstScenario = true;
|
||||
|
@ -51,6 +53,7 @@ class FlutterAppRunnerHook extends Hook {
|
|||
Future<void> onAfterScenarioWorldCreated(
|
||||
World world,
|
||||
String scenario,
|
||||
Iterable<Tag> tags,
|
||||
) async {
|
||||
if (world is FlutterWorld) {
|
||||
world.setFlutterProccessHandler(_flutterRunProcessHandler);
|
||||
|
|
|
@ -24,10 +24,16 @@ class WhenTapWidget extends When1WithWorld<String, FlutterWorld> {
|
|||
|
||||
@override
|
||||
Future<void> executeStep(String key) async {
|
||||
final finder = find.byValueKey(key);
|
||||
|
||||
await world.driver.scrollIntoView(
|
||||
finder,
|
||||
timeout: timeout * .45,
|
||||
);
|
||||
await FlutterDriverUtils.tap(
|
||||
world.driver,
|
||||
find.byValueKey(key),
|
||||
timeout: timeout * .9,
|
||||
finder,
|
||||
timeout: timeout * .45,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
12
pubspec.lock
12
pubspec.lock
|
@ -70,7 +70,7 @@ packages:
|
|||
name: coverage
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.4"
|
||||
version: "0.13.8"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -118,7 +118,7 @@ packages:
|
|||
name: gherkin
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6+4"
|
||||
version: "1.1.7"
|
||||
glob:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -146,7 +146,7 @@ packages:
|
|||
name: http_multi_server
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.2.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -251,7 +251,7 @@ packages:
|
|||
name: package_config
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.9.1"
|
||||
package_resolver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -361,7 +361,7 @@ packages:
|
|||
name: source_maps
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.10.8"
|
||||
version: "0.10.9"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -475,4 +475,4 @@ packages:
|
|||
source: hosted
|
||||
version: "2.2.0"
|
||||
sdks:
|
||||
dart: ">=2.6.0 <3.0.0"
|
||||
dart: ">=2.7.0 <3.0.0"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
name: flutter_gherkin
|
||||
description: A Gherkin / Cucumber parser and test runner for Dart and Flutter
|
||||
version: 1.1.7+5
|
||||
author: Jon Samwell <jonsamwell@gmail.com>
|
||||
version: 1.1.7+6
|
||||
homepage: https://github.com/jonsamwell/flutter_gherkin
|
||||
|
||||
environment:
|
||||
|
@ -16,7 +15,7 @@ dependencies:
|
|||
sdk: flutter
|
||||
glob: ^1.1.7
|
||||
meta: ">=1.1.6 <2.0.0"
|
||||
gherkin: ^1.1.6+4
|
||||
gherkin: ^1.1.7
|
||||
# gherkin:
|
||||
# path: ../dart_gherkin
|
||||
|
||||
|
|
Loading…
Reference in New Issue