Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
trey-rosius committed Apr 14, 2021
1 parent 1221696 commit ce41d10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/config.dart
@@ -1,5 +1,5 @@
class Config{
//REPLACE WITH YOUR OWN KEY
static final String API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXX";
static final String API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXX";

}
20 changes: 5 additions & 15 deletions test/fetch_orders_test.dart
@@ -1,15 +1,15 @@

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:food_dashboard/config.dart';

import 'package:http/http.dart' as http;
import 'package:http/testing.dart';

import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';

import '../lib/api.dart';
import '../lib/home_screen.dart';
import '../lib/main.dart';


import '../lib/model/order.dart';


Expand All @@ -22,10 +22,6 @@ class MockitoClient extends Mock implements http.Client{
}
void main(){

Widget createHomeScreen() => MaterialApp(
home: HomeScreen(),

);
group('fetch orders',(){
test('returns a list of orders if http call completes successfully', () async{

Expand Down Expand Up @@ -68,14 +64,8 @@ group('fetch orders',(){
expect(fetchOrders(mockitoClient), throwsException);
});

group('Home Page Widget Tests', () {
testWidgets('Testing Scrolling', (tester) async {
await tester.pumpWidget(createHomeScreen());
await tester.fling(find.byType(ListView), Offset(0, -200), 3000);
await tester.pumpAndSettle();

});
});

});


Expand Down

0 comments on commit ce41d10

Please sign in to comment.