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
20 changes: 19 additions & 1 deletion tests/browser/message-navigation.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { test, expect } from "./fixture.mjs";
import { open, end, settle } from "./timeline.mjs";

test.use({ pluginFixtures: true, exactMessages: true });
test.use({
pluginFixtures: true,
exactMessages: true,
historyCounts: { alpha: 120, beta: 0 },
});
const thread = (page) =>
page.getByRole("region", { name: "Thread messages", exact: true });
const target = (app, id = app.exact.target.id) => ({
Expand Down Expand Up @@ -29,6 +33,16 @@ test("old root and reply beyond the first thread page open exactly; reclick and
const initialHeadQueries = app.report.queries.filter(
(q) => q.filter.top_level,
).length;
const head = app.report.queries.find(
({ community, filter }) =>
community === "primary" &&
filter.top_level &&
filter["#h"].includes("alpha"),
);
expect(
app.histories.get("primary/alpha").at(-head.filter.limit).created_at,
"the exact reply predates the initial channel window",
).toBeGreaterThan(app.exact.target.created_at);
// This navigation fixture deliberately registers a catch-all panel first.
// Disable it before exercising the actual Profiles provider.
await page.getByRole("button", { name: "Your profile", exact: true }).click();
Expand Down Expand Up @@ -75,6 +89,10 @@ test("old root and reply beyond the first thread page open exactly; reclick and
initialHeadQueries,
);
expect(app.report.queries.some((q) => q.filter.depth_limit)).toBe(true);
expect(
app.report.queries.some((q) => q.filter.thread_cursor !== undefined),
"the exact reply requires a second thread page",
).toBe(true);
expect(app.report.queries.filter((q) => q.filter.until)).toHaveLength(0);
// Use an unedited reply to exercise exact mention/profile identity plumbing.
expect(
Expand Down
5 changes: 5 additions & 0 deletions tests/browser/typing.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ test("Messages receives scoped typing through authenticated live traffic and exp
await expect(indicator).toHaveCount(0);
app.activity(); // same-second late pulse cannot resurrect completion
await expect(indicator).toHaveCount(0);
// Typing completion precedes the appended messages' virtual-list layout.
await expect(
page.getByText("Fixture completion", { exact: true }),
).toHaveCount(2);
await end(page);
const root = app.histories
.get("primary/alpha")
.find((e) => e.content === "Thread root 0");
Expand Down
Loading