Skip to content

Commit

Permalink
Updated tests for fileContent inside styleset
Browse files Browse the repository at this point in the history
Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>
  • Loading branch information
Srinaath Ravichandran committed Mar 2, 2020
1 parent 8376e0a commit 2ac633e
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions packages/app/client/src/ui/editor/emulator/parts/chat/chat.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jest.mock('./chat.scss', () => ({
get bubbleContentColor() {
return '#fff';
},
get bubbleBackground() {
return '#ff0000';
},
}));

jest.mock('electron', () => ({
Expand Down Expand Up @@ -156,24 +159,14 @@ describe('<ChatContainer />', () => {
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();
Expand Down

0 comments on commit 2ac633e

Please sign in to comment.