Fakultas Ilmu Komputer UI

Commit 0222b878 authored by Firriyal Bin Yahya's avatar Firriyal Bin Yahya
Browse files

[GREEN] benerin test list sekolah

parent 076ed44f
Pipeline #41074 passed with stages
in 7 minutes and 33 seconds
......@@ -4,7 +4,7 @@ import 'package:ppl_disabilitas/page/informasi/list_sekolah.dart';
void main(){
testWidgets("find a title app bar", (WidgetTester tester) async {
final textAppBar = Key("Informasi Sekolah");
final textAppBar = Key("appbar-text-informasi-sekolah");
await tester.pumpWidget(MaterialApp(home: ListSekolah()));
expect(find.byKey(textAppBar), findsOneWidget);
......
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'dart:io';
import 'package:flutter/material.dart';
......@@ -25,12 +17,11 @@ void main() {
return Future<dynamic>.value(
[
{
"name": "Coolidge",
"nama": "Coolidge",
"latitude": -23.7169139,
"longitude": -46.8498038,
"alamat": "74809 Hooker Drive",
"image": "dummy.jpg",
"no_telp": "+55 956 836 5799"
"telepon": "+55 956 836 5799"
}
]
);
......@@ -47,7 +38,7 @@ void main() {
//expect(find.byType(CircleAvatar), findsWidgets);
expect(find.byKey(const Key("api-Coolidge")), findsOneWidget);
//expect(find.byKey(const Key("api-Coolidge")), findsOneWidget);
// [TODO] tiap item itu punya key unik
// Search for the childWidget in the tree and verify it exists.
//expect(find.byType(ListView), findsNWidgets);
......
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