diff --git a/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts index b566e4f24f..d5baa8b309 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts @@ -6,94 +6,6 @@ import { Config } from '../models/config'; import { ConfigStateService } from '../services/config-state.service'; import { ConfigState } from '../states'; -const CONFIG_STATE_DATA = { - environment: { - production: false, - application: { - name: 'MyProjectName', - }, - oAuthConfig: { - issuer: 'https://localhost:44305', - }, - apis: { - default: { - url: 'https://localhost:44305', - }, - other: { - url: 'https://localhost:44306', - }, - }, - localization: { - defaultResourceName: 'MyProjectName', - }, - }, - requirements: { - layouts: [null, null, null], - }, - localization: { - values: { - MyProjectName: { - "'{0}' and '{1}' do not match.": "'{0}' and '{1}' do not match.", - }, - AbpIdentity: { - Identity: 'identity', - }, - }, - languages: [ - { - cultureName: 'cs', - uiCultureName: 'cs', - displayName: 'Čeština', - flagIcon: null, - }, - ], - currentCulture: { - displayName: 'English', - englishName: 'English', - threeLetterIsoLanguageName: 'eng', - twoLetterIsoLanguageName: 'en', - isRightToLeft: false, - cultureName: 'en', - name: 'en', - nativeName: 'English', - dateTimeFormat: { - calendarAlgorithmType: 'SolarCalendar', - dateTimeFormatLong: 'dddd, MMMM d, yyyy', - shortDatePattern: 'M/d/yyyy', - fullDateTimePattern: 'dddd, MMMM d, yyyy h:mm:ss tt', - dateSeparator: '/', - shortTimePattern: 'h:mm tt', - longTimePattern: 'h:mm:ss tt', - }, - }, - defaultResourceName: null, - }, - auth: { - policies: { - 'AbpIdentity.Roles': true, - }, - grantedPolicies: { - 'Abp.Identity': false, - }, - }, - setting: { - values: { - 'Abp.Localization.DefaultLanguage': 'en', - }, - }, - currentUser: { - isAuthenticated: false, - id: null, - tenantId: null, - userName: null, - email: null, - roles: [], - } as ApplicationConfiguration.CurrentUser, - features: { - values: {}, - }, -} as Config.State; - describe('ConfigStateService', () => { let service: ConfigStateService; let spectator: SpectatorService; diff --git a/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts index e641cc2241..1660f916c1 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts @@ -8,7 +8,7 @@ import { Config } from '../models/config'; import { ApplicationConfigurationService, ConfigStateService } from '../services'; import { ConfigState } from '../states'; -export const CONFIG_STATE_DATA = { +export const CONFIG_STATE_DATA = ({ environment: { production: false, application: { @@ -98,7 +98,8 @@ export const CONFIG_STATE_DATA = { 'Chat.Enable': 'True', }, }, -} as Config.State; + registerLocaleFn: () => Promise.resolve(), +} as any) as Config.State; describe('ConfigState', () => { let spectator: SpectatorService;