From 885be491d02911a30c78510e84950fd760f2b1e2 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Mon, 25 Feb 2019 17:14:39 +0100 Subject: [PATCH] Use contant colors in notifications tests --- src/utils/__tests__/notification.test.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/utils/__tests__/notification.test.js b/src/utils/__tests__/notification.test.js index 9974deed..2828be7d 100644 --- a/src/utils/__tests__/notification.test.js +++ b/src/utils/__tests__/notification.test.js @@ -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); });