Fakultas Ilmu Komputer UI

Commit 17f73c69 authored by Bayukanta Iqbal Gunawan's avatar Bayukanta Iqbal Gunawan
Browse files

[RED] add test for image picker

parent 8c3b87e5
Pipeline #42170 failed with stages
in 2 minutes and 35 seconds
......@@ -4,6 +4,12 @@ import 'package:ppl_disabilitas/utils/validator.dart';
import 'package:ppl_disabilitas/page/addInformasi/addInfromasi.dart';
void main(){
testWidgets('Test Input Gambar', (WidgetTester tester) async {
final testInputImage = Key("Input Gambar");
await tester.pumpWidget(MaterialApp(home: AddInformasi()));
expect(find.byKey(testInputImage), findsOneWidget);
});
testWidgets('Info Text Field Test', (WidgetTester tester) async {
final textFieldKey = Key("Text Field Informasi");
await tester.pumpWidget(MaterialApp(home: AddInformasi()));
......@@ -16,7 +22,7 @@ void main(){
expect(find.byKey(checkBoxKey), findsOneWidget);
});
testWidgets('Info Text Field Test', (WidgetTester tester) async {
testWidgets('Star Rating Exist Test', (WidgetTester tester) async {
final starKey = Key("Star Rating");
await tester.pumpWidget(MaterialApp(home: AddInformasi()));
expect(find.byKey(starKey), findsOneWidget);
......@@ -40,4 +46,9 @@ void main(){
expect(result, null);
});
test('Star rating start from zero', (){
var info = AddInformasiState();
expect(info.rating, 0.0);
});
}
\ No newline at end of file
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