mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-22 05:51:18 +00:00
Pick colors constants from config
This commit is contained in:
parent
6272e45b02
commit
a7beb38d06
@ -1,4 +1,5 @@
|
||||
import * as utils from 'utils/device';
|
||||
import colors from 'config/colors';
|
||||
|
||||
describe('device utils', () => {
|
||||
it('get status', () => {
|
||||
@ -64,14 +65,14 @@ describe('device utils', () => {
|
||||
});
|
||||
|
||||
it('get status color', () => {
|
||||
expect(utils.getStatusColor(0)).toBe('#494949');
|
||||
expect(utils.getStatusColor(null)).toBe('#494949');
|
||||
expect(utils.getStatusColor('sdsdsdsd')).toBe('#494949');
|
||||
expect(utils.getStatusColor('used-in-other-window')).toBe('#EB8A00');
|
||||
expect(utils.getStatusColor('connected')).toBe('#01B757');
|
||||
expect(utils.getStatusColor('unacquired')).toBe('#EB8A00');
|
||||
expect(utils.getStatusColor('disconnected')).toBe('#ED1212');
|
||||
expect(utils.getStatusColor('unavailable')).toBe('#ED1212');
|
||||
expect(utils.getStatusColor(0)).toBe(colors.TEXT_PRIMARY);
|
||||
expect(utils.getStatusColor(null)).toBe(colors.TEXT_PRIMARY);
|
||||
expect(utils.getStatusColor('sdsdsdsd')).toBe(colors.TEXT_PRIMARY);
|
||||
expect(utils.getStatusColor('used-in-other-window')).toBe(colors.WARNING_PRIMARY);
|
||||
expect(utils.getStatusColor('connected')).toBe(colors.GREEN_PRIMARY);
|
||||
expect(utils.getStatusColor('unacquired')).toBe(colors.WARNING_PRIMARY);
|
||||
expect(utils.getStatusColor('disconnected')).toBe(colors.ERROR_PRIMARY);
|
||||
expect(utils.getStatusColor('unavailable')).toBe(colors.ERROR_PRIMARY);
|
||||
});
|
||||
|
||||
it('get status name', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user