mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 18:12:52 +00:00
fix(ci): repair seam drift and matrix test timing
This commit is contained in:
@@ -194,30 +194,25 @@ describe("registerMatrixMonitorEvents verification routing", () => {
|
||||
});
|
||||
|
||||
it("still posts fresh verification completions", async () => {
|
||||
vi.useFakeTimers();
|
||||
vi.setSystemTime(new Date("2026-03-14T13:10:00.000Z"));
|
||||
try {
|
||||
const { sendMessage, roomEventListener } = createHarness();
|
||||
const { sendMessage, roomEventListener } = createHarness();
|
||||
|
||||
roomEventListener("!room:example.org", {
|
||||
event_id: "$done-fresh",
|
||||
sender: "@alice:example.org",
|
||||
type: "m.key.verification.done",
|
||||
origin_server_ts: Date.now(),
|
||||
content: {
|
||||
"m.relates_to": { event_id: "$req-fresh" },
|
||||
},
|
||||
});
|
||||
roomEventListener("!room:example.org", {
|
||||
event_id: "$done-fresh",
|
||||
sender: "@alice:example.org",
|
||||
type: "m.key.verification.done",
|
||||
origin_server_ts: Date.now(),
|
||||
content: {
|
||||
"m.relates_to": { event_id: "$req-fresh" },
|
||||
},
|
||||
});
|
||||
|
||||
await vi.waitFor(() => {
|
||||
expect(sendMessage).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
expect(getSentNoticeBody(sendMessage)).toContain(
|
||||
"Matrix verification completed with @alice:example.org.",
|
||||
);
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
await vi.dynamicImportSettled();
|
||||
await vi.waitFor(() => {
|
||||
expect(sendMessage).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
expect(getSentNoticeBody(sendMessage)).toContain(
|
||||
"Matrix verification completed with @alice:example.org.",
|
||||
);
|
||||
});
|
||||
|
||||
it("forwards reaction room events into the shared room handler", async () => {
|
||||
|
||||
Reference in New Issue
Block a user