3.3.0 alpha update (#1118)

* alpha

* locale
This commit is contained in:
Cilibiu Bogdan
2019-05-31 13:30:11 +03:00
committed by Suzana Dirla
parent 14adbad1a9
commit 9fef05b69f
6 changed files with 25 additions and 105 deletions

View File

@@ -195,43 +195,4 @@ describe('AppLayoutComponent', () => {
expect(component.layout.container.toggleMenu).toHaveBeenCalled();
});
it('should set direction `ltr` if no direction declared', () => {
appConfig.config.languages = [
{
key: 'en'
}
];
spyOn(userPreference, 'get').and.callFake(key => {
if (key === 'locale') {
return 'en';
}
});
const spy = spyOn(userPreference, 'set');
fixture.detectChanges();
expect(spy.calls.mostRecent().args).toEqual(['textOrientation', 'ltr']);
});
it('should set direction `rtl` based on locale language direction', () => {
appConfig.config.languages = [
{
key: 'en',
direction: 'rtl'
}
];
spyOn(userPreference, 'get').and.callFake(key => {
if (key === 'locale') {
return 'en';
}
});
const spy = spyOn(userPreference, 'set');
fixture.detectChanges();
expect(spy.calls.mostRecent().args).toEqual(['textOrientation', 'rtl']);
});
});