Skip to content

Commit

Permalink
demo 1
Browse files Browse the repository at this point in the history
  • Loading branch information
danh-ld committed Sep 22, 2023
1 parent de71acb commit 47d2782
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test_driver/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ void main() {

// Connect to the Flutter driver before running any tests.
setUpAll(() async {
print('danhdanh-setUpAll');
driver =
await FlutterDriver.connect(timeout: const Duration(seconds: 30));
print('danhdanh-setUpAll-connected');
});

// Close the connection to the driver after the tests have completed.
Expand All @@ -32,6 +30,11 @@ void main() {
find.text("MTP is the best"),
timeout: const Duration(seconds: 3),
);
String text = await driver?.getText(addField) ?? '';

if (text.isNotEmpty) {
throw Exception("TextField do not clear");
}
await driver?.tap(addField);
await driver?.enterText(
// "sky foreversky foreversky foreversky foreversky foreversky forever",
Expand All @@ -46,6 +49,11 @@ void main() {
),
timeout: const Duration(seconds: 3),
);
text = await driver?.getText(addField) ?? '';

if (text.isNotEmpty) {
throw Exception("TextField do not clear");
}
});
});
}

0 comments on commit 47d2782

Please sign in to comment.