Skip to content

Commit

Permalink
- Fix #231 - Removed the use of explicitly calling pumpAndSettle i…
Browse files Browse the repository at this point in the history
…n the pre-defined steps in favour of the implicit `pumpAndSettle` calls used in the `WidgetTesterAppDriverAdapter`.

  - Added ability to add a `appLifecyclePumpHandler` to override the default handler that determines how the app is pumped during lifecycle events.  Useful if your app has a long splash screen etc. Parameter is on `executeTestSuite`.
  - Added ability to ensure feature paths are relative when generating reports `useAbsolutePaths` on the `GherkinTestSuite` attribute

* BREAKING CHANGE: The parameters on `executeTestSuite` are now keyed to allow for the above changes
  • Loading branch information
jonsamwell committed Jun 24, 2022
1 parent 70f1c6c commit 1f63ecc
Show file tree
Hide file tree
Showing 21 changed files with 295 additions and 283 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.0.0-rc.11] - 24/06/2022
- Fix #231 - Removed the use of explicitly calling `pumpAndSettle` in the pre-defined steps in favour of the implicit `pumpAndSettle` calls used in the `WidgetTesterAppDriverAdapter`.
- Added ability to add a `appLifecyclePumpHandler` to override the default handler that determines how the app is pumped during lifecycle events. Useful if your app has a long splash screen etc. Parameter is on `executeTestSuite`.
- Added ability to ensure feature paths are relative when generating reports `useAbsolutePaths` on the `GherkinTestSuite` attribute

* BREAKING CHANGE: The parameters on `executeTestSuite` are now keyed to allow for the above changes

## [3.0.0-rc.10] - 23/06/2022

- Fix #195: Adding missing export for `wait_until_key_exists_step.dart`
Expand Down
4 changes: 4 additions & 0 deletions example_with_integration_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# generate the test suite
flutter pub run build_runner build --delete-conflicting-outputs
# re-generate
flutter pub run build_runner clean
flutter pub run build_runner build --delete-conflicting-outputs
# run the tests
flutter drive --driver=test_driver/integration_test_driver.dart --target=integration_test/gherkin_suite_test.dart
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ final thenIExpectTheTodos = then1<GherkinTable, FlutterWorld>(
expect(context.configuration.timeout, isNotNull);
expect(context.configuration.timeout!.inSeconds, 5);

await context.world.appDriver.waitForAppToSettle();

// get the parent list
final listTileFinder = context.world.appDriver.findBy(
ListTile,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import 'package:flutter_gherkin/flutter_gherkin.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:gherkin/gherkin.dart';

import 'gherkin/configuration.dart';

part 'gherkin_suite_test.g.dart';

@GherkinTestSuite()
@GherkinTestSuite(
useAbsolutePaths: false,
)
void main() {
executeTestSuite(
gherkinTestConfiguration,
appInitializationFn,
appMainFunction: appInitializationFn,
configuration: gherkinTestConfiguration,
);
}
Loading

0 comments on commit 1f63ecc

Please sign in to comment.