From b23f380539fd1b074a035ca9a9af5dec3de679d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=B7=E5=B8=83=E5=8A=B3=E5=A4=96=20=C2=B7=20=E8=B4=BE?= =?UTF-8?q?=E8=B4=B5?= <472285740@qq.com> Date: Fri, 11 Jul 2025 15:22:08 +0800 Subject: [PATCH] fix(core): remove scroller visiblility test (#13159) ## Summary by CodeRabbit * **Tests** * Removed the test verifying the scroll indicator appears when there are many chat messages. --- .../e2e/basic/chat.spec.ts | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/tests/affine-cloud-copilot/e2e/basic/chat.spec.ts b/tests/affine-cloud-copilot/e2e/basic/chat.spec.ts index d78519c8a..0e3472de4 100644 --- a/tests/affine-cloud-copilot/e2e/basic/chat.spec.ts +++ b/tests/affine-cloud-copilot/e2e/basic/chat.spec.ts @@ -175,56 +175,6 @@ test.describe('AIBasic/Chat', () => { await expect(firstAnswer.getByTestId('chat-actions')).toBeVisible(); }); - test('should show scroll indicator when there are many messages', async ({ - loggedInPage: page, - utils, - }) => { - // Set window height to 100px to ensure scroll indicator appears - await page.setViewportSize({ width: 1280, height: 400 }); - - // Type and send a message - await utils.chatPanel.makeChat( - page, - 'Hello, give a introduction about the moon. Answer in 500 words.' - ); - - await utils.chatPanel.waitForHistory(page, [ - { - role: 'user', - content: - 'Hello, give a introduction about the moon. Answer in 500 words.', - }, - { - role: 'assistant', - status: 'success', - }, - ]); - - // Wait for the answer to be completely rendered - await page.waitForTimeout(1000); - - // Scroll up to trigger scroll indicator - const chatMessagesContainer = page.getByTestId( - 'chat-panel-messages-container' - ); - await chatMessagesContainer.evaluate(el => { - el.scrollTop = 0; - }); - - const scrollDownIndicator = page.getByTestId( - 'chat-panel-scroll-down-indicator' - ); - - // Verify scroll indicator appears - await expect(scrollDownIndicator).toBeVisible(); - - // Click scroll indicator to scroll to bottom - await scrollDownIndicator.click(); - - // Verify scroll indicator disappears - await expect(scrollDownIndicator).not.toBeVisible(); - }); - test('should show error when request failed', async ({ loggedInPage: page, utils,