Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ export const conversationActivityScenario = {
live.write(event(5, "answer.delta", { text: "\n\n" + "公开资料与待核实事项。\n\n".repeat(80) }));
await page.getByText("公开资料与待核实事项。", { exact: true }).first().waitFor();
const scroller = page.locator(".personal-channel-scroll");
// A responsive resize can leave scrollTop at zero before the follow
// frame runs. Start at a real end position so the next step moves up.
const startingPosition = await scroller.evaluate(node => {
node.scrollTop = node.scrollHeight;
node.dispatchEvent(new Event("scroll"));
return { top: node.scrollTop, remaining: node.scrollHeight - node.scrollTop - node.clientHeight };
});
assert.ok(startingPosition.top > 0 && startingPosition.remaining < 64,
"Exercise upward reading from the scrollable end, not an already-zero position");
await scroller.evaluate(node => { node.scrollTop = 0; node.dispatchEvent(new Event("scroll")); });
await page.getByRole("button", { name: "回到最新消息 ↓", exact: true }).waitFor();
live.write(event(6, "answer.delta", { text: "新增证据已经到达。" }));
Expand Down
Loading