Update thread smoke coverage

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Thomas Petersen
2026-05-04 13:56:00 -04:00
parent bb905767db
commit 57b10f3940
3 changed files with 14 additions and 3 deletions

View File

@@ -219,7 +219,7 @@ export function MessageThreadPanel({
>
{threadReplies.length > 0 ? (
<div className="space-y-2">
{threadReplies.map((entry, index) => {
{threadReplies.map((entry) => {
return (
<div key={entry.message.id}>
<MessageRow

View File

@@ -424,7 +424,8 @@ test("opens a single-level thread panel with inline expansion", async ({
const firstReplySummaryRow = threadReplies.locator(
`[data-thread-head-id="${firstReplyId}"]`,
);
await expect(firstReplySummaryRow).toHaveCount(0);
await expect(firstReplySummaryRow).toHaveCount(1);
await expect(firstReplySummaryRow).toContainText("2 replies");
await expect(rootSummaryRow).toContainText("18 replies");
await expect(
@@ -447,6 +448,16 @@ test("opens a single-level thread panel with inline expansion", async ({
});
})
.toBeLessThan(160);
await firstReplySummaryRow.click();
await expect(
threadReplies.getByTestId("message-row").filter({ hasText: nestedReply }),
).toHaveCount(0);
await expect(
threadReplies
.getByTestId("message-row")
.filter({ hasText: nestedReplyFromBob }),
).toHaveCount(0);
});
test("thread panel width uses session storage and reset handle", async ({

View File

@@ -361,7 +361,7 @@ test("supports multiline drafts with Ctrl+Enter and sends with Enter", async ({
await page.goto("/");
await page.getByTestId("channel-general").click();
await expect(page.getByTestId("chat-title")).toHaveText("general");
await expect(page.getByTestId("send-message")).toContainText("Send");
await expect(page.getByRole("button", { name: "Send message" })).toBeVisible();
const initialInputHeight = await input.evaluate(
(element) => (element as HTMLElement).clientHeight,
);