Skip to content

Commit 27c90bb

Browse files
committed
test(dogfood): read the refusal envelope's code and message
Claude-Session: https://claude.ai/code/session_0115tbh4XfgivQD2RpHHwdMz Co-authored-by: Claude <noreply@anthropic.com>
1 parent 582dd2f commit 27c90bb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎packages/qa/dogfood/test/flow-screen-record-link.dogfood.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@ describe('objectstack verify FLOW SCREEN RECORD LINK (#25872): a result screen l
111111
for (const inputs of [{ account_link: createdAccountId }, { contact_link: null }]) {
112112
const refused = await resume(runId, inputs);
113113
expect(refused.status, JSON.stringify(inputs)).toBe(400);
114-
const text = await refused.text();
115-
expect(text).toContain('INVALID_SCREEN_INPUT');
116-
expect(text).toContain(`Screen field "${Object.keys(inputs)[0]}" shows a record and takes no value`);
114+
const body = (await refused.json()) as any;
115+
expect(body.error?.code).toBe('INVALID_SCREEN_INPUT');
116+
expect(String(body.error?.message)).toContain(
117+
`Screen field "${Object.keys(inputs)[0]}" shows a record and takes no value`,
118+
);
117119
}
118120

119121
// Refused, not consumed: the resume that leaves the links out finishes the run.

0 commit comments

Comments
 (0)