Added path support
This commit is contained in:
parent
1913832893
commit
434db8405c
|
@ -1,2 +1,2 @@
|
|||
# This is a generated file; do not edit or check into version control.
|
||||
integration_test=C:\\Google\\flutter\\packages\\integration_test\\
|
||||
integration_test=C:\\flutter\\packages\\integration_test\\
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\Google\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\Google\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]}],"date_created":"2021-11-24 07:12:59.207785","version":"2.5.3"}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\flutter\\\\packages\\\\integration_test\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]}],"date_created":"2022-03-14 22:27:08.904781","version":"2.10.3"}
|
|
@ -21,7 +21,7 @@ packages:
|
|||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
version: "3.1.6"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -35,7 +35,7 @@ packages:
|
|||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.8.1"
|
||||
version: "2.8.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -105,7 +105,7 @@ packages:
|
|||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -246,9 +246,9 @@ packages:
|
|||
gherkin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: gherkin
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
path: "../../dart_gherkin"
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.0.8"
|
||||
glob:
|
||||
dependency: transitive
|
||||
|
@ -324,7 +324,14 @@ packages:
|
|||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.10"
|
||||
version: "0.12.11"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.3"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -380,7 +387,7 @@ packages:
|
|||
name: platform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.1.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -401,7 +408,7 @@ packages:
|
|||
name: process
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.3"
|
||||
version: "4.2.4"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -553,7 +560,7 @@ packages:
|
|||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.2"
|
||||
version: "0.4.8"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -581,14 +588,14 @@ packages:
|
|||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.1.1"
|
||||
version: "7.5.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -10,8 +10,7 @@ import 'package:source_gen/source_gen.dart';
|
|||
|
||||
class NoOpReporter extends Reporter {}
|
||||
|
||||
class GherkinSuiteTestGenerator
|
||||
extends GeneratorForAnnotation<GherkinTestSuite> {
|
||||
class GherkinSuiteTestGenerator extends GeneratorForAnnotation<GherkinTestSuite> {
|
||||
static const String TEMPLATE = '''
|
||||
class _CustomGherkinIntegrationTestRunner extends GherkinIntegrationTestRunner {
|
||||
_CustomGherkinIntegrationTestRunner(
|
||||
|
@ -46,21 +45,14 @@ void executeTestSuite(
|
|||
_languageService.initialise(
|
||||
annotation.read('featureDefaultLanguage').literalValue.toString(),
|
||||
);
|
||||
final idx = annotation
|
||||
.read('executionOrder')
|
||||
.objectValue
|
||||
.getField('index')!
|
||||
.toIntValue()!;
|
||||
final idx = annotation.read('executionOrder').objectValue.getField('index')!.toIntValue()!;
|
||||
final executionOrder = ExecutionOrder.values[idx];
|
||||
final featureFiles = annotation
|
||||
.read('featurePaths')
|
||||
.listValue
|
||||
.map((path) => Glob(path.toStringValue()!))
|
||||
.map(
|
||||
(glob) => glob
|
||||
.listSync()
|
||||
.map((entity) => File(entity.path).readAsStringSync())
|
||||
.toList(),
|
||||
(glob) => glob.listSync().map((entity) => File(entity.path).readAsStringSync()).toList(),
|
||||
)
|
||||
.reduce((value, element) => value..addAll(element));
|
||||
|
||||
|
@ -88,10 +80,7 @@ void executeTestSuite(
|
|||
}
|
||||
}
|
||||
|
||||
return TEMPLATE
|
||||
.replaceAll('{{feature_functions}}',
|
||||
featureExecutionFunctionsBuilder.toString())
|
||||
.replaceAll(
|
||||
return TEMPLATE.replaceAll('{{feature_functions}}', featureExecutionFunctionsBuilder.toString()).replaceAll(
|
||||
'{{features_to_execute}}',
|
||||
featuresToExecute.toString(),
|
||||
);
|
||||
|
@ -218,6 +207,7 @@ class FeatureFileTestGeneratorVisitor extends FeatureFileVisitor {
|
|||
Iterable<String> tags,
|
||||
bool isFirst,
|
||||
bool isLast,
|
||||
String path,
|
||||
) async {
|
||||
_flushScenario();
|
||||
_currentScenarioCode = _replaceVariable(
|
||||
|
|
31
pubspec.lock
31
pubspec.lock
|
@ -21,7 +21,7 @@ packages:
|
|||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
version: "3.1.6"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -35,7 +35,7 @@ packages:
|
|||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.8.1"
|
||||
version: "2.8.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -63,7 +63,7 @@ packages:
|
|||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -157,9 +157,9 @@ packages:
|
|||
gherkin:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: gherkin
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
path: "../dart_gherkin"
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.0.8"
|
||||
glob:
|
||||
dependency: "direct main"
|
||||
|
@ -193,7 +193,14 @@ packages:
|
|||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.10"
|
||||
version: "0.12.11"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.3"
|
||||
meta:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -228,14 +235,14 @@ packages:
|
|||
name: platform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.1.0"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: process
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.3"
|
||||
version: "4.2.4"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -310,7 +317,7 @@ packages:
|
|||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.2"
|
||||
version: "0.4.8"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -324,14 +331,14 @@ packages:
|
|||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.1.1"
|
||||
version: "7.5.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
10
pubspec.yaml
10
pubspec.yaml
|
@ -4,7 +4,7 @@ version: 3.0.0-rc.9
|
|||
homepage: https://github.com/jonsamwell/flutter_gherkin
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.3 <3.0.0'
|
||||
sdk: ">=2.12.3 <3.0.0"
|
||||
flutter: ">=2.2.0"
|
||||
|
||||
dependencies:
|
||||
|
@ -18,15 +18,15 @@ dependencies:
|
|||
sdk: flutter
|
||||
analyzer: ">=1.7.1 <3.0.0"
|
||||
collection: ^1.15.0
|
||||
gherkin: ^2.0.8
|
||||
# gherkin: ^2.0.8
|
||||
source_gen: ^1.1.1
|
||||
build: ^2.1.1
|
||||
glob: ^2.0.2
|
||||
# gherkin:
|
||||
# path: ../dart_gherkin
|
||||
gherkin:
|
||||
path: ../dart_gherkin
|
||||
|
||||
dev_dependencies:
|
||||
meta: ^1.7.0
|
||||
meta: ^1.7.0
|
||||
pedantic: ^1.11.1
|
||||
build_config: ^1.0.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue