@@ -14,6 +14,11 @@ Feature: Counter
1414 Given the app is running
1515 And I run {'func foo() {}; func bar() { print("hey!"); };'} code
1616 Then I see {'0'} text
17+ Feature: Counter 2
18+ Background:
19+ Given the app is running
20+ Scenario: Initial counter value is 0
21+ Given the app is running
1722''' ;
1823
1924 const expectedFeatureDart = '''
@@ -29,13 +34,13 @@ import './step/i_run_code.dart';
2934import 'package:bdd_sample/i_see_text.dart';
3035
3136void main() {
32- Future<void> bddSetUp(WidgetTester tester) async {
33- await theAppIsRunning(tester);
34- }
35- Future<void> bddTearDown(WidgetTester tester) async {
36- await _iDoNotSeeText(tester, '42');
37- }
3837 group(\'\'\' Counter\'\'\' , () {
38+ Future<void> bddSetUp(WidgetTester tester) async {
39+ await theAppIsRunning(tester);
40+ }
41+ Future<void> bddTearDown(WidgetTester tester) async {
42+ await _iDoNotSeeText(tester, '42');
43+ }
3944 customTestWidgets(\'\'\' Initial counter value is 0\'\'\' , (tester) async {
4045 try {
4146 await bddSetUp(tester);
@@ -47,6 +52,15 @@ void main() {
4752 }
4853 });
4954 });
55+ group(\'\'\' Counter 2\'\'\' , () {
56+ Future<void> bddSetUp(WidgetTester tester) async {
57+ await theAppIsRunning(tester);
58+ }
59+ customTestWidgets(\'\'\' Initial counter value is 0\'\'\' , (tester) async {
60+ await bddSetUp(tester);
61+ await theAppIsRunning(tester);
62+ });
63+ });
5064}
5165''' ;
5266
0 commit comments