Skip to content

Commit

Permalink
fix usages of deprecated members in docs (#1933)
Browse files Browse the repository at this point in the history
* removed occurences of `nativeAutomation: true`

* replaced `PatrolTester` with `PatrolIntegrationTester` in `patrolTest()`
  • Loading branch information
bartekpacia authored Nov 21, 2023
1 parent f0cbe87 commit 517185c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ testWidgets('signs up', (WidgetTester tester) async {
to this:

```dart
patrolTest('signs up', (PatrolTester $) async {
patrolTest('signs up', (PatrolIntegrationTester $) async {
await $.pumpWidgetAndSettle(AwesomeApp());
await $(#emailTextField).enterText('[email protected]');
Expand Down Expand Up @@ -96,7 +96,7 @@ Patrol's native automation feature solves these problems:

```dart
void main() {
patrolTest('showtime', nativeAutomation: true, (PatrolTester $) async {
patrolTest('showtime', (PatrolIntegrationTester $) async {
await $.pumpWidgetAndSettle(AwesomeApp());
// prepare network conditions
await $.native.enableCellular();
Expand Down
4 changes: 1 addition & 3 deletions docs/effective-patrol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Widget build(BuildContext context) {

```dart title="In app test code"
void main() {
patrolTest('logs in', (PatrolTester $) {
patrolTest('logs in', (PatrolIntegrationTester $) {
// some code
await $(K.usernameTextField).enterText('CoolGuy');
// more code
Expand Down Expand Up @@ -160,7 +160,6 @@ import 'package:patrol/patrol.dart';
void main() {
patrolTest(
'signs up for the newsletter and receives a reward',
nativeAutomation: true,
($) async {
await $.pumpWidgetAndSettle(AwesomeApp());
Expand All @@ -178,7 +177,6 @@ void main() {
void main() {
patrolTest(
'test',
nativeAutomation: true,
($) async {
await $.pumpWidgetAndSettle(AwesomeApp());
Expand Down
1 change: 0 additions & 1 deletion docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ import 'package:patrol/patrol.dart';
void main() {
patrolTest(
'counter state is the same after going to home and switching apps',
nativeAutomation: true,
($) async {
// Replace later with your app's main widget
await $.pumpWidgetAndSettle(
Expand Down
3 changes: 1 addition & 2 deletions docs/native/advanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ Take a look at this simple Flutter integration tests using Patrol:
void main() {
patrolTest(
'counter state is the same after going to Home and switching apps',
nativeAutomation: true,
nativeAutomatorConfig: NativeAutomatorConfig(
packageName: 'pl.leancode.patrol.example',
bundleId: 'pl.leancode.patrol.Example',
Expand Down Expand Up @@ -157,4 +156,4 @@ This is so awesome!

[native automation setup]: /getting-started
[fastlane scan]: https://docs.fastlane.tools/actions/scan
[integration_test]: https://github.com/flutter/flutter/tree/master/packages/integration_test
[integration_test]: https://github.com/flutter/flutter/tree/master/packages/integration_test
2 changes: 1 addition & 1 deletion docs/native/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tiny snippet to spice things up:

```dart title="integration_test/demo_test.dart"
void main() {
patrolTest('demo', nativeAutomation: true, (PatrolTester $) async {
patrolTest('demo', (PatrolIntegrationTester $) async {
await $.pumpWidgetAndSettle(AwesomeApp());
// prepare network conditions
await $.native.enableCellular();
Expand Down
1 change: 0 additions & 1 deletion packages/patrol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import 'package:patrol/patrol.dart';
void main() {
patrolTest(
'counter state is the same after going to home and going back',
nativeAutomation: true,
($) async {
await $.pumpWidgetAndSettle(const MyApp());
Expand Down

0 comments on commit 517185c

Please sign in to comment.