--- description: "Patrol E2E testing conventions for {{PROJECT_NAME}}" alwaysApply: false --- # Patrol E2E Testing — {{PROJECT_NAME}} ## Test structure ```dart void main() { patrolTest('User can complete checkout flow', ($) async { await $.pumpWidgetAndSettle(const App()); // Login await $(LoginScreen).waitUntilVisible(); await $(#emailField).enterText('test@example.com'); await $(#passwordField).enterText('password123'); await $('Sign In').tap(); // Add to cart await $(ProductCard).at(0).tap(); await $('Add to Cart').tap(); // Checkout await $('Cart').tap(); await $('Checkout').tap(); await $(CheckoutSuccessScreen).waitUntilVisible(); }); } ``` ## Rules - E2E tests in `integration_test/` — separate from unit tests - Use `patrolTest` not `testWidgets` for E2E scenarios - Tag tests with `@Tags(['slow'])` so CI can skip on PRs - Run against real emulators/simulators, not mocked environments - Test on minimum supported OS version for each platform