Skip to content

Commit

Permalink
create reproducer test for long test names
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Sep 20, 2023
1 parent 652cd51 commit c184703
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions packages/patrol/example/integration_test/long_name_test.dart
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);
},
);
}

0 comments on commit c184703

Please sign in to comment.