Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 2ac633e

Browse files
author
Srinaath Ravichandran
committed
Updated tests for fileContent inside styleset
Signed-off-by: Srinaath Ravichandran <[email protected]>
1 parent 8376e0a commit 2ac633e

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

  • packages/app/client/src/ui/editor/emulator/parts/chat

packages/app/client/src/ui/editor/emulator/parts/chat/chat.spec.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jest.mock('./chat.scss', () => ({
5959
get bubbleContentColor() {
6060
return '#fff';
6161
},
62+
get bubbleBackground() {
63+
return '#ff0000';
64+
},
6265
}));
6366

6467
jest.mock('electron', () => ({
@@ -156,24 +159,14 @@ describe('<ChatContainer />', () => {
156159
const webChat = wrapper.find(ReactWebChat);
157160
const styleSet = createStyleSet({ ...webChatStyleOptions });
158161

159-
styleSet.uploadButton = {
160-
...styleSet.uploadButton,
161-
padding: '1px',
162-
};
163-
164-
styleSet.uploadAttachment = {
165-
...styleSet.uploadAttachment,
166-
'& > .name, & > .size': {
167-
color: '#fff',
168-
},
169-
};
170-
171-
const mutatedDownloadAttachment = {
172-
...styleSet.downloadAttachment,
162+
styleSet.fileContent = {
163+
...styleSet.fileContent,
164+
background: '#ff0000',
165+
'& .webchat__fileContent__badge': { padding: '4px' },
166+
'& .webchat__fileContent__downloadIcon': { fill: '#fff' },
167+
'& .webchat__fileContent__fileName': { color: '#fff' },
168+
'& .webchat__fileContent__size': { color: '#fff' },
173169
};
174-
mutatedDownloadAttachment['& > a']['& > .details']['& > .name'].color = '#fff';
175-
mutatedDownloadAttachment['& > a']['& > .icon'].fill = '#fff';
176-
styleSet.downloadAttachment = mutatedDownloadAttachment;
177170

178171
expect(webChat.exists()).toBe(true);
179172
const wcProps = webChat.props();

0 commit comments

Comments
 (0)