Fakultas Ilmu Komputer UI

Commit a05fa545 authored by fazasabira's avatar fazasabira
Browse files

[RED] making test for filter page

parent 370ec39c
Pipeline #37627 failed with stages
in 1 minute and 6 seconds
......@@ -15,7 +15,7 @@ import 'package:ppl_disabilitas/page/filter%20&%20fasilitas/insideFilter.dart';
void main() {
testWidgets('find filter page', (WidgetTester tester) async {
testWidgets('find inside filter page', (WidgetTester tester) async {
// Provide the childWidget to the Container.
await tester.pumpWidget(Filter());
await tester.pumpWidget(InsideFilter());
......@@ -23,15 +23,16 @@ void main() {
await tester.tap(button);
//await Future.delayed(Duration(seconds: 2));
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(Scaffold), findsOneWidget);
expect(find.byType(Container), findsOneWidget);
expect(find.byType(Icon), findsOneWidget);
expect(find.byType(Scaffold), findsNothing);
expect(find.byType(Container), findsNWidgets(9));
expect(find.byType(Icon), findsNothing);
expect(find.byType(Row), findsNWidgets(10));
expect(find.byType(Column), findsNothing);
expect(find.byType(Text), findsNWidgets(25));
expect(find.byType(Flex), findsNWidgets(2));
expect(find.text('jns fasilitas'), findsNothing);
expect(find.text('urutn'), findsNothing);
// expect(find.byType(Column), findsNWidgets(2));
// expect(find.byType(Row), findsOneWidget);
// expect(find.byType(Text), findsNWidgets(20));
// expect(find.byType(Flex), findsNWidgets(4));
expect(find.text('hps smw'), findsNothing);
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment