-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create reproducer test for long test names
- Loading branch information
1 parent
652cd51
commit c184703
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
packages/patrol/example/integration_test/long_name_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'common.dart'; | ||
|
||
String _generateString(int length) { | ||
// not random | ||
return 'a' * length; | ||
} | ||
|
||
void main() { | ||
patrol( | ||
// way too long for ATO because of https://github.com/android/android-test/issues/1935 | ||
_generateString(200), | ||
($) async { | ||
await createApp($); | ||
|
||
await $(FloatingActionButton).tap(); | ||
expect($(#counterText).text, '1'); | ||
|
||
await $(#textField).enterText('Hello, Flutter!'); | ||
expect($('Hello, Flutter!'), findsOneWidget); | ||
|
||
await $.native.pressHome(); | ||
await $.native.openApp(); | ||
|
||
expect($(#counterText).text, '1'); | ||
await $(FloatingActionButton).tap(); | ||
|
||
expect($(#counterText).text, '2'); | ||
expect($('Hello, Flutter!'), findsOneWidget); | ||
}, | ||
); | ||
} |