From 2ac633e0811b26c452e6167eecd4e403d30599b2 Mon Sep 17 00:00:00 2001 From: Srinaath Ravichandran Date: Mon, 2 Mar 2020 10:47:28 -0800 Subject: [PATCH] Updated tests for fileContent inside styleset Signed-off-by: Srinaath Ravichandran --- .../editor/emulator/parts/chat/chat.spec.tsx | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/packages/app/client/src/ui/editor/emulator/parts/chat/chat.spec.tsx b/packages/app/client/src/ui/editor/emulator/parts/chat/chat.spec.tsx index e57dcfe0d..cbbae5852 100644 --- a/packages/app/client/src/ui/editor/emulator/parts/chat/chat.spec.tsx +++ b/packages/app/client/src/ui/editor/emulator/parts/chat/chat.spec.tsx @@ -59,6 +59,9 @@ jest.mock('./chat.scss', () => ({ get bubbleContentColor() { return '#fff'; }, + get bubbleBackground() { + return '#ff0000'; + }, })); jest.mock('electron', () => ({ @@ -156,24 +159,14 @@ describe('', () => { const webChat = wrapper.find(ReactWebChat); const styleSet = createStyleSet({ ...webChatStyleOptions }); - styleSet.uploadButton = { - ...styleSet.uploadButton, - padding: '1px', - }; - - styleSet.uploadAttachment = { - ...styleSet.uploadAttachment, - '& > .name, & > .size': { - color: '#fff', - }, - }; - - const mutatedDownloadAttachment = { - ...styleSet.downloadAttachment, + styleSet.fileContent = { + ...styleSet.fileContent, + background: '#ff0000', + '& .webchat__fileContent__badge': { padding: '4px' }, + '& .webchat__fileContent__downloadIcon': { fill: '#fff' }, + '& .webchat__fileContent__fileName': { color: '#fff' }, + '& .webchat__fileContent__size': { color: '#fff' }, }; - mutatedDownloadAttachment['& > a']['& > .details']['& > .name'].color = '#fff'; - mutatedDownloadAttachment['& > a']['& > .icon'].fill = '#fff'; - styleSet.downloadAttachment = mutatedDownloadAttachment; expect(webChat.exists()).toBe(true); const wcProps = webChat.props();