|
|
|
@ -1,20 +1,21 @@
|
|
|
|
|
import * as utils from 'utils/notification';
|
|
|
|
|
import colors from 'config/colors';
|
|
|
|
|
|
|
|
|
|
describe('notification utils', () => {
|
|
|
|
|
it('get primary color from status', () => {
|
|
|
|
|
expect(utils.getPrimaryColor('info')).toBe('#1E7FF0');
|
|
|
|
|
expect(utils.getPrimaryColor('warning')).toBe('#EB8A00');
|
|
|
|
|
expect(utils.getPrimaryColor('error')).toBe('#ED1212');
|
|
|
|
|
expect(utils.getPrimaryColor('success')).toBe('#01B757');
|
|
|
|
|
expect(utils.getPrimaryColor('info')).toBe(colors.INFO_PRIMARY);
|
|
|
|
|
expect(utils.getPrimaryColor('warning')).toBe(colors.WARNING_PRIMARY);
|
|
|
|
|
expect(utils.getPrimaryColor('error')).toBe(colors.ERROR_PRIMARY);
|
|
|
|
|
expect(utils.getPrimaryColor('success')).toBe(colors.SUCCESS_PRIMARY);
|
|
|
|
|
expect(utils.getPrimaryColor('kdsjflds')).toBe(null);
|
|
|
|
|
expect(utils.getPrimaryColor('')).toBe(null);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('get secondary color from status', () => {
|
|
|
|
|
expect(utils.getSecondaryColor('info')).toBe('#E1EFFF');
|
|
|
|
|
expect(utils.getSecondaryColor('warning')).toBe('#FFEFD9');
|
|
|
|
|
expect(utils.getSecondaryColor('error')).toBe('#FFE9E9');
|
|
|
|
|
expect(utils.getSecondaryColor('success')).toBe('#DFFFEE');
|
|
|
|
|
expect(utils.getSecondaryColor('info')).toBe(colors.INFO_SECONDARY);
|
|
|
|
|
expect(utils.getSecondaryColor('warning')).toBe(colors.WARNING_SECONDARY);
|
|
|
|
|
expect(utils.getSecondaryColor('error')).toBe(colors.ERROR_SECONDARY);
|
|
|
|
|
expect(utils.getSecondaryColor('success')).toBe(colors.SUCCESS_SECONDARY);
|
|
|
|
|
expect(utils.getSecondaryColor('kdsjflds')).toBe(null);
|
|
|
|
|
expect(utils.getSecondaryColor('')).toBe(null);
|
|
|
|
|
});
|
|
|
|
|