-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create files to test integration testing
- Loading branch information
1 parent
0ad92d2
commit 6cb86e0
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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,7 @@ | ||
import 'package:crud_todo_app/main.dart' as app; | ||
import 'package:flutter_driver/driver_extension.dart'; | ||
|
||
void main() { | ||
enableFlutterDriverExtension(); | ||
app.main(); | ||
} |
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,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); | ||
}); | ||
}); | ||
} |