케이스 이어하기 UI와 공통 탭·이미지 복구를 반영
This commit is contained in:
parent
72353ecd82
commit
f1b80676c1
38 changed files with 3581 additions and 455 deletions
|
|
@ -471,6 +471,34 @@ test.describe("회기 대화 — 텍스트 턴과 SSE 스트림", () => {
|
|||
).toBeVisible();
|
||||
expect(stream.texts[0]).toHaveLength(2000);
|
||||
expect(stream.texts[0]).toBe(longText);
|
||||
|
||||
const bubbleMetrics = await learnerUtterance(page)
|
||||
.locator(".sx-utt__line")
|
||||
.evaluate((element) => {
|
||||
const bubble = element as HTMLElement;
|
||||
const utterance = bubble.closest<HTMLElement>(".sx-utt");
|
||||
const body = bubble.closest<HTMLElement>(".sx-utt__body");
|
||||
if (!utterance || !body) return null;
|
||||
|
||||
const controls = Array.from(body.children).filter((child) => child !== bubble);
|
||||
const controlWidth = controls.reduce(
|
||||
(total, child) => total + (child as HTMLElement).getBoundingClientRect().width,
|
||||
0,
|
||||
);
|
||||
const gap = Number.parseFloat(getComputedStyle(body).gap) || 0;
|
||||
|
||||
return {
|
||||
availableWidth:
|
||||
utterance.getBoundingClientRect().width - controlWidth - gap * controls.length,
|
||||
bubbleWidth: bubble.getBoundingClientRect().width,
|
||||
bubbleClientWidth: bubble.clientWidth,
|
||||
bubbleScrollWidth: bubble.scrollWidth,
|
||||
};
|
||||
});
|
||||
|
||||
expect(bubbleMetrics).not.toBeNull();
|
||||
expect(bubbleMetrics!.bubbleWidth).toBeGreaterThanOrEqual(bubbleMetrics!.availableWidth - 1);
|
||||
expect(bubbleMetrics!.bubbleScrollWidth).toBeLessThanOrEqual(bubbleMetrics!.bubbleClientWidth + 1);
|
||||
await expectNoHorizontalOverflow(page);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue