Skip to content

Commit a200369

Browse files
authored
Merge pull request #54 from lsaudon/add-comments-raw-line
feat: Add raw line above step function
2 parents 096469b + 633265d commit a200369

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

lib/src/step/generic_step.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class GenericStep implements BddStep {
2020
String get content => '''
2121
import 'package:flutter_test/flutter_test.dart';
2222
23+
/// Usage: $rawLine
2324
Future<void> $methodName($testerType $customTesterName${_getMethodParameters(rawLine)}) async {
2425
throw UnimplementedError();
2526
}

test/scenario_outline_step_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Feature: Testing feature
1818
const expectedStep = '''
1919
import 'package:flutter_test/flutter_test.dart';
2020
21+
/// Usage: there are <start> cucumbers
2122
Future<void> thereAreCucumbers(WidgetTester tester, dynamic start) async {
2223
throw UnimplementedError();
2324
}

test/step/generic_step_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Feature: Testing feature
1414
const expectedSteps = '''
1515
import 'package:flutter_test/flutter_test.dart';
1616
17+
/// Usage: I invoke test
1718
Future<void> iInvokeTest(WidgetTester tester) async {
1819
throw UnimplementedError();
1920
}
@@ -42,6 +43,7 @@ Feature: Testing feature
4243
const expectedSteps = '''
4344
import 'package:flutter_test/flutter_test.dart';
4445
46+
/// Usage: I invoke {0} test with {Some} parameter and {true} parameter and {'value'} parameter
4547
Future<void> iInvokeTestWithParameterAndParameterAndParameter(WidgetTester tester, num param1, dynamic param2, bool param3, String param4) async {
4648
throw UnimplementedError();
4749
}
@@ -67,9 +69,10 @@ Feature: Testing feature
6769
When ! I@ #invoke$% ^'`~ &*+=) test ? &&/| \ ;:
6870
''';
6971

70-
const expectedSteps = '''
72+
const expectedSteps = r'''
7173
import 'package:flutter_test/flutter_test.dart';
7274
75+
/// Usage: ! I@ #invoke$% ^'`~ &*+=) test ? &&/| \ ;:
7376
Future<void> iInvokeTest(WidgetTester tester) async {
7477
throw UnimplementedError();
7578
}

0 commit comments

Comments
 (0)