diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 9675dec..5b7a217 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -18,23 +18,23 @@ jobs: steps: - uses: actions/checkout@v4 - - name: ๐Ÿฆ Setup Flutter SDK - uses: flutter-actions/setup-flutter@v3 - with: - channel: stable - version: '3.29.0' + - name: ๐ŸŽฏ Setup Dart SDK + uses: dart-lang/setup-dart@v1 - name: ๐Ÿ›  Install dependencies - run: flutter pub get + run: dart pub get --no-example - name: ๐Ÿ‘จโ€๐ŸŽจ Validate formatting run: dart format --set-exit-if-changed lib test - name: ๐Ÿ•ต๏ธโ€โ™€๏ธ Analyze project source - run: flutter analyze . --fatal-infos + run: dart analyze --fatal-infos --format machine lib test + + - name: ๐Ÿค– Install coverage + run: dart pub global activate coverage - name: ๐Ÿงช Run tests - run: flutter test --coverage + run: dart pub global run coverage:test_with_coverage - name: ๐ŸŽฏ Check Code Coverage uses: VeryGoodOpenSource/very_good_coverage@v1 @@ -47,7 +47,7 @@ jobs: - name: ๐Ÿ“ˆ Check pana run: | - flutter pub global activate pana + dart pub global activate pana PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p") echo "score: $PANA_SCORE" IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1] diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f6f0ba..4dba83c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.9.0] - Upgrade dependencies + +* **BREAKING CHANGE**: The package doesn't provide pre-built steps anymore. Steps will appear in the `step` folder. +* Drop unused dependencies +* Upgrade `build` dependency + ## [1.8.2] - Ignore linter warnings * Ignore all lint or warning rules in generated code by (@lsaudon) diff --git a/README.md b/README.md index b54400e..9e0af29 100644 --- a/README.md +++ b/README.md @@ -204,35 +204,6 @@ List of predefined steps: * I tap {..} text * The app is running -If you want to use predefined steps without having them in your `steps` folder then you may create a `build.yaml` file in the root of your project with the following content (see the `example` folder): -```yaml -targets: - $default: - builders: - bdd_widget_test|featureBuilder: - options: - externalSteps: - - package:bdd_widget_test/step/i_see_text.dart - - package:bdd_widget_test/step/i_dont_see_text.dart - - package:bdd_widget_test/step/i_see_multiple_texts.dart - - package:bdd_widget_test/step/i_tap_text.dart - - package:bdd_widget_test/step/i_see_icon.dart - - package:bdd_widget_test/step/i_dont_see_icon.dart - - package:bdd_widget_test/step/i_tap_icon.dart - - package:bdd_widget_test/step/i_see_rich_text.dart - - package:bdd_widget_test/step/i_dont_see_rich_text.dart - - package:bdd_widget_test/step/i_see_widget.dart - - package:bdd_widget_test/step/i_dont_see_widget.dart - - package:bdd_widget_test/step/i_see_exactly_widgets.dart - - package:bdd_widget_test/step/i_see_multiple_widgets.dart - - package:bdd_widget_test/step/i_enter_into_input_field.dart - - package:bdd_widget_test/step/i_see_disabled_elevated_button.dart - - package:bdd_widget_test/step/i_see_enabled_elevated_button.dart - - package:bdd_widget_test/step/i_wait.dart - - package:bdd_widget_test/step/i_dismiss_the_page.dart -``` -That will tell the plugin to reuse steps from the plugin itself and do not put them into your code. - ## Hooks If you want to add hooks, you need to add the addHooks flag to the `build.yaml`. This will generate a file that allows you to handle a beforeAll, afterAll, beforeEach and afterEach call. These hooks will be generated per directory, just like the steps. Also like with the steps, you can define a directory in the build.yaml to define one set location for the hooks. These hooks will then be used everywhere. diff --git a/analysis_options.yaml b/analysis_options.yaml index c6022bd..7ed1273 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,8 +1,5 @@ include: package:very_good_analysis/analysis_options.yaml -analyzer: - exclude: [test/**_test.dart, example/test/**_test.dart] - linter: rules: avoid_positional_boolean_parameters: false diff --git a/example/bdd_options.yaml b/example/bdd_options.yaml deleted file mode 100644 index d835173..0000000 --- a/example/bdd_options.yaml +++ /dev/null @@ -1,3 +0,0 @@ -include: package:bdd_widget_test/bdd_options.yaml -externalSteps: - - package:bdd_widget_test/step/i_see_text.dart \ No newline at end of file diff --git a/example/build.yaml b/example/build.yaml index de4fc9f..2cfa42d 100644 --- a/example/build.yaml +++ b/example/build.yaml @@ -14,26 +14,26 @@ targets: # testMethodName: customTestMethodName # addHooks: true # if true, hooks will be added to the test; default is false # hookFolderName: bdd_hooks - include: package:bdd_widget_test/bdd_options.yaml # you may add defaul external steps with this line + # include: package:/bdd_options.yaml # you may add defaul external steps with this line externalSteps: # or list only steps that you need - - package:bdd_widget_test/step/i_see_text.dart - # - package:bdd_widget_test/step/i_dont_see_text.dart - # - package:bdd_widget_test/step/i_see_multiple_texts.dart - # - package:bdd_widget_test/step/i_tap_text.dart - # - package:bdd_widget_test/step/i_see_icon.dart - # - package:bdd_widget_test/step/i_dont_see_icon.dart - # - package:bdd_widget_test/step/i_tap_icon.dart - # - package:bdd_widget_test/step/i_see_rich_text.dart - # - package:bdd_widget_test/step/i_dont_see_rich_text.dart - # - package:bdd_widget_test/step/i_see_widget.dart - # - package:bdd_widget_test/step/i_dont_see_widget.dart - # - package:bdd_widget_test/step/i_see_exactly_widgets.dart - # - package:bdd_widget_test/step/i_see_multiple_widgets.dart - # - package:bdd_widget_test/step/i_enter_into_input_field.dart - # - package:bdd_widget_test/step/i_see_disabled_elevated_button.dart - # - package:bdd_widget_test/step/i_see_enabled_elevated_button.dart - # - package:bdd_widget_test/step/i_wait.dart - # - package:bdd_widget_test/step/i_dismiss_the_page.dart + # - package:/step/i_see_text.dart + # - package:/step/i_dont_see_text.dart + # - package:/step/i_see_multiple_texts.dart + # - package:/step/i_tap_text.dart + # - package:/step/i_see_icon.dart + # - package:/step/i_dont_see_icon.dart + # - package:/step/i_tap_icon.dart + # - package:/step/i_see_rich_text.dart + # - package:/step/i_dont_see_rich_text.dart + # - package:/step/i_see_widget.dart + # - package:/step/i_dont_see_widget.dart + # - package:/step/i_see_exactly_widgets.dart + # - package:/step/i_see_multiple_widgets.dart + # - package:/step/i_enter_into_input_field.dart + # - package:/step/i_see_disabled_elevated_button.dart + # - package:/step/i_see_enabled_elevated_button.dart + # - package:/step/i_wait.dart + # - package:/step/i_dismiss_the_page.dart generate_for: - test/** - integration_test/** diff --git a/example/integration_test/sample_test.dart b/example/integration_test/sample_test.dart index b01d8d4..94a5de8 100644 --- a/example/integration_test/sample_test.dart +++ b/example/integration_test/sample_test.dart @@ -6,8 +6,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import './../test/step/common/the_app_is_running.dart'; -import 'package:bdd_widget_test/step/i_see_text.dart'; -import 'package:bdd_widget_test/step/i_tap_icon.dart'; +import './../test/step/i_see_text.dart'; +import './../test/step/i_tap_icon.dart'; void main() { group('''Counter''', () { diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 77676be..53a1492 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -10,11 +10,11 @@ dependencies: dev_dependencies: bdd_widget_test: path: ../ - build_runner: ^2.4.10 + build_runner: ^2.7.0 flutter_driver: sdk: flutter flutter_test: sdk: flutter integration_test: sdk: flutter - patrol: ^3.7.2 + patrol: ^3.19.0 diff --git a/example/test/features/sub-feature/sub-sub-feature/sample_test.dart b/example/test/features/sub-feature/sub-sub-feature/sample_test.dart index b11c35c..faa5ade 100644 --- a/example/test/features/sub-feature/sub-sub-feature/sample_test.dart +++ b/example/test/features/sub-feature/sub-sub-feature/sample_test.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import './../../../step/common/the_app_is_running.dart'; -import 'package:bdd_widget_test/step/i_see_text.dart'; +import './../../../step/i_see_text.dart'; void main() { group('''Counter''', () { diff --git a/example/test/sample_test.dart b/example/test/sample_test.dart index d7acddb..4aca3af 100644 --- a/example/test/sample_test.dart +++ b/example/test/sample_test.dart @@ -6,8 +6,8 @@ import 'package:flutter_test/flutter_test.dart'; import './step/common/the_app_is_running.dart'; import './step/i_do_not_see_text.dart'; -import 'package:bdd_widget_test/step/i_see_text.dart'; -import 'package:bdd_widget_test/step/i_tap_icon.dart'; +import './step/i_see_text.dart'; +import './step/i_tap_icon.dart'; import './step/i_tap_icon_times.dart'; void main() { diff --git a/example/test/songs_test.dart b/example/test/songs_test.dart index 1c08791..ab1244c 100644 --- a/example/test/songs_test.dart +++ b/example/test/songs_test.dart @@ -11,13 +11,13 @@ void main() { group('''Songs''', () { testWidgets('''Available songs''', (tester) async { await theFollowingSongs( - tester, - 'Good', - const bdd.DataTable([ - ['artist', 'title'], - ['The Beatles', 'Let It Be'], - ['Camel', 'Slow yourself down'] - ])); + tester, + 'Good', + const bdd.DataTable([ + ['artist', 'title'], + ['The Beatles', 'Let It Be'], + ['Camel', 'Slow yourself down'] + ])); }); }); } diff --git a/lib/step/i_see_text.dart b/example/test/step/i_see_text.dart similarity index 100% rename from lib/step/i_see_text.dart rename to example/test/step/i_see_text.dart diff --git a/lib/step/i_tap_icon.dart b/example/test/step/i_tap_icon.dart similarity index 100% rename from lib/step/i_tap_icon.dart rename to example/test/step/i_tap_icon.dart diff --git a/example/test/step/i_tap_icon_times.dart b/example/test/step/i_tap_icon_times.dart index cdd73d2..b788012 100644 --- a/example/test/step/i_tap_icon_times.dart +++ b/example/test/step/i_tap_icon_times.dart @@ -1,7 +1,8 @@ -import 'package:bdd_widget_test/step/i_tap_icon.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'i_tap_icon.dart'; + Future iTapIconTimes( WidgetTester tester, IconData icon, diff --git a/lib/bdd_options.yaml b/lib/bdd_options.yaml deleted file mode 100644 index 06a1600..0000000 --- a/lib/bdd_options.yaml +++ /dev/null @@ -1,19 +0,0 @@ -externalSteps: - - package:bdd_widget_test/step/i_see_text.dart - - package:bdd_widget_test/step/i_dont_see_text.dart - - package:bdd_widget_test/step/i_see_multiple_texts.dart - - package:bdd_widget_test/step/i_tap_text.dart - - package:bdd_widget_test/step/i_see_icon.dart - - package:bdd_widget_test/step/i_dont_see_icon.dart - - package:bdd_widget_test/step/i_tap_icon.dart - - package:bdd_widget_test/step/i_see_rich_text.dart - - package:bdd_widget_test/step/i_dont_see_rich_text.dart - - package:bdd_widget_test/step/i_see_widget.dart - - package:bdd_widget_test/step/i_dont_see_widget.dart - - package:bdd_widget_test/step/i_see_exactly_widgets.dart - - package:bdd_widget_test/step/i_see_multiple_widgets.dart - - package:bdd_widget_test/step/i_enter_into_input_field.dart - - package:bdd_widget_test/step/i_see_disabled_elevated_button.dart - - package:bdd_widget_test/step/i_see_enabled_elevated_button.dart - - package:bdd_widget_test/step/i_wait.dart - - package:bdd_widget_test/step/i_dismiss_the_page.dart \ No newline at end of file diff --git a/lib/bdd_widget_test.dart b/lib/bdd_widget_test.dart index 61a7216..21df54b 100644 --- a/lib/bdd_widget_test.dart +++ b/lib/bdd_widget_test.dart @@ -9,13 +9,124 @@ import 'package:build/build.dart'; import 'package:path/path.dart' as p; import 'package:yaml/yaml.dart'; +/// Creates a [FeatureBuilder] instance with the provided build options. +/// +/// This function is the main entry point for the BDD Widget Test code +/// generation system. It's used by the build system to create a builder +/// that processes `.feature` files and generates corresponding Dart test files. +/// +/// The [options] parameter contains configuration settings from `build.yaml` +/// and/or `bdd_options.yaml` files, which are converted to [GeneratorOptions] +/// and used to customize the code generation behavior. +/// +/// Example usage in `build.yaml`: +/// ```yaml +/// targets: +/// $default: +/// builders: +/// bdd_widget_test|featureBuilder: +/// options: +/// testMethodName: testGoldens +/// stepFolderName: ./custom_steps +/// ``` +/// +/// Returns a [FeatureBuilder] instance configured with the specified options. Builder featureBuilder(BuilderOptions options) => FeatureBuilder( GeneratorOptions.fromMap(options.config), ); +/// A code generator builder that transforms BDD feature files into Dart test files. +/// +/// [FeatureBuilder] is responsible for parsing Gherkin feature files (`.feature`) +/// and generating corresponding Dart test files (`_test.dart`) that can be executed +/// as Flutter widget tests. It handles the complete transformation process including: +/// +/// - Parsing feature files written in Gherkin syntax +/// - Generating executable Dart test code with proper test structure +/// - Creating step definition files for new steps +/// - Managing existing step definitions and imports +/// - Handling hooks for setup and teardown operations +/// - Supporting integration test configurations +/// - Applying customizable generation options +/// +/// The builder processes files with the `.feature` extension and outputs +/// corresponding `_test.dart` files in the same directory structure. +/// +/// Features supported: +/// - Scenarios and Scenario Outlines +/// - Data Tables and Examples +/// - Tags for conditional execution +/// - Background steps +/// - Hooks (Before/After) +/// - Custom test method names +/// - Custom tester types and names +/// - Integration test binding +/// - External step definitions +/// +/// Example feature file: +/// ```gherkin +/// Feature: Counter App +/// Scenario: Initial counter value is 0 +/// Given the app is running +/// Then I see {'0'} text +/// ``` +/// +/// Generated test file: +/// ```dart +/// void main() { +/// group('''Counter App''', () { +/// testWidgets('''Initial counter value is 0''', (tester) async { +/// await theAppIsRunning(tester); +/// await iSeeText(tester, '0'); +/// }); +/// }); +/// } +/// ``` class FeatureBuilder implements Builder { + /// Creates a new [FeatureBuilder] with the specified generator options. + /// + /// The [generatorOptions] parameter defines how the builder should generate + /// test code, including: + /// - Test method names (e.g., `testWidgets`, `testGoldens`) + /// - Tester types and names (e.g., `WidgetTester`, `PatrolIntegrationTester`) + /// - Step folder locations and naming conventions + /// - Hook configurations for setup and teardown + /// - Integration test settings + /// - External step definitions + /// + /// This constructor is typically called by the [featureBuilder] function + /// rather than being invoked directly. + /// + /// Example: + /// ```dart + /// final builder = FeatureBuilder( + /// GeneratorOptions( + /// testMethodName: 'testGoldens', + /// stepFolderName: './custom_steps', + /// testerType: 'PatrolIntegrationTester', + /// ), + /// ); + /// ``` FeatureBuilder(this.generatorOptions); + /// Configuration options that control how feature files are processed and + /// what kind of Dart test code is generated. + /// + /// These options can be customized through: + /// - `build.yaml` builder configuration + /// - `bdd_options.yaml` project-specific settings + /// - Included external configuration files + /// + /// The options are merged in priority order, with builder options taking + /// precedence over file-based options. + /// + /// Common configuration properties: + /// - `testMethodName`: The Flutter test method to use (default: 'testWidgets') + /// - `testerType`: The type of tester parameter (default: 'WidgetTester') + /// - `testerName`: The name of the tester parameter (default: 'tester') + /// - `stepFolderName`: Directory for step definition files (default: './step') + /// - `addHooks`: Whether to generate hook files (default: false) + /// - `includeIntegrationTestBinding`: Integration test support (default: true) final GeneratorOptions generatorOptions; @override diff --git a/lib/step/i_dismiss_the_page.dart b/lib/step/i_dismiss_the_page.dart deleted file mode 100644 index 28ecb01..0000000 --- a/lib/step/i_dismiss_the_page.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I dismiss the page -Future iDismissThePage( - WidgetTester tester, -) async { - await tester.pageBack(); - await tester.pumpAndSettle(); -} diff --git a/lib/step/i_dont_see_icon.dart b/lib/step/i_dont_see_icon.dart deleted file mode 100644 index 0ebe049..0000000 --- a/lib/step/i_dont_see_icon.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I don't see {Icons.add} icon -Future iDontSeeIcon( - WidgetTester tester, - IconData icon, -) async { - expect(find.byIcon(icon), findsNothing); -} diff --git a/lib/step/i_dont_see_rich_text.dart b/lib/step/i_dont_see_rich_text.dart deleted file mode 100644 index b137b77..0000000 --- a/lib/step/i_dont_see_rich_text.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: When I don't see {'text'} rich text -Future iDontSeeRichText( - WidgetTester tester, - String text, -) async { - final finder = find.byWidgetPredicate( - (widget) => widget is RichText && widget.text.toPlainText() == text, - ); - expect(finder, findsNothing); -} diff --git a/lib/step/i_dont_see_text.dart b/lib/step/i_dont_see_text.dart deleted file mode 100644 index 0817834..0000000 --- a/lib/step/i_dont_see_text.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: When I don't see {'text'} text -Future iDontSeeText( - WidgetTester tester, - String text, -) async { - expect(find.text(text), findsNothing); -} diff --git a/lib/step/i_dont_see_widget.dart b/lib/step/i_dont_see_widget.dart deleted file mode 100644 index 1bdb6c4..0000000 --- a/lib/step/i_dont_see_widget.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I don't see {SomeWidget} widget -Future iDontSeeWidget( - WidgetTester tester, - Type type, -) async { - expect(find.byType(type), findsNothing); -} diff --git a/lib/step/i_enter_into_input_field.dart b/lib/step/i_enter_into_input_field.dart deleted file mode 100644 index 38333ad..0000000 --- a/lib/step/i_enter_into_input_field.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: When I enter {'text'} into {1} input field -Future iEnterIntoInputField( - WidgetTester tester, - String text, - int index, -) async { - final textField = find.byType(TextField).at(index); - - await tester.enterText(textField, text); -} diff --git a/lib/step/i_see_disabled_elevated_button.dart b/lib/step/i_see_disabled_elevated_button.dart deleted file mode 100644 index 2e9980b..0000000 --- a/lib/step/i_see_disabled_elevated_button.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I see disabled elevated button -Future iSeeDisabledElevatedButton( - WidgetTester tester, -) async { - final button = find.byType(ElevatedButton); - - expect((tester.firstWidget(button) as ElevatedButton).enabled, false); -} diff --git a/lib/step/i_see_enabled_elevated_button.dart b/lib/step/i_see_enabled_elevated_button.dart deleted file mode 100644 index 9751ea7..0000000 --- a/lib/step/i_see_enabled_elevated_button.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I see enabled elevated button -Future iSeeEnabledElevatedButton( - WidgetTester tester, -) async { - final button = find.byType(ElevatedButton); - - expect((tester.firstWidget(button) as ElevatedButton).enabled, true); -} diff --git a/lib/step/i_see_exactly_widgets.dart b/lib/step/i_see_exactly_widgets.dart deleted file mode 100644 index 2c22012..0000000 --- a/lib/step/i_see_exactly_widgets.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I see exactly {4} {SomeWidget} widgets -Future iSeeExactlyWidgets( - WidgetTester tester, - int count, - Type type, -) async { - expect(find.byType(type, skipOffstage: false), findsNWidgets(count)); -} diff --git a/lib/step/i_see_icon.dart b/lib/step/i_see_icon.dart deleted file mode 100644 index de5b6f2..0000000 --- a/lib/step/i_see_icon.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I see {Icons.add} icon -Future iSeeIcon( - WidgetTester tester, - IconData icon, -) async { - expect(find.byIcon(icon), findsOneWidget); -} diff --git a/lib/step/i_see_multiple_texts.dart b/lib/step/i_see_multiple_texts.dart deleted file mode 100644 index 94140f9..0000000 --- a/lib/step/i_see_multiple_texts.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: When I see multiple {'text'} texts -Future iSeeMultipleTexts( - WidgetTester tester, - String text, -) async { - expect(find.text(text), findsWidgets); -} diff --git a/lib/step/i_see_multiple_widgets.dart b/lib/step/i_see_multiple_widgets.dart deleted file mode 100644 index ac87f2e..0000000 --- a/lib/step/i_see_multiple_widgets.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I see multiple {SomeWidget} widgets -Future iSeeMultipleWidgets( - WidgetTester tester, - Type type, -) async { - expect(find.byType(type), findsWidgets); -} diff --git a/lib/step/i_see_rich_text.dart b/lib/step/i_see_rich_text.dart deleted file mode 100644 index 92a9300..0000000 --- a/lib/step/i_see_rich_text.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -/// Example: When I see {'text'} rich text -Future iSeeRichText( - WidgetTester tester, - String text, -) async { - final finder = find.byWidgetPredicate( - (widget) => widget is RichText && widget.text.toPlainText() == text, - ); - expect(finder, findsOneWidget); -} diff --git a/lib/step/i_see_widget.dart b/lib/step/i_see_widget.dart deleted file mode 100644 index ae497d4..0000000 --- a/lib/step/i_see_widget.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: Then I see {SomeWidget} widget -Future iSeeWidget( - WidgetTester tester, - Type type, -) async { - expect(find.byType(type), findsOneWidget); -} diff --git a/lib/step/i_tap_text.dart b/lib/step/i_tap_text.dart deleted file mode 100644 index 95bf6b8..0000000 --- a/lib/step/i_tap_text.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: When I tap {'some'} text -Future iTapText( - WidgetTester tester, - String text, -) async { - await tester.tap(find.text(text)); - await tester.pump(); -} diff --git a/lib/step/i_wait.dart b/lib/step/i_wait.dart deleted file mode 100644 index e0369a6..0000000 --- a/lib/step/i_wait.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -/// Example: And I wait -Future iWait(WidgetTester tester) async { - await tester.pumpAndSettle(); -} diff --git a/pubspec.yaml b/pubspec.yaml index d6b5497..ccd5938 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: bdd_widget_test description: A BDD-style widget testing library. Generates Flutter widget tests from *.feature files. -version: 1.8.2 +version: 1.9.0 repository: https://github.com/olexale/bdd_widget_test issue_tracker: https://github.com/olexale/bdd_widget_test/issues @@ -8,22 +8,19 @@ environment: sdk: ">=2.18.0 <4.0.0" dependencies: - build: ^2.2.1 + build: ^3.0.0 build_config: ^1.0.0 characters: ^1.2.0 collection: ^1.15.0 dart_style: ^3.0.0 diacritic: ^0.1.3 file: ^7.0.0 - flutter: - sdk: flutter - flutter_test: - sdk: flutter meta: ^1.7.0 path: ^1.8.0 yaml: ^3.1.0 dev_dependencies: - build_runner: ^2.4.10 - build_test: ^2.2.3 - very_good_analysis: ^7.0.0 + build_runner: ^2.7.0 + build_test: ^3.3.2 + test: ^1.26.3 + very_good_analysis: ^9.0.0 diff --git a/test/after_test.dart b/test/after_test.dart index 3a8cb52..071b41b 100644 --- a/test/after_test.dart +++ b/test/after_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('After steps appear after groups ', () { diff --git a/test/background_test.dart b/test/background_test.dart index c5ec458..a0f1575 100644 --- a/test/background_test.dart +++ b/test/background_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Background steps appear before groups ', () { diff --git a/test/comment_test.dart b/test/comment_test.dart index f748973..b43b331 100644 --- a/test/comment_test.dart +++ b/test/comment_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Comments above features copy-paste into the target file', () { diff --git a/test/custom_scenario_params_test.dart b/test/custom_scenario_params_test.dart index 0ea3af4..caa78cb 100644 --- a/test/custom_scenario_params_test.dart +++ b/test/custom_scenario_params_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Feature Custom Scenario Parameters using tag only', () { diff --git a/test/custom_tester_name_test.dart b/test/custom_tester_name_test.dart index 1b03dfd..195dc08 100644 --- a/test/custom_tester_name_test.dart +++ b/test/custom_tester_name_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Feature Custom Tester name using tag', () { diff --git a/test/custom_tester_type_test.dart b/test/custom_tester_type_test.dart index c8a2c81..86f4b16 100644 --- a/test/custom_tester_type_test.dart +++ b/test/custom_tester_type_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Feature Custom Tester Type using tag', () { diff --git a/test/data_table_test.dart b/test/data_table_test.dart index 6dd7ed6..4e0a689 100644 --- a/test/data_table_test.dart +++ b/test/data_table_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/data_table.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('asLists', () { diff --git a/test/data_tables_test.dart b/test/data_tables_test.dart index bedebef..5bc7926 100644 --- a/test/data_tables_test.dart +++ b/test/data_tables_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Data Tables ', () { diff --git a/test/diacritics_test.dart b/test/diacritics_test.dart index 6b601eb..594b0ae 100644 --- a/test/diacritics_test.dart +++ b/test/diacritics_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Diacritics ', () { diff --git a/test/existing_step_test.dart b/test/existing_step_test.dart index fc261cb..f187135 100644 --- a/test/existing_step_test.dart +++ b/test/existing_step_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Existing step will not be generated', () { diff --git a/test/external_step_test.dart b/test/external_step_test.dart index b22a451..ee98649 100644 --- a/test/external_step_test.dart +++ b/test/external_step_test.dart @@ -1,7 +1,7 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('External step will not be generated', () { diff --git a/test/feature_generator_test.dart b/test/feature_generator_test.dart index 6ea7c92..30f2468 100644 --- a/test/feature_generator_test.dart +++ b/test/feature_generator_test.dart @@ -4,8 +4,8 @@ import 'package:bdd_widget_test/src/util/isolate_helper.dart'; import 'package:build/build.dart'; import 'package:build_test/build_test.dart'; import 'package:file/memory.dart'; -import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart' as p; +import 'package:test/test.dart'; import 'util/testing_data.dart'; @@ -37,8 +37,7 @@ void main() { ' });\n' '}\n'; const scenario = 'simple'; - final content = await generate(scenario); - expect(content, expected); + await generate(scenario, expected); }); test('existing step should not regenerate', () async { @@ -50,7 +49,7 @@ void main() { ..createSync(recursive: true) ..writeAsStringSync(expectedFileContent); - await generate(scenario); + await generate(scenario, null); final content = fs.file(dummyStepPath).readAsStringSync(); expect(content, expectedFileContent); @@ -91,9 +90,7 @@ relativeToTestFolder: false ' });\n' '}\n'; - final content = await generate(scenario); - - expect(content, expected); + await generate(scenario, expected); }); test('custom bdd_options', () async { @@ -153,8 +150,7 @@ hookFolderName: hooksFolder '}\n'; const scenario = 'options'; - final content = await generate(scenario); - expect(content, expected); + await generate(scenario, expected); }); test('non-valid include', () async { @@ -165,7 +161,7 @@ hookFolderName: hooksFolder const scenario = 'options'; expect( - () => generate(scenario), + () => generate(scenario, ''), throwsException, ); }); @@ -204,8 +200,7 @@ stepFolderName: ./scenarios '}\n'; const scenario = 'options'; - final content = await generate(scenario); - expect(content, expected); + await generate(scenario, expected); }); test('nested includes', () async { @@ -258,13 +253,13 @@ stepFolderName: ./scenarios '}\n'; const scenario = 'options'; - final content = await generate( + await generate( scenario, + expected, const BuilderOptions({ 'include': externalYaml3, }), ); - expect(content, expected); }); test('Integration test with integration_test dependency', () async { @@ -296,8 +291,7 @@ dev_dependencies: '}\n'; const scenario = 'integration'; - final content = await generate(scenario, null, 'integration_test'); - expect(content, expected); + await generate(scenario, expected, null, 'integration_test'); }); test('Integration test without integration_test dependency', () async { @@ -324,16 +318,16 @@ dev_dependencies: '}\n'; const scenario = 'integration'; - final content = await generate(scenario, null, 'integration_test'); - expect(content, expected); + await generate(scenario, expected, null, 'integration_test'); }); } // ---------------------------------------------------------------------------- const pkgName = 'pkg'; -Future generate( - String scenario, [ +Future generate( + String scenario, + String? expectedOutput, [ BuilderOptions? options, String testFolderName = 'test', ]) async { @@ -343,15 +337,15 @@ Future generate( '$pkgName|$path/sample.feature': minimalFeatureFile, }; - final writer = InMemoryAssetWriter(); await testBuilder( featureBuilder(options ?? BuilderOptions.empty), srcs, rootPackage: pkgName, - writer: writer, - ); - return String.fromCharCodes( - writer.assets[AssetId(pkgName, '$path/sample_test.dart')] ?? [], + outputs: expectedOutput != null + ? { + '$pkgName|$path/sample_test.dart': decodedMatches(expectedOutput), + } + : null, ); } diff --git a/test/feature_test.dart b/test/feature_test.dart index 18cf9b3..feaea67 100644 --- a/test/feature_test.dart +++ b/test/feature_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import 'util/testing_data.dart'; diff --git a/test/feature_with_hooks_test.dart b/test/feature_with_hooks_test.dart index bb8491e..1406958 100644 --- a/test/feature_with_hooks_test.dart +++ b/test/feature_with_hooks_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import 'util/testing_data.dart'; diff --git a/test/full_set_test.dart b/test/full_set_test.dart index a5d12ec..d60884d 100644 --- a/test/full_set_test.dart +++ b/test/full_set_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('fully custom test ', () { diff --git a/test/hook_file_test.dart b/test/hook_file_test.dart index b5d19da..9b4eabf 100644 --- a/test/hook_file_test.dart +++ b/test/hook_file_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Hook file generation ', () { diff --git a/test/hook_folder_name_test.dart b/test/hook_folder_name_test.dart index d3de7a1..9290208 100644 --- a/test/hook_folder_name_test.dart +++ b/test/hook_folder_name_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('relative hookFolderName', () { diff --git a/test/integration_test.dart b/test/integration_test.dart index 3941daf..401c708 100644 --- a/test/integration_test.dart +++ b/test/integration_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import 'util/testing_data.dart'; diff --git a/test/lines_before_feature_test.dart b/test/lines_before_feature_test.dart index ec15920..57acca1 100644 --- a/test/lines_before_feature_test.dart +++ b/test/lines_before_feature_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import 'util/testing_data.dart'; diff --git a/test/scenario_outline_step_test.dart b/test/scenario_outline_step_test.dart index d361e21..4425480 100644 --- a/test/scenario_outline_step_test.dart +++ b/test/scenario_outline_step_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Scenario Outline Step', () { diff --git a/test/scenario_outline_test.dart b/test/scenario_outline_test.dart index ca1874e..49fa0e4 100644 --- a/test/scenario_outline_test.dart +++ b/test/scenario_outline_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Scenario Outline', () { diff --git a/test/setup_test.dart b/test/setup_test.dart index fd3defd..01f46d9 100644 --- a/test/setup_test.dart +++ b/test/setup_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('After steps appear after groups ', () { diff --git a/test/step/generic_step_test.dart b/test/step/generic_step_test.dart index 1706a16..9f874a3 100644 --- a/test/step/generic_step_test.dart +++ b/test/step/generic_step_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Generic step generated', () { diff --git a/test/step/i_dismiss_the_page_test.dart b/test/step/i_dismiss_the_page_test.dart index 83be910..7882695 100644 --- a/test/step/i_dismiss_the_page_test.dart +++ b/test/step/i_dismiss_the_page_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Dismiss the page pre-built step generated', () { diff --git a/test/step/i_dont_see_icon_test.dart b/test/step/i_dont_see_icon_test.dart index 87ec31d..d2cbdb8 100644 --- a/test/step/i_dont_see_icon_test.dart +++ b/test/step/i_dont_see_icon_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test("I Don't See Icon pre-built step generated", () { diff --git a/test/step/i_dont_see_rich_text_test.dart b/test/step/i_dont_see_rich_text_test.dart index 289d88f..00c557d 100644 --- a/test/step/i_dont_see_rich_text_test.dart +++ b/test/step/i_dont_see_rich_text_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test("I Don't See Rich Text pre-built step generated", () { diff --git a/test/step/i_dont_see_text_test.dart b/test/step/i_dont_see_text_test.dart index 2025a65..810db81 100644 --- a/test/step/i_dont_see_text_test.dart +++ b/test/step/i_dont_see_text_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test("I Don't See Text pre-built step generated", () { diff --git a/test/step/i_dont_see_widget_test.dart b/test/step/i_dont_see_widget_test.dart index 93dc3d0..2128c60 100644 --- a/test/step/i_dont_see_widget_test.dart +++ b/test/step/i_dont_see_widget_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test("I Don't See Widget pre-built step generated", () { diff --git a/test/step/i_enter_into_input_field_test.dart b/test/step/i_enter_into_input_field_test.dart index 6870d99..d19e0e9 100644 --- a/test/step/i_enter_into_input_field_test.dart +++ b/test/step/i_enter_into_input_field_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I Enter Into Input Field pre-built step generated', () { diff --git a/test/step/i_see_disabled_elevated_button_test.dart b/test/step/i_see_disabled_elevated_button_test.dart index dc9f7bf..f3a98b5 100644 --- a/test/step/i_see_disabled_elevated_button_test.dart +++ b/test/step/i_see_disabled_elevated_button_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Disabled Elevated Button pre-built step generated', () { diff --git a/test/step/i_see_enabled_elevated_button_test.dart b/test/step/i_see_enabled_elevated_button_test.dart index 6963c4e..68e5e78 100644 --- a/test/step/i_see_enabled_elevated_button_test.dart +++ b/test/step/i_see_enabled_elevated_button_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Enabled Elevated Button pre-built step generated', () { diff --git a/test/step/i_see_exactly_widgets_test.dart b/test/step/i_see_exactly_widgets_test.dart index 9cd4732..2ec9d0d 100644 --- a/test/step/i_see_exactly_widgets_test.dart +++ b/test/step/i_see_exactly_widgets_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Then I see exactly widgets pre-built step generated', () { diff --git a/test/step/i_see_icon_test.dart b/test/step/i_see_icon_test.dart index e7f1345..c40024f 100644 --- a/test/step/i_see_icon_test.dart +++ b/test/step/i_see_icon_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Icon pre-built step generated', () { diff --git a/test/step/i_see_multiple_texts_test.dart b/test/step/i_see_multiple_texts_test.dart index 9f80adb..2014e14 100644 --- a/test/step/i_see_multiple_texts_test.dart +++ b/test/step/i_see_multiple_texts_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Multple Texts pre-built step generated', () { diff --git a/test/step/i_see_multiple_widgets_test.dart b/test/step/i_see_multiple_widgets_test.dart index 00742b5..46efcb7 100644 --- a/test/step/i_see_multiple_widgets_test.dart +++ b/test/step/i_see_multiple_widgets_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Multple Widgets pre-built step generated', () { diff --git a/test/step/i_see_rich_text_test.dart b/test/step/i_see_rich_text_test.dart index 3127f3a..27b561f 100644 --- a/test/step/i_see_rich_text_test.dart +++ b/test/step/i_see_rich_text_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Rich Text pre-built step generated', () { diff --git a/test/step/i_see_text_test.dart b/test/step/i_see_text_test.dart index 02ec73c..52d75bf 100644 --- a/test/step/i_see_text_test.dart +++ b/test/step/i_see_text_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Text pre-built step generated', () { diff --git a/test/step/i_see_widget_test.dart b/test/step/i_see_widget_test.dart index 7034922..d77ba93 100644 --- a/test/step/i_see_widget_test.dart +++ b/test/step/i_see_widget_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I See Widget pre-built step generated', () { diff --git a/test/step/i_tap_icon_test.dart b/test/step/i_tap_icon_test.dart index 7254fa5..33b9419 100644 --- a/test/step/i_tap_icon_test.dart +++ b/test/step/i_tap_icon_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I Tap Icon pre-built step generated', () { diff --git a/test/step/i_tap_text_test.dart b/test/step/i_tap_text_test.dart index fbb13aa..e27d456 100644 --- a/test/step/i_tap_text_test.dart +++ b/test/step/i_tap_text_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I Tap Text pre-built step generated', () { diff --git a/test/step/i_wait_test.dart b/test/step/i_wait_test.dart index 4c8f0cc..552d2c0 100644 --- a/test/step/i_wait_test.dart +++ b/test/step/i_wait_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('I Wait pre-built step generated', () { diff --git a/test/step/the_app_is_running_test.dart b/test/step/the_app_is_running_test.dart index 6adebec..94bd03a 100644 --- a/test/step/the_app_is_running_test.dart +++ b/test/step/the_app_is_running_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/step_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import '../util/testing_data.dart'; diff --git a/test/step_folder_name_test.dart b/test/step_folder_name_test.dart index caa07c8..f17d576 100644 --- a/test/step_folder_name_test.dart +++ b/test/step_folder_name_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('relative stepFolderName', () { diff --git a/test/steps_test.dart b/test/steps_test.dart index 4d58f20..af9958a 100644 --- a/test/steps_test.dart +++ b/test/steps_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Empty feature file parses', () { diff --git a/test/tag_test_method_name_test.dart b/test/tag_test_method_name_test.dart index 6feaf18..af701a9 100644 --- a/test/tag_test_method_name_test.dart +++ b/test/tag_test_method_name_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('feature testMethodName test ', () { diff --git a/test/tags_test.dart b/test/tags_test.dart index 54a0806..26a206e 100644 --- a/test/tags_test.dart +++ b/test/tags_test.dart @@ -1,5 +1,5 @@ import 'package:bdd_widget_test/src/feature_file.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('Feature Tags ', () { diff --git a/test/test_method_name_test.dart b/test/test_method_name_test.dart index c2fa954..185102a 100644 --- a/test/test_method_name_test.dart +++ b/test/test_method_name_test.dart @@ -1,6 +1,6 @@ import 'package:bdd_widget_test/src/feature_file.dart'; import 'package:bdd_widget_test/src/generator_options.dart'; -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; void main() { test('testMethodName test ', () {