TF-3260 Load & Display App Grid Linagora Ecosystem

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-12-09 12:40:57 +07:00
committed by Dat H. Pham
parent 95f05c4715
commit dce74b43e9
48 changed files with 894 additions and 435 deletions
@@ -56,7 +56,7 @@ void main() {
LinagoraEcosystemIdentifier.twakeDrive: AppLinagoraEcosystem(
appName: 'Twake Drive',
logoURL: 'https://xyz',
webLink: 'https://abc',
webLink: Uri.parse('https://abc'),
),
LinagoraEcosystemIdentifier.mobileApps: MobileAppsLinagoraEcosystem({
LinagoraEcosystemIdentifier.twakeChat: AppLinagoraEcosystem(
@@ -0,0 +1,56 @@
import 'package:core/data/network/config/service_path.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:tmail_ui_user/features/login/data/extensions/service_path_extension.dart';
void main() {
group('ServicePathExtension::test', () {
test('Should correctly combines baseUrl and path without trailing or leading slashes', () {
final servicePath = ServicePath('/api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com');
expect(result.path, 'https://example.com/api/v1/resource');
});
test('Should handles baseUrl with trailing slash', () {
final servicePath = ServicePath('/api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com/');
expect(result.path, 'https://example.com/api/v1/resource');
});
test('Should handles path without leading slash', () {
final servicePath = ServicePath('api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com');
expect(result.path, 'https://example.com/api/v1/resource');
});
test('Should handles both baseUrl with trailing slash and path without leading slash', () {
final servicePath = ServicePath('api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com/');
expect(result.path, 'https://example.com/api/v1/resource');
});
test('Should handles both baseUrl without trailing slash and path with leading slash', () {
final servicePath = ServicePath('/api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com');
expect(result.path, 'https://example.com/api/v1/resource');
});
test('Should handles empty path', () {
final servicePath = ServicePath('');
final result = servicePath.usingBaseUrl('https://example.com');
expect(result.path, 'https://example.com/');
});
test('Should handles empty baseUrl', () {
final servicePath = ServicePath('/api/v1/resource');
final result = servicePath.usingBaseUrl('');
expect(result.path, '/api/v1/resource');
});
test('Should handles both baseUrl and path being empty', () {
final servicePath = ServicePath('');
final result = servicePath.usingBaseUrl('');
expect(result.path, '/');
});
});
}
@@ -132,7 +132,7 @@ const fallbackGenerators = {
MockSpec<RemoveEmailDraftsInteractor>(),
MockSpec<EmailReceiveManager>(),
MockSpec<DownloadController>(fallbackGenerators: fallbackGenerators),
MockSpec<AppGridDashboardController>(),
MockSpec<AppGridDashboardController>(fallbackGenerators: fallbackGenerators),
MockSpec<SpamReportController>(fallbackGenerators: fallbackGenerators),
MockSpec<NetworkConnectionController>(fallbackGenerators: fallbackGenerators),
MockSpec<QuickSearchEmailInteractor>(),
@@ -136,7 +136,7 @@ const fallbackGenerators = {
MockSpec<RemoveEmailDraftsInteractor>(),
MockSpec<EmailReceiveManager>(),
MockSpec<DownloadController>(fallbackGenerators: fallbackGenerators),
MockSpec<AppGridDashboardController>(),
MockSpec<AppGridDashboardController>(fallbackGenerators: fallbackGenerators),
MockSpec<SpamReportController>(fallbackGenerators: fallbackGenerators),
MockSpec<NetworkConnectionController>(fallbackGenerators: fallbackGenerators),
MockSpec<QuickSearchEmailInteractor>(),