TF-3290 Only show reconnection confirm dialog when composer is opened
This commit is contained in:
@@ -60,6 +60,7 @@ import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
|||||||
import 'package:tmail_ui_user/main/utils/app_config.dart';
|
import 'package:tmail_ui_user/main/utils/app_config.dart';
|
||||||
import 'package:tmail_ui_user/main/universal_import/html_stub.dart' as html;
|
import 'package:tmail_ui_user/main/universal_import/html_stub.dart' as html;
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
abstract class BaseController extends GetxController
|
abstract class BaseController extends GetxController
|
||||||
@@ -81,6 +82,7 @@ abstract class BaseController extends GetxController
|
|||||||
final Uuid uuid = Get.find<Uuid>();
|
final Uuid uuid = Get.find<Uuid>();
|
||||||
final ApplicationManager applicationManager = Get.find<ApplicationManager>();
|
final ApplicationManager applicationManager = Get.find<ApplicationManager>();
|
||||||
final ToastManager toastManager = Get.find<ToastManager>();
|
final ToastManager toastManager = Get.find<ToastManager>();
|
||||||
|
final TwakeAppManager twakeAppManager = Get.find<TwakeAppManager>();
|
||||||
|
|
||||||
bool _isFcmEnabled = false;
|
bool _isFcmEnabled = false;
|
||||||
|
|
||||||
@@ -218,43 +220,49 @@ abstract class BaseController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleBadCredentialsException() {
|
void _handleBadCredentialsException() {
|
||||||
if (PlatformInfo.isWeb) {
|
log('$runtimeType::_handleBadCredentialsException:');
|
||||||
if (currentContext == null) {
|
if (!twakeAppManager.isComposerOpened) {
|
||||||
_executeBeforeReconnectAndLogOut();
|
_performReconnection();
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
showConfirmDialogAction(
|
|
||||||
currentContext!,
|
|
||||||
AppLocalizations.of(currentContext!).dialogMessageSessionHasExpired,
|
|
||||||
AppLocalizations.of(currentContext!).reconnect,
|
|
||||||
title: AppLocalizations.of(currentContext!).sessionExpired,
|
|
||||||
alignCenter: true,
|
|
||||||
outsideDismissible: false,
|
|
||||||
titleActionButtonMaxLines: 1,
|
|
||||||
icon: SvgPicture.asset(imagePaths.icTMailLogo, width: 64, height: 64),
|
|
||||||
onConfirmAction: _executeBeforeReconnectAndLogOut,
|
|
||||||
onCancelAction: onCancelReconnectWhenSessionExpired
|
|
||||||
);
|
|
||||||
} else if (PlatformInfo.isMobile) {
|
|
||||||
if (currentContext == null) {
|
|
||||||
clearDataAndGoToLoginPage();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
showConfirmDialogAction(
|
|
||||||
currentContext!,
|
|
||||||
AppLocalizations.of(currentContext!).dialogMessageSessionHasExpired,
|
|
||||||
AppLocalizations.of(currentContext!).reconnect,
|
|
||||||
title: AppLocalizations.of(currentContext!).sessionExpired,
|
|
||||||
alignCenter: true,
|
|
||||||
outsideDismissible: false,
|
|
||||||
titleActionButtonMaxLines: 1,
|
|
||||||
icon: SvgPicture.asset(imagePaths.icTMailLogo, width: 64, height: 64),
|
|
||||||
onConfirmAction: clearDataAndGoToLoginPage,
|
|
||||||
onCancelAction: onCancelReconnectWhenSessionExpired
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentContext == null) {
|
||||||
|
_performSaveAndReconnection();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final appLocalizations = AppLocalizations.of(currentContext!);
|
||||||
|
showConfirmDialogAction(
|
||||||
|
currentContext!,
|
||||||
|
appLocalizations.messageWarningDialogWhenExpiredOIDCTokenAndReconnection,
|
||||||
|
appLocalizations.saveAndRefresh,
|
||||||
|
title: appLocalizations.sessionExpired,
|
||||||
|
cancelTitle: appLocalizations.no,
|
||||||
|
alignCenter: true,
|
||||||
|
outsideDismissible: false,
|
||||||
|
titleActionButtonMaxLines: 1,
|
||||||
|
marginIcon: EdgeInsetsDirectional.zero,
|
||||||
|
icon: SvgPicture.asset(imagePaths.icTMailLogo, width: 64, height: 64),
|
||||||
|
onConfirmAction: _performSaveAndReconnection,
|
||||||
|
onCancelAction: _performReconnection,
|
||||||
|
onCloseButtonAction: _performCloseReconnectionConfirmDialog
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _performSaveAndReconnection() {
|
||||||
|
if (PlatformInfo.isWeb) {
|
||||||
|
_executeBeforeReconnectAndLogOut();
|
||||||
|
} else if (PlatformInfo.isMobile) {
|
||||||
|
clearDataAndGoToLoginPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _performReconnection() {
|
||||||
|
clearDataAndGoToLoginPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _performCloseReconnectionConfirmDialog() {
|
||||||
|
popBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onDataFailureViewState(Failure failure) {
|
void onDataFailureViewState(Failure failure) {
|
||||||
|
|||||||
+4
@@ -432,6 +432,7 @@ class MailboxDashBoardController extends ReloadableController
|
|||||||
} else if (success is GetAllIdentitiesSuccess) {
|
} else if (success is GetAllIdentitiesSuccess) {
|
||||||
_handleGetAllIdentitiesSuccess(success);
|
_handleGetAllIdentitiesSuccess(success);
|
||||||
} else if (success is GetComposerCacheSuccess) {
|
} else if (success is GetComposerCacheSuccess) {
|
||||||
|
_removeComposerCacheOnWeb();
|
||||||
goToComposer(ComposerArguments.fromSessionStorageBrowser(success.composerCache));
|
goToComposer(ComposerArguments.fromSessionStorageBrowser(success.composerCache));
|
||||||
} else if (success is GetIdentityCacheOnWebSuccess) {
|
} else if (success is GetIdentityCacheOnWebSuccess) {
|
||||||
goToSettings();
|
goToSettings();
|
||||||
@@ -1677,12 +1678,14 @@ class MailboxDashBoardController extends ReloadableController
|
|||||||
composerArguments = arguments;
|
composerArguments = arguments;
|
||||||
ComposerBindings().dependencies();
|
ComposerBindings().dependencies();
|
||||||
composerOverlayState.value = ComposerOverlayState.active;
|
composerOverlayState.value = ComposerOverlayState.active;
|
||||||
|
twakeAppManager.openComposerOnWeb();
|
||||||
}
|
}
|
||||||
|
|
||||||
void closeComposerOverlay({dynamic result}) async {
|
void closeComposerOverlay({dynamic result}) async {
|
||||||
composerArguments = null;
|
composerArguments = null;
|
||||||
ComposerBindings().dispose();
|
ComposerBindings().dispose();
|
||||||
composerOverlayState.value = ComposerOverlayState.inActive;
|
composerOverlayState.value = ComposerOverlayState.inActive;
|
||||||
|
twakeAppManager.closeComposerOnWeb();
|
||||||
if (result is SendingEmailArguments) {
|
if (result is SendingEmailArguments) {
|
||||||
handleSendEmailAction(result);
|
handleSendEmailAction(result);
|
||||||
} else if (result is SendEmailSuccess ||
|
} else if (result is SendEmailSuccess ||
|
||||||
@@ -3240,6 +3243,7 @@ class MailboxDashBoardController extends ReloadableController
|
|||||||
WebSocketController.instance.onClose();
|
WebSocketController.instance.onClose();
|
||||||
_currentEmailState = null;
|
_currentEmailState = null;
|
||||||
_isFirstSessionLoad = false;
|
_isFirstSessionLoad = false;
|
||||||
|
twakeAppManager.closeComposerOnWeb();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"@@last_modified": "2024-12-09T13:59:58.460897",
|
"@@last_modified": "2024-12-12T15:50:46.911821",
|
||||||
"initializing_data": "Initializing data...",
|
"initializing_data": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -3968,12 +3968,6 @@
|
|||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"dialogMessageSessionHasExpired": "The current session has expired. Please reconnect to the server",
|
|
||||||
"@dialogMessageSessionHasExpired": {
|
|
||||||
"type": "text",
|
|
||||||
"placeholders_order": [],
|
|
||||||
"placeholders": {}
|
|
||||||
},
|
|
||||||
"sMimeGoodSignatureMessage": "The authenticity of this message had been verified with SMime signature.",
|
"sMimeGoodSignatureMessage": "The authenticity of this message had been verified with SMime signature.",
|
||||||
"@sMimeGoodSignatureMessage": {
|
"@sMimeGoodSignatureMessage": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -4174,6 +4168,8 @@
|
|||||||
},
|
},
|
||||||
"editAsNewEmail": "Edit as new email",
|
"editAsNewEmail": "Edit as new email",
|
||||||
"@editAsNewEmail": {
|
"@editAsNewEmail": {
|
||||||
|
"messageWarningDialogWhenExpiredOIDCTokenAndReconnection": "Your session expired. We need to take you back to the login page in order to refresh it. You might want to save the email you are currently editing before we do so.",
|
||||||
|
"@messageWarningDialogWhenExpiredOIDCTokenAndReconnection": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import 'package:tmail_ui_user/main/pages/app_pages.dart';
|
|||||||
import 'package:tmail_ui_user/main/routes/app_routes.dart';
|
import 'package:tmail_ui_user/main/routes/app_routes.dart';
|
||||||
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/app_utils.dart';
|
import 'package:tmail_ui_user/main/utils/app_utils.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:url_strategy/url_strategy.dart';
|
import 'package:url_strategy/url_strategy.dart';
|
||||||
import 'package:worker_manager/worker_manager.dart';
|
import 'package:worker_manager/worker_manager.dart';
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ class TMailApp extends StatefulWidget {
|
|||||||
class _TMailAppState extends State<TMailApp> {
|
class _TMailAppState extends State<TMailApp> {
|
||||||
|
|
||||||
DeepLinksManager? _deepLinksManager;
|
DeepLinksManager? _deepLinksManager;
|
||||||
|
final TwakeAppManager _twakeAppManager = Get.find<TwakeAppManager>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -105,6 +107,7 @@ class _TMailAppState extends State<TMailApp> {
|
|||||||
if (PlatformInfo.isMobile) {
|
if (PlatformInfo.isMobile) {
|
||||||
_deepLinksManager?.dispose();
|
_deepLinksManager?.dispose();
|
||||||
}
|
}
|
||||||
|
_twakeAppManager.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@ import 'package:tmail_ui_user/main/utils/app_config.dart';
|
|||||||
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/ios_notification_manager.dart';
|
import 'package:tmail_ui_user/main/utils/ios_notification_manager.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
class CoreBindings extends Bindings {
|
class CoreBindings extends Bindings {
|
||||||
@@ -76,6 +77,7 @@ class CoreBindings extends Bindings {
|
|||||||
Get.put(IOSNotificationManager());
|
Get.put(IOSNotificationManager());
|
||||||
}
|
}
|
||||||
Get.put(PreviewEmlFileUtils());
|
Get.put(PreviewEmlFileUtils());
|
||||||
|
Get.put(TwakeAppManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
void _bindingIsolate() {
|
void _bindingIsolate() {
|
||||||
|
|||||||
@@ -4149,13 +4149,6 @@ class AppLocalizations {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get dialogMessageSessionHasExpired {
|
|
||||||
return Intl.message(
|
|
||||||
'The current session has expired. Please reconnect to the server',
|
|
||||||
name: 'dialogMessageSessionHasExpired',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String get sMimeGoodSignatureMessage {
|
String get sMimeGoodSignatureMessage {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'The authenticity of this message had been verified with SMime signature.',
|
'The authenticity of this message had been verified with SMime signature.',
|
||||||
@@ -4343,6 +4336,14 @@ class AppLocalizations {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get messageWarningDialogWhenExpiredOIDCTokenAndReconnection {
|
||||||
|
return Intl.message(
|
||||||
|
'Your session expired. We need to take you back to the login page in order to refresh it. You might want to save the email you are currently editing before we do so.',
|
||||||
|
name: 'messageWarningDialogWhenExpiredOIDCTokenAndReconnection',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String get replyToList {
|
String get replyToList {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Reply to list',
|
'Reply to list',
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/composer_overlay_state.dart';
|
||||||
|
|
||||||
|
class TwakeAppManager {
|
||||||
|
ComposerOverlayState? _composerOverlayState;
|
||||||
|
|
||||||
|
void openComposerOnWeb() =>
|
||||||
|
_composerOverlayState = ComposerOverlayState.active;
|
||||||
|
|
||||||
|
void closeComposerOnWeb() {
|
||||||
|
_composerOverlayState = ComposerOverlayState.inActive;
|
||||||
|
_composerOverlayState = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool get isComposerOpened =>
|
||||||
|
_composerOverlayState == ComposerOverlayState.active;
|
||||||
|
|
||||||
|
void dispose() {
|
||||||
|
_composerOverlayState = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
|||||||
import 'package:tmail_ui_user/main/exceptions/remote_exception.dart';
|
import 'package:tmail_ui_user/main/exceptions/remote_exception.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/app_config.dart';
|
import 'package:tmail_ui_user/main/utils/app_config.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../fixtures/account_fixtures.dart';
|
import '../../fixtures/account_fixtures.dart';
|
||||||
@@ -70,6 +71,7 @@ class SomeOtherException extends RemoteException {}
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
])
|
])
|
||||||
void main() {
|
void main() {
|
||||||
TestWidgetsFlutterBinding.ensureInitialized();
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
@@ -88,6 +90,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
setUpAll(() {
|
setUpAll(() {
|
||||||
mockCachingManager = MockCachingManager();
|
mockCachingManager = MockCachingManager();
|
||||||
@@ -103,6 +106,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<CachingManager>(mockCachingManager);
|
Get.put<CachingManager>(mockCachingManager);
|
||||||
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
||||||
@@ -121,6 +125,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
Get.testMode = true;
|
Get.testMode = true;
|
||||||
|
|
||||||
mockBaseController = MockBaseController();
|
mockBaseController = MockBaseController();
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
|||||||
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/app_config.dart';
|
import 'package:tmail_ui_user/main/utils/app_config.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../fixtures/account_fixtures.dart';
|
import '../../../fixtures/account_fixtures.dart';
|
||||||
@@ -143,6 +144,7 @@ class MockMailboxDashBoardController extends Mock implements MailboxDashBoardCon
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
|
|
||||||
// Composer controller mock specs
|
// Composer controller mock specs
|
||||||
MockSpec<LocalFilePickerInteractor>(),
|
MockSpec<LocalFilePickerInteractor>(),
|
||||||
@@ -184,6 +186,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
// Declaration composer controller
|
// Declaration composer controller
|
||||||
late ComposerController? composerController;
|
late ComposerController? composerController;
|
||||||
@@ -226,6 +229,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<CachingManager>(mockCachingManager);
|
Get.put<CachingManager>(mockCachingManager);
|
||||||
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
||||||
@@ -244,6 +248,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
// Mock Getx controllers
|
// Mock Getx controllers
|
||||||
Get.put<MailboxDashBoardController>(mockMailboxDashBoardController);
|
Get.put<MailboxDashBoardController>(mockMailboxDashBoardController);
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oi
|
|||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../../fixtures/account_fixtures.dart';
|
import '../../../../fixtures/account_fixtures.dart';
|
||||||
@@ -109,6 +110,7 @@ const fallbackGenerators = {
|
|||||||
MockSpec<CalendarEventDataSource>(),
|
MockSpec<CalendarEventDataSource>(),
|
||||||
MockSpec<DioClient>(),
|
MockSpec<DioClient>(),
|
||||||
MockSpec<GetHtmlContentFromAttachmentInteractor>(),
|
MockSpec<GetHtmlContentFromAttachmentInteractor>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
])
|
])
|
||||||
void main() {
|
void main() {
|
||||||
TestWidgetsFlutterBinding.ensureInitialized();
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
@@ -146,6 +148,7 @@ void main() {
|
|||||||
final applicationManager = MockApplicationManager();
|
final applicationManager = MockApplicationManager();
|
||||||
final mockToastManager = MockToastManager();
|
final mockToastManager = MockToastManager();
|
||||||
final getHtmlContentFromAttachmentInteractor = MockGetHtmlContentFromAttachmentInteractor();
|
final getHtmlContentFromAttachmentInteractor = MockGetHtmlContentFromAttachmentInteractor();
|
||||||
|
final mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
late SingleEmailController singleEmailController;
|
late SingleEmailController singleEmailController;
|
||||||
|
|
||||||
@@ -181,6 +184,7 @@ void main() {
|
|||||||
Get.put<PrintUtils>(printUtils);
|
Get.put<PrintUtils>(printUtils);
|
||||||
Get.put<ApplicationManager>(applicationManager);
|
Get.put<ApplicationManager>(applicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
when(mailboxDashboardController.accountId).thenReturn(Rxn(testAccountId));
|
when(mailboxDashboardController.accountId).thenReturn(Rxn(testAccountId));
|
||||||
when(uuid.v4()).thenReturn(testTaskId);
|
when(uuid.v4()).thenReturn(testTaskId);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oi
|
|||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import 'home_controller_test.mocks.dart';
|
import 'home_controller_test.mocks.dart';
|
||||||
@@ -55,6 +56,7 @@ import 'home_controller_test.mocks.dart';
|
|||||||
MockSpec<LanguageCacheManager>(),
|
MockSpec<LanguageCacheManager>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
])
|
])
|
||||||
void main() {
|
void main() {
|
||||||
TestWidgetsFlutterBinding.ensureInitialized();
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
@@ -83,6 +85,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
setUpAll(() {
|
setUpAll(() {
|
||||||
cleanupEmailCacheInteractor = MockCleanupEmailCacheInteractor();
|
cleanupEmailCacheInteractor = MockCleanupEmailCacheInteractor();
|
||||||
@@ -110,6 +113,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<GetSessionInteractor>(mockGetSessionInteractor);
|
Get.put<GetSessionInteractor>(mockGetSessionInteractor);
|
||||||
Get.put<GetAuthenticatedAccountInteractor>(mockGetAuthenticatedAccountInteractor);
|
Get.put<GetAuthenticatedAccountInteractor>(mockGetAuthenticatedAccountInteractor);
|
||||||
@@ -132,6 +136,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
Get.testMode = true;
|
Get.testMode = true;
|
||||||
|
|
||||||
homeController = HomeController(
|
homeController = HomeController(
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
|||||||
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
||||||
import 'package:tmail_ui_user/main/universal_import/html_stub.dart';
|
import 'package:tmail_ui_user/main/universal_import/html_stub.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
import 'package:worker_manager/worker_manager.dart';
|
import 'package:worker_manager/worker_manager.dart';
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ import 'identity_creator_controller_test.mocks.dart';
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
// Identity creator controller mockspecs
|
// Identity creator controller mockspecs
|
||||||
MockSpec<VerifyNameInteractor>(),
|
MockSpec<VerifyNameInteractor>(),
|
||||||
MockSpec<GetAllIdentitiesInteractor>(),
|
MockSpec<GetAllIdentitiesInteractor>(),
|
||||||
@@ -113,6 +115,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
setUpAll(() {
|
setUpAll(() {
|
||||||
//mock base controller
|
//mock base controller
|
||||||
@@ -129,6 +132,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<CachingManager>(mockCachingManager);
|
Get.put<CachingManager>(mockCachingManager);
|
||||||
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
||||||
@@ -147,6 +151,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
//mock identity creator controller
|
//mock identity creator controller
|
||||||
mockVerifyNameInteractor = MockVerifyNameInteractor();
|
mockVerifyNameInteractor = MockVerifyNameInteractor();
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oi
|
|||||||
import 'package:tmail_ui_user/features/starting_page/domain/usecase/sign_in_twake_workplace_interactor.dart';
|
import 'package:tmail_ui_user/features/starting_page/domain/usecase/sign_in_twake_workplace_interactor.dart';
|
||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import 'login_controller_test.mocks.dart';
|
import 'login_controller_test.mocks.dart';
|
||||||
@@ -71,6 +72,7 @@ import 'login_controller_test.mocks.dart';
|
|||||||
MockSpec<LanguageCacheManager>(),
|
MockSpec<LanguageCacheManager>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
])
|
])
|
||||||
void main() {
|
void main() {
|
||||||
late MockAuthenticationInteractor mockAuthenticationInteractor;
|
late MockAuthenticationInteractor mockAuthenticationInteractor;
|
||||||
@@ -103,6 +105,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
late LoginController loginController;
|
late LoginController loginController;
|
||||||
|
|
||||||
@@ -142,6 +145,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<GetSessionInteractor>(mockGetSessionInteractor);
|
Get.put<GetSessionInteractor>(mockGetSessionInteractor);
|
||||||
Get.put<GetAuthenticatedAccountInteractor>(mockGetAuthenticatedAccountInteractor);
|
Get.put<GetAuthenticatedAccountInteractor>(mockGetAuthenticatedAccountInteractor);
|
||||||
@@ -163,6 +167,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
Get.testMode = true;
|
Get.testMode = true;
|
||||||
|
|
||||||
loginController = LoginController(
|
loginController = LoginController(
|
||||||
|
|||||||
+5
@@ -32,6 +32,7 @@ import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oi
|
|||||||
import 'package:tmail_ui_user/features/thread/domain/model/search_query.dart';
|
import 'package:tmail_ui_user/features/thread/domain/model/search_query.dart';
|
||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import 'advanced_filter_controller_test.mocks.dart';
|
import 'advanced_filter_controller_test.mocks.dart';
|
||||||
@@ -57,6 +58,7 @@ const fallbackGenerators = {
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
// Advanced filter controller mock specs
|
// Advanced filter controller mock specs
|
||||||
MockSpec<MailboxDashBoardController>(fallbackGenerators: fallbackGenerators),
|
MockSpec<MailboxDashBoardController>(fallbackGenerators: fallbackGenerators),
|
||||||
MockSpec<GetAutoCompleteInteractor>(),
|
MockSpec<GetAutoCompleteInteractor>(),
|
||||||
@@ -93,6 +95,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
setUpAll(() {
|
setUpAll(() {
|
||||||
Get.testMode = true;
|
Get.testMode = true;
|
||||||
@@ -110,6 +113,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<CachingManager>(mockCachingManager);
|
Get.put<CachingManager>(mockCachingManager);
|
||||||
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
||||||
@@ -128,6 +132,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
// Mock search controller
|
// Mock search controller
|
||||||
mockQuickSearchEmailInteractor = MockQuickSearchEmailInteractor();
|
mockQuickSearchEmailInteractor = MockQuickSearchEmailInteractor();
|
||||||
|
|||||||
+4
@@ -93,6 +93,7 @@ import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
|||||||
import 'package:tmail_ui_user/features/network_connection/presentation/network_connection_controller.dart'
|
import 'package:tmail_ui_user/features/network_connection/presentation/network_connection_controller.dart'
|
||||||
if (dart.library.html) 'package:tmail_ui_user/features/network_connection/presentation/web_network_connection_controller.dart';
|
if (dart.library.html) 'package:tmail_ui_user/features/network_connection/presentation/web_network_connection_controller.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import 'mailbox_dashboard_controller_test.mocks.dart';
|
import 'mailbox_dashboard_controller_test.mocks.dart';
|
||||||
@@ -170,6 +171,7 @@ const fallbackGenerators = {
|
|||||||
MockSpec<RemoveComposerCacheOnWebInteractor>(),
|
MockSpec<RemoveComposerCacheOnWebInteractor>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
MockSpec<GetAllIdentitiesInteractor>(),
|
MockSpec<GetAllIdentitiesInteractor>(),
|
||||||
MockSpec<GetIdentityCacheOnWebInteractor>(),
|
MockSpec<GetIdentityCacheOnWebInteractor>(),
|
||||||
])
|
])
|
||||||
@@ -235,6 +237,7 @@ void main() {
|
|||||||
final uuid = MockUuid();
|
final uuid = MockUuid();
|
||||||
final applicationManager = MockApplicationManager();
|
final applicationManager = MockApplicationManager();
|
||||||
final mockToastManager = MockToastManager();
|
final mockToastManager = MockToastManager();
|
||||||
|
final mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
// mock reloadable controller Get dependencies
|
// mock reloadable controller Get dependencies
|
||||||
final getSessionInteractor = MockGetSessionInteractor();
|
final getSessionInteractor = MockGetSessionInteractor();
|
||||||
@@ -300,6 +303,7 @@ void main() {
|
|||||||
Get.put<Uuid>(uuid);
|
Get.put<Uuid>(uuid);
|
||||||
Get.put<ApplicationManager>(applicationManager);
|
Get.put<ApplicationManager>(applicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
Get.put<GetSessionInteractor>(getSessionInteractor);
|
Get.put<GetSessionInteractor>(getSessionInteractor);
|
||||||
Get.put<GetAuthenticatedAccountInteractor>(getAuthenticatedAccountInteractor);
|
Get.put<GetAuthenticatedAccountInteractor>(getAuthenticatedAccountInteractor);
|
||||||
Get.put<UpdateAccountCacheInteractor>(updateAccountCacheInteractor);
|
Get.put<UpdateAccountCacheInteractor>(updateAccountCacheInteractor);
|
||||||
|
|||||||
+4
@@ -94,6 +94,7 @@ import 'package:tmail_ui_user/main/localizations/app_localizations_delegate.dart
|
|||||||
import 'package:tmail_ui_user/main/localizations/localization_service.dart';
|
import 'package:tmail_ui_user/main/localizations/localization_service.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
import 'package:tmail_ui_user/main/utils/email_receive_manager.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../../fixtures/account_fixtures.dart';
|
import '../../../../fixtures/account_fixtures.dart';
|
||||||
@@ -175,6 +176,7 @@ const fallbackGenerators = {
|
|||||||
MockSpec<GetAllIdentitiesInteractor>(),
|
MockSpec<GetAllIdentitiesInteractor>(),
|
||||||
MockSpec<GetQuotasInteractor>(),
|
MockSpec<GetQuotasInteractor>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
MockSpec<GetIdentityCacheOnWebInteractor>(),
|
MockSpec<GetIdentityCacheOnWebInteractor>(),
|
||||||
])
|
])
|
||||||
void main() {
|
void main() {
|
||||||
@@ -222,6 +224,7 @@ void main() {
|
|||||||
final deleteAuthorityOidcInteractor = MockDeleteAuthorityOidcInteractor();
|
final deleteAuthorityOidcInteractor = MockDeleteAuthorityOidcInteractor();
|
||||||
final appToast = MockAppToast();
|
final appToast = MockAppToast();
|
||||||
final toastManager = MockToastManager();
|
final toastManager = MockToastManager();
|
||||||
|
final mockTwakeAppManager = MockTwakeAppManager();
|
||||||
final imagePaths = ImagePaths();
|
final imagePaths = ImagePaths();
|
||||||
final responsiveUtils = MockResponsiveUtils();
|
final responsiveUtils = MockResponsiveUtils();
|
||||||
final uuid = MockUuid();
|
final uuid = MockUuid();
|
||||||
@@ -296,6 +299,7 @@ void main() {
|
|||||||
Get.put<DeleteAuthorityOidcInteractor>(deleteAuthorityOidcInteractor);
|
Get.put<DeleteAuthorityOidcInteractor>(deleteAuthorityOidcInteractor);
|
||||||
Get.put<AppToast>(appToast);
|
Get.put<AppToast>(appToast);
|
||||||
Get.put<ToastManager>(toastManager);
|
Get.put<ToastManager>(toastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
Get.put<ImagePaths>(imagePaths);
|
Get.put<ImagePaths>(imagePaths);
|
||||||
Get.put<ResponsiveUtils>(responsiveUtils);
|
Get.put<ResponsiveUtils>(responsiveUtils);
|
||||||
Get.put<Uuid>(uuid);
|
Get.put<Uuid>(uuid);
|
||||||
|
|||||||
+5
@@ -39,6 +39,7 @@ import 'package:tmail_ui_user/features/public_asset/domain/usecase/remove_identi
|
|||||||
import 'package:tmail_ui_user/features/public_asset/presentation/clean_up_public_assets_interactor_bindings.dart';
|
import 'package:tmail_ui_user/features/public_asset/presentation/clean_up_public_assets_interactor_bindings.dart';
|
||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../../../fixtures/session_fixtures.dart';
|
import '../../../../../fixtures/session_fixtures.dart';
|
||||||
@@ -65,6 +66,7 @@ const fallbackGenerators = {
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
|
|
||||||
// Reloadable controller mockspecs
|
// Reloadable controller mockspecs
|
||||||
MockSpec<GetSessionInteractor>(),
|
MockSpec<GetSessionInteractor>(),
|
||||||
@@ -109,6 +111,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
late MockSaveIdentityCacheOnWebInteractor mockSaveIdentityCacheOnWebInteractor;
|
late MockSaveIdentityCacheOnWebInteractor mockSaveIdentityCacheOnWebInteractor;
|
||||||
|
|
||||||
@@ -127,6 +130,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
mockSaveIdentityCacheOnWebInteractor = MockSaveIdentityCacheOnWebInteractor();
|
mockSaveIdentityCacheOnWebInteractor = MockSaveIdentityCacheOnWebInteractor();
|
||||||
|
|
||||||
@@ -147,6 +151,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
// mock reloadable controller
|
// mock reloadable controller
|
||||||
Get.put<GetSessionInteractor>(MockGetSessionInteractor());
|
Get.put<GetSessionInteractor>(MockGetSessionInteractor());
|
||||||
|
|||||||
+5
@@ -48,6 +48,7 @@ import 'package:tmail_ui_user/features/rules_filter_creator/presentation/rules_f
|
|||||||
import 'package:tmail_ui_user/features/rules_filter_creator/presentation/widgets/rule_filter_action_widget.dart';
|
import 'package:tmail_ui_user/features/rules_filter_creator/presentation/widgets/rule_filter_action_widget.dart';
|
||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../fixtures/widget_fixtures.dart';
|
import '../../../fixtures/widget_fixtures.dart';
|
||||||
@@ -67,6 +68,7 @@ import 'rule_filter_creator_controller_test.mocks.dart';
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
// Rule filter creator controller mock specs
|
// Rule filter creator controller mock specs
|
||||||
MockSpec<TreeBuilder>(),
|
MockSpec<TreeBuilder>(),
|
||||||
MockSpec<VerifyNameInteractor>(),
|
MockSpec<VerifyNameInteractor>(),
|
||||||
@@ -95,6 +97,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
setUpAll(() {
|
setUpAll(() {
|
||||||
Get.testMode = true;
|
Get.testMode = true;
|
||||||
@@ -113,6 +116,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<CachingManager>(mockCachingManager);
|
Get.put<CachingManager>(mockCachingManager);
|
||||||
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
||||||
@@ -131,6 +135,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
// Mock rule filter creator controller
|
// Mock rule filter creator controller
|
||||||
mockTreeBuilder = MockTreeBuilder();
|
mockTreeBuilder = MockTreeBuilder();
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import 'package:tmail_ui_user/features/thread/presentation/model/search_status.d
|
|||||||
import 'package:tmail_ui_user/features/thread/presentation/thread_controller.dart';
|
import 'package:tmail_ui_user/features/thread/presentation/thread_controller.dart';
|
||||||
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
import 'package:tmail_ui_user/main/bindings/network/binding_tag.dart';
|
||||||
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
import 'package:tmail_ui_user/main/utils/toast_manager.dart';
|
||||||
|
import 'package:tmail_ui_user/main/utils/twake_app_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../../fixtures/account_fixtures.dart';
|
import '../../../../fixtures/account_fixtures.dart';
|
||||||
@@ -75,6 +76,7 @@ const fallbackGenerators = {
|
|||||||
MockSpec<Uuid>(),
|
MockSpec<Uuid>(),
|
||||||
MockSpec<ApplicationManager>(),
|
MockSpec<ApplicationManager>(),
|
||||||
MockSpec<ToastManager>(),
|
MockSpec<ToastManager>(),
|
||||||
|
MockSpec<TwakeAppManager>(),
|
||||||
// Thread controller mock specs
|
// Thread controller mock specs
|
||||||
MockSpec<NetworkConnectionController>(fallbackGenerators: fallbackGenerators),
|
MockSpec<NetworkConnectionController>(fallbackGenerators: fallbackGenerators),
|
||||||
MockSpec<SearchController>(fallbackGenerators: fallbackGenerators),
|
MockSpec<SearchController>(fallbackGenerators: fallbackGenerators),
|
||||||
@@ -115,6 +117,7 @@ void main() {
|
|||||||
late MockUuid mockUuid;
|
late MockUuid mockUuid;
|
||||||
late MockApplicationManager mockApplicationManager;
|
late MockApplicationManager mockApplicationManager;
|
||||||
late MockToastManager mockToastManager;
|
late MockToastManager mockToastManager;
|
||||||
|
late MockTwakeAppManager mockTwakeAppManager;
|
||||||
|
|
||||||
setUpAll(() {
|
setUpAll(() {
|
||||||
Get.testMode = true;
|
Get.testMode = true;
|
||||||
@@ -132,6 +135,7 @@ void main() {
|
|||||||
mockUuid = MockUuid();
|
mockUuid = MockUuid();
|
||||||
mockApplicationManager = MockApplicationManager();
|
mockApplicationManager = MockApplicationManager();
|
||||||
mockToastManager = MockToastManager();
|
mockToastManager = MockToastManager();
|
||||||
|
mockTwakeAppManager = MockTwakeAppManager();
|
||||||
|
|
||||||
Get.put<CachingManager>(mockCachingManager);
|
Get.put<CachingManager>(mockCachingManager);
|
||||||
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
Get.put<LanguageCacheManager>(mockLanguageCacheManager);
|
||||||
@@ -150,6 +154,7 @@ void main() {
|
|||||||
Get.put<Uuid>(mockUuid);
|
Get.put<Uuid>(mockUuid);
|
||||||
Get.put<ApplicationManager>(mockApplicationManager);
|
Get.put<ApplicationManager>(mockApplicationManager);
|
||||||
Get.put<ToastManager>(mockToastManager);
|
Get.put<ToastManager>(mockToastManager);
|
||||||
|
Get.put<TwakeAppManager>(mockTwakeAppManager);
|
||||||
|
|
||||||
// Mock thread controller
|
// Mock thread controller
|
||||||
mockNetworkConnectionController = MockNetworkConnectionController();
|
mockNetworkConnectionController = MockNetworkConnectionController();
|
||||||
|
|||||||
Reference in New Issue
Block a user