Skip to content

Commit

Permalink
Added Hive statement back
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush0Chaudhary committed Jan 27, 2023
1 parent aa8bdd2 commit da41cdd
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:hive/hive.dart';
import 'package:mockito/mockito.dart';
import 'package:provider/provider.dart';
import 'package:talawa/constants/constants.dart';
import 'package:talawa/constants/custom_theme.dart';
import 'package:talawa/models/language/language_model.dart';
import 'package:talawa/models/organization/org_info.dart';
import 'package:talawa/models/user/user_info.dart';
import 'package:talawa/router.dart' as router;
import 'package:talawa/services/graphql_config.dart';
import 'package:talawa/services/navigation_service.dart';
Expand Down Expand Up @@ -85,14 +90,14 @@ Future<void> main() async {
locator<GraphqlConfig>().test();
locator<SizeConfig>().test();

// final Directory dir = Directory('temporaryPath');
// Hive
// ..init(dir.path)
// ..registerAdapter(UserAdapter())
// ..registerAdapter(OrgInfoAdapter());
// await Hive.openBox<User>('currentUser');
// await Hive.openBox<OrgInfo>('currentOrg');
// await Hive.openBox('url');
final Directory dir = Directory('temporaryPath');
Hive
..init(dir.path)
..registerAdapter(UserAdapter())
..registerAdapter(OrgInfoAdapter());
await Hive.openBox<User>('currentUser');
await Hive.openBox<OrgInfo>('currentOrg');
await Hive.openBox('url');
group('Setting Page Screen Widget Test in dark mode', () {
testWidgets("Testing if Settings Screen shows up", (tester) async {
await tester.pumpWidget(createChangePassScreenDark());
Expand Down

0 comments on commit da41cdd

Please sign in to comment.