Skip to content

Commit 3936e68

Browse files
committed
test: less flaky
1 parent a05bff7 commit 3936e68

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

e2e/utils/test-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ export const closeSendPreference = async (page: Page) => {
1212
export const sendChatMessage = async (page: Page, message: string) => {
1313
const chatInput = page.getByTestId('chat-input').first()
1414
await chatInput.fill(message)
15-
await chatInput.press('Shift+Enter')
15+
const sendBtn = page.getByTestId('send-chat-message')
16+
await sendBtn.click()
1617
}

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
/* Retry on CI only */
2121
retries: inCI ? 1 : 0,
2222
/* Global timeout for each test */
23-
timeout: 12_000,
23+
timeout: inCI ? 15_000 : 12_000,
2424
expect: {
2525
timeout: inCI ? 4_500 : 3000,
2626
},

src/client/components/ChatV2/ChatBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export const ChatBox = ({
263263
</Box>
264264

265265
<Tooltip title={disabled ? t('chat:cancelResponse') : isShiftEnterSend ? t('chat:shiftEnterSend') : t('chat:enterSend')} arrow placement="top">
266-
<IconButton type={disabled ? 'button' : 'submit'} ref={sendButtonRef}>
266+
<IconButton type={disabled ? 'button' : 'submit'} ref={sendButtonRef} data-testid="send-chat-message">
267267
{disabled ? <StopIcon /> : <Send />}
268268
</IconButton>
269269
</Tooltip>

0 commit comments

Comments
 (0)