File size: 1,488 Bytes
bd98362 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | import {ThemeBootstrapService} from 'services/theme/ui-theme-service';
import {ThemeRestClient} from 'services/rest/ui-theme-rest-service';
import {stub} from 'test/test-utils';
describe('ThemeBootstrapService', () => {
let themeRestClient = stub(ThemeRestClient);
let themeBootstrapService;
beforeEach(() => {
themeBootstrapService = new ThemeBootstrapService(themeRestClient);
});
describe('#processStyles', () => {
it('should process all styles that need processing', () => {
let styles = {
brand_primary_color : '#008e8e',
brand_secondary_color:'#003f3f',
button_color:'#8e0071',
button_disabled_color:'#f2ff00',
button_hover_color:'#8e0000',
link_color:'#8e0071',
link_disabled_color:'#f2ff00',
link_hover_color:'#8e0000',
tooltip_color:'#008e8e'
};
let actualStyles = themeBootstrapService.processStyles(styles);
expect(actualStyles).to.eql({
brand_primary_color : '#008e8e',
brand_secondary_color:'#003f3f',
button_color:'#8e0071',
button_color_dark: '#75005d',
button_disabled_color:'#f2ff00',
button_disabled_color_dark:'#dae600',
button_hover_color:'#8e0000',
button_hover_color_dark: "#750000",
link_color:'#8e0071',
link_color_darker:'#420034',
link_disabled_color:'#f2ff00',
link_hover_color:'#8e0000',
tooltip_color:'#008e8e'
});
});
});
}); |