feat(config): adding option to defined the working directory for the process that runs the app under test
This commit is contained in:
parent
be925d5368
commit
6db005658e
|
@ -1,3 +1,6 @@
|
|||
## [1.0.9] - 03/09/2019
|
||||
* Added ability to define the working directory for the app to run the tests against
|
||||
|
||||
## [1.0.8] - 25/08/2019
|
||||
* Updated to latest dart_gherkin lib which now has support for 'Scenerio Outline' and 'Example' blocks
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ class FlutterRunProcessHandler extends ProcessHandler {
|
|||
Process _runningProcess;
|
||||
Stream<String> _processStdoutStream;
|
||||
List<StreamSubscription> _openSubscriptions = <StreamSubscription>[];
|
||||
bool _buildApp = true;
|
||||
String _workingDirectory;
|
||||
String _appTarget;
|
||||
bool _buildApp = true;
|
||||
String _buildFlavor;
|
||||
String _deviceTargetId;
|
||||
String currentObservatoryUri;
|
||||
|
|
|
@ -23,7 +23,11 @@ class FlutterTestConfiguration extends TestConfiguration {
|
|||
/// Defaults to "lib/test_driver/app.dart"
|
||||
String targetAppPath = "lib/test_driver/app.dart";
|
||||
|
||||
/// The build flavor to run the tests against
|
||||
/// Option to define the working directory for the process that runs the app under test (optional)
|
||||
/// Handy if your app is seperated from your tests as flutter needs to be able to find a pubspec file
|
||||
String targetAppWorkingDirecotry;
|
||||
|
||||
/// The build flavor to run the tests against (optional)
|
||||
/// Defaults to empty
|
||||
String buildFlavor = "";
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ class FlutterAppRunnerHook extends Hook {
|
|||
Future<void> _runApp(FlutterTestConfiguration config) async {
|
||||
_flutterRunProcessHandler = FlutterRunProcessHandler();
|
||||
_flutterRunProcessHandler.setApplicationTargetFile(config.targetAppPath);
|
||||
_flutterRunProcessHandler
|
||||
.setWorkingDirectory(config.targetAppWorkingDirecotry);
|
||||
_flutterRunProcessHandler
|
||||
.setBuildRequired(haveRunFirstScenario ? false : config.build);
|
||||
_flutterRunProcessHandler.setBuildFlavor(config.buildFlavor);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_gherkin
|
||||
description: A Gherkin / Cucumber parser and test runner for Dart and Flutter
|
||||
version: 1.0.8
|
||||
version: 1.0.9
|
||||
author: Jon Samwell <jonsamwell@gmail.com>
|
||||
homepage: https://github.com/jonsamwell/flutter_gherkin
|
||||
|
||||
|
|
Loading…
Reference in New Issue