




















@@ -66,7 +66,7 @@ describe("Slack live QA runtime helpers", () => {
6666]);
6767});
686869-it("fails mention-gating when the SUT replies without the marker", async () => {
69+it("ignores delayed unrelated SUT replies during mention-gating", async () => {
7070const observedMessages: Array<unknown> = [];
7171await expect(
7272__testing.waitForSlackNoReply({
@@ -90,9 +90,9 @@ describe("Slack live QA runtime helpers", () => {
9090observationScenarioTitle: "Slack unmentioned bot message does not trigger",
9191sentTs: "1.000000",
9292sutIdentity: { userId: "U999999999" },
93-timeoutMs: 1_000,
93+timeoutMs: 10,
9494}),
95-).rejects.toThrow("unexpected Slack SUT reply observed");
95+).resolves.toBeUndefined();
9696const typedObservedMessages = observedMessages as Array<{
9797matchedScenario?: boolean;
9898text?: string;
@@ -106,6 +106,34 @@ describe("Slack live QA runtime helpers", () => {
106106expect(typedObservedMessages[0]?.userId).toBe("U999999999");
107107});
108108109+it("fails mention-gating when the SUT replies with the marker", async () => {
110+await expect(
111+__testing.waitForSlackNoReply({
112+channelId: "C123456789",
113+client: {
114+conversations: {
115+history: async () => ({
116+messages: [
117+{
118+text: "SLACK_QA_NOMENTION_MARKER",
119+ts: "2.000000",
120+user: "U999999999",
121+},
122+],
123+}),
124+},
125+} as never,
126+matchText: "SLACK_QA_NOMENTION_MARKER",
127+observedMessages: [],
128+observationScenarioId: "slack-mention-gating",
129+observationScenarioTitle: "Slack unmentioned bot message does not trigger",
130+sentTs: "1.000000",
131+sutIdentity: { userId: "U999999999" },
132+timeoutMs: 1_000,
133+}),
134+).rejects.toThrow("unexpected Slack SUT reply observed");
135+});
136+109137it("writes artifacts when Convex credential acquisition fails", async () => {
110138const outputDir = await fs.mkdtemp(path.join(tmpdir(), "openclaw-slack-qa-"));
111139const result = await runSlackQaLive({
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。