tedt: fix testing errors

pull/6052/head
mehmet-erim 5 years ago
parent 346b160a89
commit 869744cd11

@ -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<ConfigStateService>;

@ -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<ConfigStateService>;

Loading…
Cancel
Save