diff --git a/CHANGELOG.md b/CHANGELOG.md index c4852e3..399ce33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.0.12] - 06/02/2019 +* Fixed package analysis error + ## [0.0.11] - 06/02/2019 * Fixes issue with table parameters not being given to step diff --git a/lib/src/configuration.dart b/lib/src/configuration.dart index ec898f4..45f5855 100644 --- a/lib/src/configuration.dart +++ b/lib/src/configuration.dart @@ -21,7 +21,7 @@ class TestConfiguration { String tagExpression; /// The default step timeout - this can be override when definition a step definition - Duration defaultTimeout = Duration(seconds: 10); + Duration defaultTimeout = const Duration(seconds: 10); /// The execution order of features - this default to random to avoid any inter-test depedencies ExecutionOrder order = ExecutionOrder.random; diff --git a/lib/src/flutter/flutter_run_process_handler.dart b/lib/src/flutter/flutter_run_process_handler.dart index 7bbdc0f..01a280c 100644 --- a/lib/src/flutter/flutter_run_process_handler.dart +++ b/lib/src/flutter/flutter_run_process_handler.dart @@ -68,6 +68,7 @@ class FlutterRunProcessHandler extends ProcessHandler { completer.completeError(TimeoutException( "Timeout while wait for observatory debugger uri", timeout)); }).listen((logLine) { + // stdout.write(logLine); if (_observatoryDebuggerUriRegex.hasMatch(logLine)) { sub?.cancel(); if (!completer.isCompleted) diff --git a/lib/src/flutter/flutter_test_configuration.dart b/lib/src/flutter/flutter_test_configuration.dart index 0f68cc1..ebbbfe0 100644 --- a/lib/src/flutter/flutter_test_configuration.dart +++ b/lib/src/flutter/flutter_test_configuration.dart @@ -28,7 +28,6 @@ class FlutterTestConfiguration extends TestConfiguration { Platform.environment['VM_SERVICE_URL']; final driver = await FlutterDriver.connect( dartVmServiceUrl: dartVmServiceUrl, - isolateReadyTimeout: const Duration(seconds: 30), logCommunicationToFile: false, printCommunication: false); return driver; diff --git a/pubspec.lock b/pubspec.lock index 2434520..1403bb3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.34.3" + version: "0.35.0" args: dependency: transitive description: @@ -92,7 +92,7 @@ packages: name: front_end url: "https://pub.dartlang.org" source: hosted - version: "0.1.9+1" + version: "0.1.10" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -167,7 +167,7 @@ packages: name: kernel url: "https://pub.dartlang.org" source: hosted - version: "0.3.9+1" + version: "0.3.10" logging: dependency: transitive description: @@ -333,7 +333,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.4.1" + version: "1.5.4" stack_trace: dependency: transitive description: @@ -361,28 +361,28 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0" test: dependency: "direct main" description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.5.1+1" + version: "1.5.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "0.2.2" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+1" + version: "0.2.1+1" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ef0acb7..7de7af0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_gherkin description: A Gherkin / Cucumber parser and test runner for Dart and Flutter -version: 0.0.11 +version: 0.0.12 author: Jon Samwell homepage: https://github.com/jonsamwell/flutter_gherkin diff --git a/test/feature_file_runner_test.dart b/test/feature_file_runner_test.dart index 7e79d71..6ec9b8c 100644 --- a/test/feature_file_runner_test.dart +++ b/test/feature_file_runner_test.dart @@ -322,11 +322,12 @@ void main() { final reporterMock = ReporterMock(); reporterMock.onStepFinishedFn = (message) => finishedMessage = message; final stepDefiniton = MockStepDefinition( - (_) async => await Future.delayed(Duration(seconds: 2))); + (_) async => await Future.delayed(const Duration(seconds: 2))); final executableStep = ExectuableStep(MockGherkinExpression((_) => true), stepDefiniton); final runner = FeatureFileRunner( - TestConfiguration()..defaultTimeout = Duration(milliseconds: 1), + TestConfiguration() + ..defaultTimeout = const Duration(milliseconds: 1), MockTagExpressionEvaluator(), [executableStep], reporterMock, @@ -366,7 +367,8 @@ void main() { MockGherkinExpression((s) => s == stepTextThree), stepDefinitonThree); final runner = FeatureFileRunner( - TestConfiguration()..defaultTimeout = Duration(milliseconds: 1), + TestConfiguration() + ..defaultTimeout = const Duration(milliseconds: 1), MockTagExpressionEvaluator(), [executableStep, executableStepTwo, executableStepThree], reporterMock, diff --git a/test/gherkin/steps/step_definition_test.dart b/test/gherkin/steps/step_definition_test.dart index 1aaee7c..fc0e464 100644 --- a/test/gherkin/steps/step_definition_test.dart +++ b/test/gherkin/steps/step_definition_test.dart @@ -34,7 +34,7 @@ void main() { final step = StepDefinitionMock(StepDefinitionConfiguration(), 2); expect( () async => await step.run( - null, null, Duration(seconds: 1), const Iterable.empty()), + null, null, const Duration(seconds: 1), const Iterable.empty()), throwsA((e) => e is GherkinStepParameterMismatchException && e.message == @@ -48,7 +48,8 @@ void main() { () async { final step = StepDefinitionMock(StepDefinitionConfiguration(), 2); expect( - () async => await step.run(null, null, Duration(seconds: 1), [1]), + () async => + await step.run(null, null, const Duration(seconds: 1), [1]), throwsA((e) => e is GherkinStepParameterMismatchException && e.message == @@ -59,7 +60,7 @@ void main() { test("runs step when correct number of parameters provided", () async { final step = StepDefinitionMock(StepDefinitionConfiguration(), 1); - await step.run(null, null, Duration(seconds: 1), [1]); + await step.run(null, null, const Duration(seconds: 1), [1]); expect(step.invocationCount, 1); }); }); @@ -70,9 +71,8 @@ void main() { final step = StepDefinitionMock( StepDefinitionConfiguration(), 0, () async => throw Exception("1")); expect( - await step.run( - null, null, Duration(milliseconds: 1), const Iterable.empty()), - (r) { + await step.run(null, null, const Duration(milliseconds: 1), + const Iterable.empty()), (r) { return r is ErroredStepResult && r.result == StepExecutionResult.error && r.exception is Exception && @@ -86,9 +86,8 @@ void main() { final step = StepDefinitionMock(StepDefinitionConfiguration(), 0, () async => throw TestFailure("1")); expect( - await step.run( - null, null, Duration(milliseconds: 1), const Iterable.empty()), - (r) { + await step.run(null, null, const Duration(milliseconds: 1), + const Iterable.empty()), (r) { return r is StepResult && r.result == StepExecutionResult.fail && r.resultReason == "1";