Download pool/shard001/JavaScript/0006066_ui-theme-service.spec.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard001/JavaScript/0006066_ui-theme-service.spec.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard001/JavaScript/0006066_ui-theme-service.spec.js
-
curl -L -o 0006066_ui-theme-service.spec.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard001/JavaScript/0006066_ui-theme-service.spec.js
1.49 kB
| 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' | |
| }); | |
| }); | |
| }); | |
| }); |