1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-02 01:32:58 +00:00

[testing_app] added basic placeholder for favorites list (#581)

This commit is contained in:
Tushar Ojha
2020-11-14 03:46:32 +05:30
committed by GitHub
parent dcbbc31119
commit 84d0251e2a
3 changed files with 18 additions and 7 deletions

View File

@@ -28,6 +28,14 @@ void addItems() {
void main() {
group('Favorites Page Widget Tests', () {
testWidgets('Test if Placeholder shows in case of empty list',
(tester) async {
await tester.pumpWidget(createFavoritesScreen());
// Verify if the placeholder text shows up.
expect(find.text('No favorites added.'), findsOneWidget);
});
testWidgets('Test if ListView shows up', (tester) async {
await tester.pumpWidget(createFavoritesScreen());