mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
575 B
20 lines
575 B
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:rolodex/main.dart';
|
|
import 'package:rolodex/screens/contacts.dart';
|
|
|
|
void main() {
|
|
testWidgets('Opens on all contacts page', (WidgetTester tester) async {
|
|
await tester.pumpWidget(const RolodexApp());
|
|
|
|
expect(find.byType(ContactListsPage), findsOneWidget);
|
|
expect(find.text('Add List'), findsNothing);
|
|
|
|
await tester.tap(find.text('Lists'));
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.text('Add List'), findsOneWidget);
|
|
expect(find.byType(ContactListsPage), findsNothing);
|
|
});
|
|
}
|