Skip to content

Commit

Permalink
Move to getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi authored Oct 2, 2023
1 parent 7243a27 commit a0a7274
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ up. To run `integration_test/example_test.dart` on a local Android or iOS device
```
</Info>
<Error>
To prevent issues during Patrol tests, please follow these guidelines:
1. Avoid using `WidgetsFlutterBinding.ensureInitialized` as Patrol already initializes its own binding. Using another one may lead to complications.
2. Refrain from overriding `FlutterError.onError` as it hinders Patrol's ability to listen to timeouts and ultimately causes it to never finish.
</Error>

### Going from here

To learn how to write Patrol tests, see [finders] and [native automation] sections.
Expand Down
3 changes: 0 additions & 3 deletions docs/patrol/finders/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ can specify globally in [PatrolTesterConfig] or as argument to the `tap()`
method) and taps on the first widget as soon as it becomes visible. This lets
you get rid of fixed timeouts and test your app just like a real user would.

<Error>Note that `WidgetsFlutterBinding.ensureInitialized` and `FlutterError.onError`
MUST NOT be used in integration tests otherwise Patrol cannot fail after timeout.</Error>

If you wanted to tap on the third "Subscribe" text, you'd do:

```dart
Expand Down

0 comments on commit a0a7274

Please sign in to comment.