Skip to content

Commit

Permalink
Create files to test integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianVarela committed May 28, 2022
1 parent 0ad92d2 commit 6cb86e0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test_driver/driver/category_list.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'package:crud_todo_app/main.dart' as app;
import 'package:flutter_driver/driver_extension.dart';

void main() {
enableFlutterDriverExtension();
app.main();
}
22 changes: 22 additions & 0 deletions test_driver/driver/category_list_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'package:crud_todo_app/ui/category_list_view.dart';
import 'package:flutter_driver/flutter_driver.dart' as test_driver;
import 'package:flutter_test/flutter_test.dart';

void main() {
group('$CategoryListView test', () {
late test_driver.FlutterDriver driver;

setUpAll(() async {
driver = await test_driver.FlutterDriver.connect();
});

tearDownAll(() async {
await driver.close();
});

test('Verify empty list message', () async {
final emptyMessage = test_driver.find.text('Empty data, add a category');
await driver.waitFor(emptyMessage);
});
});
}

0 comments on commit 6cb86e0

Please sign in to comment.