Skip to content

Commit

Permalink
cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
Amean committed Nov 10, 2022
1 parent d4721c0 commit 9b8e434
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:get_it/get_it.dart';
import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:pylons_wallet/components/maintenance_mode_widgets.dart';
import 'package:pylons_wallet/pages/home/home.dart';
import 'package:pylons_wallet/services/third_party_services/remote_config_service/remote_config_service.dart';
import '../extension/size_extension.dart';
import '../../mocks/maintenance_mode_widgets_test.mocks.dart';

// class MockRemoteConfigService extends Mock implements RemoteConfigService {
// @override
// bool getMaintenanceMode() {
// return true;
// }
// }

@GenerateMocks([RemoteConfigService])
void main() {
TestWidgetsFlutterBinding.ensureInitialized();

// late RemoteConfigService remoteConfigService;
// remoteConfigService = MockRemoteConfigService();
// GetIt.I.registerLazySingleton<RemoteConfigService>(() => remoteConfigService);


testWidgets('test case for maintenance mode banner widget', (tester) async {
// when(remoteConfigService.getMaintenanceMode()).thenAnswer((realInvocation) => true);
await tester.setScreenSize();
// await tester.testAppForWidgetTesting(const HomeScreen());
await tester.testAppForWidgetTesting(const Material(
child: MaintenanceModeBannerWidget()));
await tester.pumpAndSettle();
Expand All @@ -39,9 +19,7 @@ void main() {
});

testWidgets('test case for maintenance mode message widget', (tester) async {
// when(remoteConfigService.getMaintenanceMode()).thenAnswer((realInvocation) => true);
await tester.setScreenSize();
// await tester.testAppForWidgetTesting(const HomeScreen());
await tester.testAppForWidgetTesting(const Material(
child: MaintenanceModeMessageWidget()));
await tester.pumpAndSettle();
Expand Down

0 comments on commit 9b8e434

Please sign in to comment.