mirror of
https://github.com/block/buzz.git
synced 2026-11-04 08:21:48 +00:00
Update thread smoke coverage
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 ({
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user