-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new widget tests for home screen and renamed and grouped for re…
…adibility
- Loading branch information
1 parent
78c0335
commit 09fe919
Showing
2 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
import 'package:allisto_app/pages/home_page.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { | ||
group("Home screen is displayed correctly", () { | ||
testWidgets('Home screen has text Allisto', (tester) async { | ||
await tester.pumpWidget(new MaterialApp(home: HomePage(),)); | ||
expect(find.text('Allisto'), findsOneWidget); | ||
}); | ||
testWidgets('Home screen has mic button', (tester) async { | ||
await tester.pumpWidget(new MaterialApp(home: HomePage(),)); | ||
expect(find.widgetWithIcon(FloatingActionButton, Icons.mic_none), | ||
findsOneWidget); | ||
}); | ||
testWidgets('Home screen has dashboard button', (tester) async { | ||
await tester.pumpWidget(new MaterialApp(home: HomePage(),)); | ||
expect(find.widgetWithIcon(IconButton, Icons.dashboard), findsOneWidget); | ||
}); | ||
testWidgets('Home screen has contact button', (tester) async { | ||
await tester.pumpWidget(new MaterialApp(home: HomePage(),)); | ||
expect(find.widgetWithIcon(IconButton, Icons.perm_contact_calendar), | ||
findsOneWidget); | ||
}); | ||
}); | ||
} |