Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ describe("MessagesTimeline work rows", () => {
});

it("keeps following a streaming turn after a heading is expanded at the bottom", async () => {
const session = cdp();
// Exercise end-follow independently of smooth-scroll animation timing.
await session.send("Emulation.setEmulatedMedia", {
features: [{ name: "prefers-reduced-motion", value: "reduce" }],
});
await using _media = {
[Symbol.asyncDispose]: async () => {
await session.send("Emulation.setEmulatedMedia", { features: [] });
},
};
const props = { ...baseProps(), isWorking: true };
const runId = RunId.make("live-run");
const container = document.createElement("div");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,16 @@ it.each([true, false])(
});
await using screen = await renderSection({ canList, projects: [project, second] });
await screen.getByRole("combobox").click();
if (canList) await userEvent.keyboard("{ArrowDown}{Enter}");
else await screen.getByRole("option", { name: "Second", exact: true }).click();
if (canList) {
await expect
.element(screen.getByRole("option", { name: project.title, exact: true }))
.toHaveFocus();
await userEvent.keyboard("{ArrowDown}");
await expect
.element(screen.getByRole("option", { name: "Second", exact: true }))
.toHaveFocus();
await userEvent.keyboard("{Enter}");
} else await screen.getByRole("option", { name: "Second", exact: true }).click();
await expect
.element(
screen.getByRole("combobox", {
Expand Down
Loading