BAI-15: refine dark mentor answer bubble
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
33f9db43b1
commit
a326df2a8d
@@ -2874,6 +2874,7 @@ test("mentor pins, custom order and streamed replies work together", async ({ pa
|
||||
await expect(page.locator("#mentorQuestion")).toHaveValue("哪些信号代表确认?");
|
||||
await expect(page.locator("#mentorMessages .mentor-message")).toHaveCount(messageCount);
|
||||
await page.locator("#themeToggle").click();
|
||||
await expect(page.locator("html")).not.toHaveClass(/theme-switching/);
|
||||
const userMessage = page.locator("#mentorMessages .mentor-message.user");
|
||||
const darkUserMessageStyle = await userMessage.evaluate((element) => ({
|
||||
background: getComputedStyle(element).backgroundColor,
|
||||
@@ -2888,22 +2889,25 @@ test("mentor pins, custom order and streamed replies work together", async ({ pa
|
||||
const darkMessageStyle = await answer.evaluate((element) => {
|
||||
const style = getComputedStyle(element);
|
||||
const content = element.querySelector(".mentor-message-content");
|
||||
const contentStyle = getComputedStyle(content);
|
||||
const heading = element.querySelector(".mentor-answer-heading");
|
||||
const label = element.querySelector(".mentor-message-label");
|
||||
const meta = element.querySelector("small");
|
||||
return {
|
||||
background: style.backgroundColor,
|
||||
border: style.borderTopColor,
|
||||
shadow: style.boxShadow,
|
||||
contentColor: getComputedStyle(content).color,
|
||||
contentBackground: contentStyle.backgroundColor,
|
||||
contentBorder: contentStyle.borderTopColor,
|
||||
contentColor: contentStyle.color,
|
||||
headingColor: getComputedStyle(heading).color,
|
||||
labelColor: getComputedStyle(label).color,
|
||||
metaColor: getComputedStyle(meta).color,
|
||||
};
|
||||
});
|
||||
expect(darkMessageStyle.background).not.toBe("rgb(255, 255, 255)");
|
||||
expect(darkMessageStyle.border).not.toBe("rgb(255, 255, 255)");
|
||||
expect(darkMessageStyle.background).toBe("rgba(0, 0, 0, 0)");
|
||||
expect(darkMessageStyle.shadow).toBe("none");
|
||||
expect(darkMessageStyle.contentBackground).toBe("rgb(32, 36, 40)");
|
||||
expect(darkMessageStyle.contentBorder).toBe("rgb(52, 58, 64)");
|
||||
expect(darkMessageStyle.contentColor).toBe("rgb(232, 234, 237)");
|
||||
expect(darkMessageStyle.headingColor).toBe("rgb(232, 234, 237)");
|
||||
expect(darkMessageStyle.labelColor).toBe("rgb(127, 137, 147)");
|
||||
|
||||
Reference in New Issue
Block a user