Skip to content

Commit c2e4b20

Browse files
committed
test: Fix for Audio/Vision Modality storybook automated tests
1 parent ffe27e1 commit c2e4b20

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tools/server/webui/src/stories/ChatForm.stories.svelte

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,15 @@
119119
const audioButton = document.querySelector('.audio-button');
120120
await expect(audioButton).toHaveAttribute('data-disabled');
121121

122+
// Fix for dropdown menu side effect
123+
const body = document.querySelector('body');
124+
if (body) body.style.pointerEvents = 'all';
125+
122126
console.log('✅ Vision modality: Images enabled, Audio/Recording disabled');
123127
}}
124128
/>
125129

126-
127-
<!-- <Story
130+
<Story
128131
name="AudioModality"
129132
args={{ class: 'max-w-[56rem] w-[calc(100vw-2rem)]' }}
130133
play={async ({ canvas, userEvent }) => {
@@ -150,9 +153,13 @@
150153
const audioButton = document.querySelector('.audio-button');
151154
await expect(audioButton).not.toHaveAttribute('data-disabled');
152155

156+
// Fix for dropdown menu side effect
157+
const body = document.querySelector('body');
158+
if (body) body.style.pointerEvents = 'all';
159+
153160
console.log('✅ Audio modality: Audio/Recording enabled, Images disabled');
154161
}}
155-
/> -->
162+
/>
156163

157164
<Story
158165
name="FileAttachments"

0 commit comments

Comments
 (0)