fix: move sent times below Agent message bubbles
This commit is contained in:
1 parent
95e701c4f3
commit
154a21a295
4 files changed
+28
-6
No files matched your search
@@ -335,12 +335,19 @@ test('personal cloud Agent identity, configuration and separate published chat i
|
||||
const answerTime = formalChat.locator('.agent-chat-message[data-role="assistant"] time');
|
||||
await expect(answerTime).toHaveAttribute('datetime', '2026-10-13T09:25:40.000Z');
|
||||
await expect(answerTime).toHaveAccessibleName(/^回复时间:/);
|
||||
const bubbleStyle = await userBubble.evaluate(element => {
|
||||
const bubbleBody = userBubble.locator('.agent-chat-message-body');
|
||||
const bubbleStyle = await bubbleBody.evaluate(element => {
|
||||
const style = getComputedStyle(element);
|
||||
return { background: style.backgroundColor, radius: Number.parseFloat(style.borderTopLeftRadius) };
|
||||
});
|
||||
expect(bubbleStyle.background).not.toBe('rgba(0, 0, 0, 0)');
|
||||
expect(bubbleStyle.radius).toBeGreaterThan(0);
|
||||
const bodyBounds = await bubbleBody.boundingBox();
|
||||
const sentTimeBounds = await userBubble.locator('time').boundingBox();
|
||||
expect(bodyBounds).not.toBeNull();
|
||||
expect(sentTimeBounds).not.toBeNull();
|
||||
expect(sentTimeBounds!.y).toBeGreaterThanOrEqual(bodyBounds!.y + bodyBounds!.height + 6);
|
||||
await expect(userBubble).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)');
|
||||
await expect(formalChat.locator('.agent-chat-message[data-role="assistant"]').getByRole('img', { name: '我的写作搭档头像', exact: true })).toHaveAttribute('src', avatar.icon_url);
|
||||
await expect(formalChat.getByLabel('消息', { exact: true })).toBeInViewport();
|
||||
const transcriptBounds = await formalChat.getByTestId('cloud-chat-messages').boundingBox();
|
||||
|
||||
Reference in new issue
Block a user