mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-13 20:08:56 +00:00
Use contant colors in notifications tests
This commit is contained in:
parent
73acbf2e6b
commit
885be491d0
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user