Skip to content

Conversation

@MintsInc
Copy link
Member

Summary

Add support for origin: "path" in undo.json definitions, allowing BDD test undo operations to reference path parameters from the original request URL.

This aligns the TypeScript v2 client with implementations already done in:

Problem

BDD test undo operations could only extract parameters from response bodies or request bodies. This prevented proper cleanup of resources where identifiers exist only in the request URL path (e.g., POST /integrations/{integration_name}/accounts).

Changes

1. private/bdd_runner/src/support/world.ts

  • Added pathParameters field to World class to track path parameters

2. private/bdd_runner/src/support/undo.ts

  • Updated buildUndoFor function signature to accept pathParameters parameter
  • Refactored parameter processing logic to handle origin: "path" following the same pattern as other origins
  • Path parameters support both attribute name and original name lookups for compatibility

3. private/bdd_runner/src/step_definitions/request_steps.ts

  • Updated buildUndoFor call to pass this.opts as pathParameters (contains all request parameters including path ones)

Test Plan

  • Basic syntax validation passed
  • Changes follow the same pattern as existing code
  • Implementation matches other client implementations

🤖 Generated with Claude Code

BDD test undo operations previously could only extract parameters from
response bodies or request bodies. This prevented proper cleanup of
resources where identifiers exist only in the request URL path.

This adds support for origin: "path" in undo.json definitions, allowing
undo operations to reference path parameters from the original request.

- Added pathParameters field to World class
- Modified buildUndoFor to accept and handle path parameters
- Updated step definitions to pass path parameters during request setup

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@MintsInc MintsInc marked this pull request as ready for review January 21, 2026 12:22
@MintsInc MintsInc requested review from a team as code owners January 21, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants