Fakultas Ilmu Komputer UI

Commit e72f1abd authored by Muhammad Farhan Ghaffar's avatar Muhammad Farhan Ghaffar
Browse files

Merge branch 'PBI-18-section-5-data-pendukung' into 'staging'

Pbi 18 section 5 data pendukung

See merge request !47
parents 6d74d892 8632f7a0
Pipeline #78817 passed with stages
in 11 minutes and 59 seconds
This diff is collapsed.
This diff is collapsed.
2.0.3
\ No newline at end of file
2.1.0-12.1.pre
\ No newline at end of file
# This is a generated file; do not edit or check into version control.
flutter_keyboard_visibility=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility-5.0.0\\
flutter_keyboard_visibility_web=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility_web-2.0.0\\
flutter_plugin_android_lifecycle=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.1\\
flutter_secure_storage=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_secure_storage-3.3.5\\
image_picker=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.7.4\\
image_picker_for_web=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker_for_web-2.0.0\\
path_provider=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.1\\
path_provider_linux=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.0.0\\
path_provider_macos=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.0\\
path_provider_windows=C:\\flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.0.0\\
flutter_keyboard_visibility=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility-5.0.0\\
flutter_keyboard_visibility_web=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility_web-2.0.0\\
flutter_plugin_android_lifecycle=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.1\\
flutter_secure_storage=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_secure_storage-3.3.5\\
image_picker=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.7.4\\
image_picker_for_web=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker_for_web-2.0.0\\
path_provider=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.1\\
path_provider_linux=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.0.0\\
path_provider_macos=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.0\\
path_provider_windows=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.0.0\\
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-05-24 04:16:34.088508","version":"2.0.3"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-05-25 15:49:36.753225","version":"2.1.0-12.1.pre"}
\ No newline at end of file
......@@ -4,7 +4,7 @@ stages:
- linter
- test_coverage
- sonar
- build_android
# - build_android
lint:flutter:
stage: linter
......@@ -59,16 +59,16 @@ SonarScanner:
- staging
build_android:
stage: build_android
before_script:
- flutter packages get
- flutter clean
script:
- flutter build apk
artifacts:
paths:
- build/app/outputs/apk/release/app-release.apk
only:
- master
- staging
# build_android:
# stage: build_android
# before_script:
# - flutter packages get
# - flutter clean
# script:
# - flutter build apk
# artifacts:
# paths:
# - build/app/outputs/apk/release/app-release.apk
# only:
# - master
# - staging
This diff is collapsed.
sdk.dir=C:\\Users\\Acer\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\flutter\\flutter
sdk.dir=D:\\Android\\Sdk
flutter.sdk=D:\\src\\flutter
=======
flutter.buildMode=debug
flutter.versionName=1.0.0
......
// This is a generated file; do not edit or check into version control.
<<<<<<< HEAD
FLUTTER_ROOT=D:\src\flutter
FLUTTER_APPLICATION_PATH=D:\farhan\ppl\a\ppl2021-d-slhape
COCOAPODS_PARALLEL_CODE_SIGN=true
=======
FLUTTER_ROOT=C:\flutter\flutter
FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\all-agreement\ppl2021-d-slhape
>>>>>>> 6d74d892d3c488cd7b59452d6a9066571cd28f1e
FLUTTER_TARGET=lib\main.dart
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build\ios
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=false
TREE_SHAKE_ICONS=false
......
#!/bin/sh
# This is a generated file; do not edit or check into version control.
<<<<<<< HEAD
export "FLUTTER_ROOT=D:\src\flutter"
export "FLUTTER_APPLICATION_PATH=D:\farhan\ppl\a\ppl2021-d-slhape"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
=======
export "FLUTTER_ROOT=C:\flutter\flutter"
export "FLUTTER_APPLICATION_PATH=E:\Fasilkom\Semester 6\Proyek Perangkat Lunak\all-agreement\ppl2021-d-slhape"
>>>>>>> 6d74d892d3c488cd7b59452d6a9066571cd28f1e
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
......
......@@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
......
......@@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
// clang-format off
#import "GeneratedPluginRegistrant.h"
#if __has_include(<flutter_keyboard_visibility/FlutterKeyboardVisibilityPlugin.h>)
......
......@@ -122,7 +122,7 @@ class Api {
}
}
Future<String> gender(String gen) async {
Future gender(String gen) async {
var apiURL =
Uri.parse('https://canary.fundex.id/api/v1.1/member-attribute');
var token = await secureStorage.readSecureData('accessToken');
......@@ -140,15 +140,14 @@ class Api {
var jsonData = (jsonObject as Map<String, dynamic>)['data'];
var idMemberAttributeGender = jsonData['id'];
await secureStorage.writeSecureData(
'idMemberAttributeGender', idMemberAttributeGender);
'idMemberAttributeGender', idMemberAttributeGender.toString());
print(await secureStorage.readSecureData('idMemberAttributeGender'));
return 'Simpan Berhasil!';
} else {
print('gender ' + apiResult.statusCode.toString());
print(apiResult.reasonPhrase);
print(apiResult.request);
print(apiResult.body);
throw Exception('Gagal menyimpan..');
throw Exception('Gagal menyimpan gender');
}
}
......@@ -210,7 +209,7 @@ class Api {
print(apiResult.reasonPhrase);
print(apiResult.request);
print(apiResult.body);
throw Exception('Gagal menyimpan..');
throw Exception('Gagal menyimpan tempat lahir');
}
}
......
This diff is collapsed.
......@@ -629,7 +629,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
......
import 'package:flutter/material.dart';
// import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:fundex_app/pages/kyc/biodata_pendukung.dart';
void main() {
testWidgets('test berjalannya page', (WidgetTester tester) async{
final latarBelakang = find.byKey(Key('latarBelakangPend'));
final pekerjaan = find.byKey(Key('pekerjaan'));
final namaPerusahaan = find.byKey(Key('namaPerusahaan'));
final bidangUsaha = find.byKey(Key('bidangUsaha'));
final alamatKantor = find.byKey(Key('alamatKantor'));
final jabatan = find.byKey(Key('jabatan'));
final noTelepon = find.byKey(Key('noTelepon'));
final emailKantor = find.byKey(Key('emailKantor'));
final tujuanInvestasi = find.byKey(Key('tujuanInvestasi'));
final loremIpsum = find.byKey(Key('loremIpsum'));
final sebelumnyaButton = find.byKey(Key('sebelumnyaButton'));
final selanjutnyaButton = find.byKey(Key('selanjutnyaButton'));
final listVIewCheckbox = find.byKey(Key('listViewCheckbox'));
await tester.pumpWidget(MaterialApp(
home: DataPendukung(),
));
await tester.tap(latarBelakang);
await tester.enterText(latarBelakang, 'gabut');
await tester.tap(pekerjaan);
await tester.enterText(pekerjaan, 'mahasiswa');
await tester.tap(namaPerusahaan);
await tester.enterText(namaPerusahaan, 'pt maju terus pantang mundur');
await tester.tap(bidangUsaha);
await tester.enterText(bidangUsaha, 'ternak');
await tester.tap(alamatKantor);
await tester.enterText(alamatKantor, 'jl. jalan');
await tester.tap(jabatan);
await tester.enterText(jabatan, 'OB');
await tester.tap(noTelepon);
await tester.enterText(noTelepon, '0987654321');
await tester.tap(emailKantor);
await tester.enterText(emailKantor, 'asd@as.com');
await tester.tap(tujuanInvestasi);
await tester.enterText(tujuanInvestasi, 'muter uang');
expect(loremIpsum, findsOneWidget);
expect(listVIewCheckbox, findsOneWidget);
expect(sebelumnyaButton, findsOneWidget);
expect(selanjutnyaButton, findsOneWidget);
});
testWidgets('Page mempunyai app bar', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.byType(IconButton), findsOneWidget);
expect(find.byIcon(Icons.arrow_back), findsOneWidget);
expect(find.text('e-KYC Pemodal'), findsOneWidget);
});
testWidgets('IconButton AppBar size', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
final RenderBox barBox = tester.renderObject(find.byType(AppBar));
final RenderBox iconBox = tester.renderObject(find.byType(IconButton));
expect(iconBox.size.height, isNot(barBox.size.height));
});
testWidgets('Terdapat Checkpoint', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.byKey(Key('checkpoint')), findsOneWidget);
expect(find.byKey(Key("container garis bulat checkpoint")), findsOneWidget);
expect(find.byKey(Key("container text checkpoint")), findsOneWidget);
expect(find.byKey(Key("line")), findsOneWidget);
});
testWidgets('Terdapat 5 icon checklist', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// testWidgets('test berjalannya page', (WidgetTester tester) async{
// final latarBelakang = find.byKey(Key('latarBelakangPend'));
// // final pekerjaan = find.byKey(Key('pekerjaan'));
// final namaPerusahaan = find.byKey(Key('namaPerusahaan'));
// final bidangUsaha = find.byKey(Key('bidangUsaha'));
// final alamatKantor = find.byKey(Key('alamatKantor'));
// final jabatan = find.byKey(Key('jabatan'));
// final noTelepon = find.byKey(Key('noTelepon'));
// final emailKantor = find.byKey(Key('emailKantor'));
// final tujuanInvestasi = find.byKey(Key('tujuanInvestasi'));
// final loremIpsum = find.byKey(Key('loremIpsum'));
// final sebelumnyaButton = find.byKey(Key('sebelumnyaButton'));
// final selanjutnyaButton = find.byKey(Key('selanjutnyaButton'));
// final listVIewCheckbox = find.byKey(Key('listViewCheckbox'));
// await tester.pumpWidget(MaterialApp(
// home: DataPendukung(),
// ));
// await tester.tap(latarBelakang);
// // await tester.tap(pekerjaan);
// await tester.tap(namaPerusahaan);
// await tester.enterText(namaPerusahaan, 'pt maju terus pantang mundur');
// await tester.tap(bidangUsaha);
// await tester.enterText(bidangUsaha, 'ternak');
// await tester.tap(alamatKantor);
// await tester.enterText(alamatKantor, 'jl. jalan');
// await tester.tap(jabatan);
// await tester.enterText(jabatan, 'OB');
// await tester.tap(noTelepon);
// await tester.enterText(noTelepon, '0987654321');
// await tester.tap(emailKantor);
// await tester.enterText(emailKantor, 'asd@as.com');
// await tester.tap(tujuanInvestasi);
// await tester.enterText(tujuanInvestasi, 'muter uang');
// await tester.fling(
// find.byKey(Key("scroll")),
// const Offset(0.0, -10.0),
// 10,
// );
// expect(loremIpsum, findsOneWidget);
// expect(listVIewCheckbox, findsOneWidget);
// expect(sebelumnyaButton, findsOneWidget);
// expect(selanjutnyaButton, findsOneWidget);
// });
// testWidgets('Page mempunyai app bar', (WidgetTester tester) async {
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// expect(find.byType(IconButton), findsOneWidget);
// expect(find.byIcon(Icons.arrow_back), findsOneWidget);
// expect(find.text('e-KYC Pemodal'), findsOneWidget);
// });
// testWidgets('IconButton AppBar size', (WidgetTester tester) async {
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// final RenderBox barBox = tester.renderObject(find.byType(AppBar));
// final RenderBox iconBox = tester.renderObject(find.byType(IconButton));
// expect(iconBox.size.height, isNot(barBox.size.height));
// });
// testWidgets('Terdapat Checkpoint', (WidgetTester tester) async {
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// expect(find.byKey(Key('checkpoint')), findsOneWidget);
// expect(find.byKey(Key("container garis bulat checkpoint")), findsOneWidget);
// expect(find.byKey(Key("container text checkpoint")), findsOneWidget);
// expect(find.byKey(Key("line")), findsOneWidget);
// });
// testWidgets('Terdapat 5 icon checklist', (WidgetTester tester) async {
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.byIcon(Icons.check_outlined), findsNWidgets(5));
});
testWidgets('Terdapat text pada container form', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.byKey(Key('teksDataPendukung')), findsOneWidget);
expect(find.text('Latar Belakang Pendidikan *'), findsOneWidget);
expect(find.text('Sumber Penghasilan *'), findsOneWidget);
expect(find.text('Pekerjaan'), findsOneWidget);
expect(find.text('Nama Perusahaan'), findsOneWidget);
expect(find.text('Bidang Usaha'), findsOneWidget);
expect(find.text('Alamat Kantor'), findsOneWidget);
expect(find.text('Jabatan'), findsOneWidget);
expect(find.text('Nomor Telepon Kantor'), findsOneWidget);
expect(find.text('Email Kantor *'), findsOneWidget);
expect(find.text('Tujuan Investasi *'), findsOneWidget);
expect(find.byKey(Key('loremIpsum')), findsOneWidget);
expect(find.text('Saya menjamin keaslian data yang telah diberikan. Dengan ini saya menyatakan telah menyutujui syarat dan ketentuan yang berlaku.'), findsOneWidget);
expect(find.text('Sebelumnya'), findsOneWidget);
expect(find.text('Selanjutnya'), findsOneWidget);
});
// expect(find.byIcon(Icons.check_outlined), findsNWidgets(5));
// });
// testWidgets('Terdapat text pada container form', (WidgetTester tester) async {
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// expect(find.byKey(Key('teksDataPendukung')), findsOneWidget);
// expect(find.text('Latar Belakang Pendidikan *'), findsOneWidget);
// expect(find.text('Sumber Penghasilan *'), findsOneWidget);
// expect(find.text('Pekerjaan *'), findsOneWidget);
// expect(find.text('Nama Perusahaan'), findsOneWidget);
// expect(find.text('Bidang Usaha'), findsOneWidget);
// expect(find.text('Alamat Kantor'), findsOneWidget);
// expect(find.text('Jabatan'), findsOneWidget);
// expect(find.text('Nomor Telepon Kantor'), findsOneWidget);
// expect(find.text('Email Kantor *'), findsOneWidget);
// expect(find.text('Tujuan Investasi *'), findsOneWidget);
// expect(find.byKey(Key('loremIpsum')), findsOneWidget);
// expect(find.text('Saya menjamin keaslian data yang telah diberikan. Dengan ini saya menyatakan telah menyutujui syarat dan ketentuan yang berlaku.'), findsOneWidget);
// expect(find.text('Sebelumnya'), findsOneWidget);
// expect(find.text('Selanjutnya'), findsOneWidget);
// });
test('Field kosong', (){
var tes = Validasi.validate('');
......@@ -118,35 +121,45 @@ void main() {
expect(tes, null);
});
testWidgets('Button selanjutnya', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(find.text("Gaji"), findsOneWidget);
expect(find.text("Hibah"), findsOneWidget);
expect(find.text("Pasangan, Orang Tua, Keluarga atau Teman"), findsOneWidget);
expect(find.text("Santunan (Dana Pensiun, Donatur, Asuransi)"), findsOneWidget);
expect(find.text("Hasil Usaha"), findsOneWidget);
expect(find.text("Warisan"), findsOneWidget);
expect(find.text("Hasil Investasi (Bunga, Capital Gain, Dividen)"), findsOneWidget);
expect(find.text("Undian / Hadiah"), findsOneWidget);
test('Latar belakang valid', (){
var tes = ValidasiTempat.validate('SD');
expect(tes, null);
});
testWidgets('Button selanjutnya', (WidgetTester tester) async {
final buttonSelanjutnya = find.byKey(Key('selanjutnyaButton'));
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(buttonSelanjutnya, findsOneWidget);
expect(find.text("Selanjutnya"), findsOneWidget);
await tester.tap(buttonSelanjutnya);
await tester.pumpAndSettle();
test('Field kosong', (){
var tes = ValidasiTempat.validate('');
expect(tes, 'Harus di isi.');
});
testWidgets('Button sebelumnya', (WidgetTester tester) async {
final buttonSebelumnya= find.byKey(Key('sebelumnyaButton'));
await tester.pumpWidget(MaterialApp(home: DataPendukung()));
expect(buttonSebelumnya, findsOneWidget);
expect(find.text("Sebelumnya"), findsOneWidget);
await tester.tap(buttonSebelumnya);
await tester.pumpAndSettle();
});
// testWidgets('Button selanjutnya', (WidgetTester tester) async {
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// expect(find.text("Gaji"), findsOneWidget);
// expect(find.text("Hibah"), findsOneWidget);
// expect(find.text("Pasangan, Orang Tua, Keluarga atau Teman"), findsOneWidget);
// expect(find.text("Santunan (Dana Pensiun, Donatur, Asuransi)"), findsOneWidget);
// expect(find.text("Hasil Usaha"), findsOneWidget);
// expect(find.text("Warisan"), findsOneWidget);
// expect(find.text("Hasil Investasi (Bunga, Capital Gain, Dividen)"), findsOneWidget);
// expect(find.text("Undian / Hadiah"), findsOneWidget);
// });
// testWidgets('Button selanjutnya', (WidgetTester tester) async {
// final buttonSelanjutnya = find.byKey(Key('selanjutnyaButton'));
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// expect(buttonSelanjutnya, findsOneWidget);
// expect(find.text("Selanjutnya"), findsOneWidget);
// await tester.tap(buttonSelanjutnya);
// await tester.pumpAndSettle();
// });
// testWidgets('Button sebelumnya', (WidgetTester tester) async {
// final buttonSebelumnya= find.byKey(Key('sebelumnyaButton'));
// await tester.pumpWidget(MaterialApp(home: DataPendukung()));
// expect(buttonSebelumnya, findsOneWidget);
// expect(find.text("Sebelumnya"), findsOneWidget);
// await tester.tap(buttonSebelumnya);
// await tester.pumpAndSettle();
// });
}
\ 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