You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -315,6 +315,33 @@ targets:
315
315
include: package:<your_package>/bdd_options.yaml
316
316
```
317
317
318
+
### How to add custom headers to generated files?
319
+
320
+
You can add custom header lines (imports, comments, etc.) to all generated step files **and feature files** using the `customHeaders` option in the `build.yaml` file:
- Use custom test frameworks (like Patrol) instead of the default flutter_test
336
+
- Import custom helper classes or utilities in all your generated files
337
+
- Add specific packages that your tests will commonly use
338
+
- Include custom test utilities, mocks, or constants
339
+
- Add custom comments or documentation to generated files
340
+
341
+
The custom headers will be added to:
342
+
- **Feature files**: After any data table imports, replacing the default flutter/material and flutter_test imports
343
+
- **Step files**: After any data table imports, replacing the default flutter_test import
344
+
318
345
### How to group steps in a single project?
319
346
320
347
You may create sub-folders (like `common`, `login`, `home`, etc.) in the `step` folder and move generated steps there. The plugin is smart enough to find them (see the `example` folder).
Since Patrol version 3.0.0, `IntegrationTestWidgetsFlutterBinding.ensureInitialized` must not be called. Set `includeIntegrationTestBinding` to `false`.
0 commit comments