test(core): fix errors

pull/1884/head
mehmet-erim 5 years ago
parent 50880a9914
commit 97953733d3

@ -4,11 +4,12 @@ import { NGXS_PLUGINS, NgxsModule, InitState, Store } from '@ngxs/store';
import { environment } from '../../../../../apps/dev-app/src/environments/environment';
import { LAYOUTS } from '../../../../theme-basic/src/public-api';
import { ABP } from '../models';
import { ConfigPlugin, NGXS_CONFIG_PLUGIN_OPTIONS, addAbpRoutes } from '../plugins';
import { ConfigPlugin, NGXS_CONFIG_PLUGIN_OPTIONS } from '../plugins';
import { RouterOutletComponent } from '../components';
import { ConfigState } from '../states';
import { CoreModule } from '../core.module';
import { eLayoutType } from '../enums/common';
import { addAbpRoutes } from '../utils';
addAbpRoutes([
{

@ -30,7 +30,7 @@ describe('LocaleProvider', () => {
expect(spectator.get(LOCALE_ID).valueOf()).toBe(localesMapping['en-US'] || 'en-US');
localizationService.currentLang = 'tr';
(localizationService as any).currentLang = 'tr';
expect(spectator.get(LOCALE_ID).valueOf()).toBe(localesMapping['tr'] || 'tr');
});
});

@ -24,7 +24,7 @@ describe('LocalizationService', () => {
describe('#currentLang', () => {
it('should be tr', () => {
store.selectSnapshot.andCallFake((selector: (state: any, ...states: any[]) => string) => {
return selector({ SessionState: { getLanguage: 'tr' } });
return selector({ SessionState: { language: 'tr' } });
});
expect(service.currentLang).toBe('tr');
@ -33,9 +33,7 @@ describe('LocalizationService', () => {
describe('#get', () => {
it('should be return an observable localization', async () => {
store.select.andCallFake((selector: (state: any, ...states: any[]) => Observable<string>) => {
return selector({ ConfigState: { getLocalization: (keys, ...interpolateParams) => of(keys) } });
});
store.select.andReturn(of('AbpTest'));
const localization = await service.get('AbpTest').toPromise();

@ -2,9 +2,9 @@
<div class="col-auto">
<h1 class="content-header-title">{{ 'AbpSettingManagement::Settings' | abpLocalization }}</h1>
</div>
<!-- <div id="breadcrumb" class="col-md-auto pl-md-0">
<div id="breadcrumb" class="col-md-auto pl-md-0">
<abp-breadcrumb></abp-breadcrumb>
</div> -->
</div>
<div class="col">
<div class="text-lg-right pt-2" id="AbpContentToolbar"></div>
</div>

Loading…
Cancel
Save