diff --git a/__visual_tests__/workflow1.spec.ts b/__visual_tests__/workflow1.spec.ts index 84b49fca8..5b6c0b7d3 100644 --- a/__visual_tests__/workflow1.spec.ts +++ b/__visual_tests__/workflow1.spec.ts @@ -36,13 +36,13 @@ test('100', async ({ page, browserName }) => { await input.fill('trigger workflow1'); await assertScreenshot(page, `100-1.${browserName}`); await input.press('Enter'); - await page.waitForTimeout(500); + await page.waitForTimeout(1000); await assertScreenshot(page, `100-2.${browserName}`); // 2 let options = page.locator('.sendbird-suggested-replies__option'); await options.first().click(); - await page.waitForTimeout(500); + await page.waitForTimeout(1000); await assertScreenshot(page, `100-3.${browserName}`); // 3 @@ -60,18 +60,18 @@ test('100', async ({ page, browserName }) => { await chipContainer.locator(':scope > *').nth(5).click(); submitButton = page.locator('button.sendbird-button--primary'); await submitButton.click(); - await page.waitForTimeout(100); + await page.waitForTimeout(1000); await assertScreenshot(page, `100-5.${browserName}`); // 5 options = page.locator('.sendbird-suggested-replies__option'); await options.first().click(); - await page.waitForTimeout(100); + await page.waitForTimeout(1000); await assertScreenshot(page, `100-6.${browserName}`); // 6 options = page.locator('.sendbird-suggested-replies__option'); await options.nth(1).click(); - await page.waitForTimeout(100); + await page.waitForTimeout(1000); await assertScreenshot(page, `100-7.${browserName}`); }); diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-1-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-1-chromium-chromium-darwin.png deleted file mode 100644 index 00bf657d7..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-1-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-1-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-1-firefox-firefox-darwin.png deleted file mode 100644 index eec40fca1..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-1-firefox-firefox-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-2-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-2-chromium-chromium-darwin.png deleted file mode 100644 index 378b25220..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-2-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-2-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-2-firefox-firefox-darwin.png deleted file mode 100644 index bf93a8a47..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-2-firefox-firefox-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-3-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-3-chromium-chromium-darwin.png deleted file mode 100644 index 44bd75337..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-3-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-3-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-3-firefox-firefox-darwin.png deleted file mode 100644 index acf20ef72..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-3-firefox-firefox-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-4-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-4-chromium-chromium-darwin.png deleted file mode 100644 index 58731f2d6..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-4-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-4-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-4-firefox-firefox-darwin.png deleted file mode 100644 index 679fa9b0f..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-4-firefox-firefox-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-5-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-5-chromium-chromium-darwin.png deleted file mode 100644 index fb41addfc..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-5-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-5-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-5-firefox-firefox-darwin.png deleted file mode 100644 index 2c2a04554..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-5-firefox-firefox-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-6-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-6-chromium-chromium-darwin.png deleted file mode 100644 index 05c5144ef..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-6-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-6-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-6-firefox-firefox-darwin.png deleted file mode 100644 index 21047c540..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-6-firefox-firefox-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-7-chromium-chromium-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-7-chromium-chromium-darwin.png deleted file mode 100644 index 2372195ee..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-7-chromium-chromium-darwin.png and /dev/null differ diff --git a/__visual_tests__/workflow1.spec.ts-snapshots/100-7-firefox-firefox-darwin.png b/__visual_tests__/workflow1.spec.ts-snapshots/100-7-firefox-firefox-darwin.png deleted file mode 100644 index db3be7cdb..000000000 Binary files a/__visual_tests__/workflow1.spec.ts-snapshots/100-7-firefox-firefox-darwin.png and /dev/null differ diff --git a/src/components/chat/ui/ChatMessageList.tsx b/src/components/chat/ui/ChatMessageList.tsx index adbbe1893..afc03e7fe 100644 --- a/src/components/chat/ui/ChatMessageList.tsx +++ b/src/components/chat/ui/ChatMessageList.tsx @@ -20,7 +20,7 @@ import { useTypingTargetMessageId } from '../hooks/useTypingTargetMessageId'; export const ChatMessageList = () => { const { channel, dataSource, scrollSource, handlers } = useChatContext(); - const { botStudioEditProps, customUserAgentParam, stringSet, dateLocale } = useConstantState(); + const { botStudioEditProps, customUserAgentParam, stringSet, dateLocale, enableMessageGrouping } = useConstantState(); const typingTargetMessageId = useTypingTargetMessageId(); const { filteredMessages, shouldShowOriginalDate, renderBotStudioWelcomeMessages } = useBotStudioView(); @@ -54,7 +54,12 @@ export const ChatMessageList = () => { const lastMessageInChannel = filteredMessages[filteredMessages.length - 1]; const showRepliesOnLastMessage = message.messageId === lastMessageInChannel?.messageId; - const [top, bottom] = getMessageGrouping(message, filteredMessages[index - 1], filteredMessages[index + 1]); + const [top, bottom] = getMessageGrouping( + message, + enableMessageGrouping, + filteredMessages[index - 1], + filteredMessages[index + 1], + ); return (