@@ -485,4 +485,55 @@ Future<void> theFollowingSongs(WidgetTester tester, String param1, bdd.DataTable
485485 expectedStep,
486486 );
487487 });
488+
489+ test ('Scenario Outline with data table variables' , () {
490+ const featureFile = '''
491+ Feature: Testing feature
492+ Scenario Outline: Add and remove buttons work together
493+ Given the app is running
494+ When I tap add icon <times> times
495+ Then I see result
496+ | 'counter' | 'color' |
497+ | <counter> | <color> |
498+ Examples:
499+ | times | counter | color |
500+ | 20 | '20' | 'blue' |
501+ | 25 | '25' | 'green' |
502+ ''' ;
503+
504+ const expectedFeatureDart = '''
505+ // GENERATED CODE - DO NOT MODIFY BY HAND
506+ // ignore_for_file: type=lint, type=warning
507+
508+ import 'package:bdd_widget_test/data_table.dart' as bdd;
509+ import 'package:flutter/material.dart';
510+ import 'package:flutter_test/flutter_test.dart';
511+
512+ import './step/the_app_is_running.dart';
513+ import './step/i_tap_add_icon_times.dart';
514+ import './step/i_see_result.dart';
515+
516+ void main() {
517+ group(\'\'\' Testing feature\'\'\' , () {
518+ testWidgets(\'\'\' Outline: Add and remove buttons work together (20, '20', 'blue')\'\'\' , (tester) async {
519+ await theAppIsRunning(tester);
520+ await iTapAddIconTimes(tester, 20);
521+ await iSeeResult(tester, const bdd.DataTable([['counter', 'color'], ['20', 'blue']]));
522+ });
523+ testWidgets(\'\'\' Outline: Add and remove buttons work together (25, '25', 'green')\'\'\' , (tester) async {
524+ await theAppIsRunning(tester);
525+ await iTapAddIconTimes(tester, 25);
526+ await iSeeResult(tester, const bdd.DataTable([['counter', 'color'], ['25', 'green']]));
527+ });
528+ });
529+ }
530+ ''' ;
531+
532+ final feature = FeatureFile (
533+ featureDir: 'test.feature' ,
534+ package: 'test' ,
535+ input: featureFile,
536+ );
537+ expect (feature.dartContent, expectedFeatureDart);
538+ });
488539}
0 commit comments