BAI-15: group mentor answer bubbles
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
777af0cb8b
commit
228e08a5e2
@@ -489,8 +489,8 @@ async function mockApplication(page, authSession = session(), options = {}) {
|
||||
status: 200,
|
||||
contentType: "application/x-ndjson; charset=utf-8",
|
||||
body: [
|
||||
JSON.stringify({ type: "delta", content: "## 判断\n先看市场结构。\n\n" }),
|
||||
JSON.stringify({ type: "delta", content: "- 等待确认\n- 控制仓位" }),
|
||||
JSON.stringify({ type: "delta", content: "**判断**\n先看市场结构。\n\n" }),
|
||||
JSON.stringify({ type: "delta", content: "**操作**\n- 等待确认\n- 控制仓位" }),
|
||||
JSON.stringify({
|
||||
type: "meta",
|
||||
data_trade_date: "20260722",
|
||||
@@ -2818,9 +2818,24 @@ test("mentor directory exposes evidence filters and private owner metadata", asy
|
||||
await page.locator('[data-mentor-grade="B"]').click();
|
||||
await expect(page.locator("#mentorList .mentor-option")).toHaveCount(7);
|
||||
await page.locator('#mentorList [data-mentor-id="source-b"]').click();
|
||||
await expect(page.locator("#activeMentorName")).toHaveText("多源老师");
|
||||
await expect(page.locator("#activeMentorBadges")).toHaveText("B");
|
||||
await expect(page.locator("#mentorProfileName")).toHaveText("多源老师");
|
||||
await expect(page.locator("#mentorProfileBadges")).toHaveText("B");
|
||||
await expect(page.locator("#activeMentorEvidence")).toHaveText("公开访谈与多源材料");
|
||||
await expect(page.locator("#mentorView .mentor-chat-header")).toHaveCount(0);
|
||||
await expect(page.locator("#mentorChatForm #clearMentorChatButton")).toBeVisible();
|
||||
const avatarGeometry = await page.evaluate(() => {
|
||||
const directoryAvatar = document.querySelector("#mentorList .mentor-option.active .mentor-avatar");
|
||||
const profileAvatar = document.querySelector("#mentorProfileAvatar");
|
||||
return {
|
||||
directoryWidth: directoryAvatar.getBoundingClientRect().width,
|
||||
directoryRadius: getComputedStyle(directoryAvatar).borderRadius,
|
||||
profileWidth: profileAvatar.getBoundingClientRect().width,
|
||||
profileRadius: getComputedStyle(profileAvatar).borderRadius,
|
||||
};
|
||||
});
|
||||
expect(avatarGeometry.directoryWidth).toBeGreaterThanOrEqual(46);
|
||||
expect(avatarGeometry.profileWidth).toBeGreaterThan(avatarGeometry.directoryWidth);
|
||||
expect(avatarGeometry.profileRadius).toBe(avatarGeometry.directoryRadius);
|
||||
const mentorLibrary = await page.locator("#mentorView .mentor-sidebar").boundingBox();
|
||||
const mentorChat = await page.locator("#mentorView .mentor-chat-panel").boundingBox();
|
||||
const mentorProfile = await page.locator("#mentorView .mentor-profile-panel").boundingBox();
|
||||
@@ -2864,6 +2879,8 @@ test("mentor pins, custom order and streamed replies work together", async ({ pa
|
||||
await page.locator("#sendMentorQuestion").click();
|
||||
const answer = page.locator("#mentorMessages .mentor-message.assistant").last();
|
||||
await expect(answer).toContainText("先看市场结构。");
|
||||
await expect(answer.locator(".mentor-message-content")).toHaveCount(2);
|
||||
await expect(answer.locator(".mentor-answer-heading")).toHaveCount(2);
|
||||
await expect(answer.locator(".mentor-answer-list li")).toHaveCount(2);
|
||||
await expect(answer.locator("br")).toHaveCount(0);
|
||||
await expect(page.locator("#mentorMessages .assistant-stream-caret")).toHaveCount(0);
|
||||
|
||||
Reference in New Issue
Block a user