fix(qa): retain crabline delivery targets · openclaw/openclaw@009d6b2
vincentkoc
·
2026-06-24
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -115,6 +115,40 @@ describe("crabline transport", () => {
|
115 | 115 | direction: "outbound", |
116 | 116 | text: "assistant via fake telegram", |
117 | 117 | }); |
| 118 | + |
| 119 | +await transport.state.reset(); |
| 120 | +const delivery = transport.buildAgentDelivery({ target: "dm:qa-operator" }); |
| 121 | +const { response: directResponse, release: directRelease } = await fetchWithSsrFGuard({ |
| 122 | +url: `${telegram?.apiRoot}/bot${telegram?.botToken}/sendMessage`, |
| 123 | +init: { |
| 124 | +body: JSON.stringify({ |
| 125 | +chat_id: delivery.to, |
| 126 | +text: "assistant after reset", |
| 127 | +}), |
| 128 | +headers: { "content-type": "application/json" }, |
| 129 | +method: "POST", |
| 130 | +}, |
| 131 | +policy: { allowPrivateNetwork: true }, |
| 132 | +auditContext: "qa-lab-crabline-transport-reset-test", |
| 133 | +}); |
| 134 | +await directRelease(); |
| 135 | +expect(directResponse.ok).toBe(true); |
| 136 | + |
| 137 | +await expect( |
| 138 | +transport.state.waitFor({ |
| 139 | +direction: "outbound", |
| 140 | +kind: "message-text", |
| 141 | +textIncludes: "assistant after reset", |
| 142 | +timeoutMs: 1_000, |
| 143 | +}), |
| 144 | +).resolves.toMatchObject({ |
| 145 | +conversation: { |
| 146 | +id: "qa-operator", |
| 147 | +kind: "direct", |
| 148 | +}, |
| 149 | +direction: "outbound", |
| 150 | +text: "assistant after reset", |
| 151 | +}); |
118 | 152 | } finally { |
119 | 153 | await transport.cleanup?.(); |
120 | 154 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。