Fakultas Ilmu Komputer UI

Commit 4f05e44a authored by agnes.handoko's avatar agnes.handoko
Browse files

[GREEN] fixed failed pipeline because of linter issue

parent 205152ee
Pipeline #30916 passed with stages
in 2 minutes and 40 seconds
// Frequently used strings are stored here
// No hardcoding string view files. Store here.
final String DEV_BASE_URL = "poipole.herokuapp.com";
final String BASE_URL = "poipole.herokuapp.com";
String KEY = "";
String CSRF = "";
String SESSION_ID = "";
final String devBaseURL = "poipole.herokuapp.com";
final String baseURL = "poipole.herokuapp.com";
String key = "";
String csrf = "";
String sessionID = "";
setKey(String key) {
KEY = key;
key = key;
}
setSessionId(String sessionId) {
SESSION_ID = sessionId;
sessionID = sessionId;
}
\ No newline at end of file
......@@ -7,9 +7,9 @@ class ApiFlavor {
static String getBaseUrl() {
if (ApiFlavor.flavor == BuildFlavor.development.toString()) {
return DEV_BASE_URL;
return devBaseURL;
} else {
return BASE_URL;
return baseURL;
}
}
......
import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/page/dashboard/dashboard.dart';
import 'flavor/flavor.dart';
......
import 'dart:async';
//import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
......@@ -8,51 +8,19 @@ import 'package:ppl_disabilitas/page/dashboard/dashboard.dart';
void main() {
testWidgets('finds a google map in dashboard', (WidgetTester tester) async {
Completer<GoogleMapController> _controller = Completer();
final googleMap = GoogleMap(
mapType: MapType.normal,
initialCameraPosition:
CameraPosition(target: LatLng(40.712776, -74.005974), zoom: 12),
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
);
// Provide the childWidget to the Container.
await tester.pumpWidget(MaterialApp(home: Dashboard()));
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(GoogleMap), findsOneWidget);
});
testWidgets('finds a navigation bar', (WidgetTester tester) async {
final navBar = AppBar(
elevation: 15,
centerTitle: true,
backgroundColor: Color.fromRGBO(58, 144, 58, 1),
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
"bisaGo",
style: TextStyle(
fontSize: 25,
fontFamily: 'Comfortaa',
fontWeight: FontWeight.w800),
),
],
),
);
// Provide the childWidget to the Container.
await tester.pumpWidget(MaterialApp(home: Dashboard()));
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(Scaffold), findsOneWidget);
expect(find.byType(Theme), findsOneWidget);
expect(find.byType(AppBar), findsOneWidget);
await tester.pumpWidget(MaterialApp(home: Dashboard()));
// Search for the childWidget in the tree and verify it exists.
expect(find.byType(GoogleMap), findsOneWidget);
});
testWidgets('Shows dashboard on App Start', (WidgetTester tester) async {
......
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