Skip to content

test: add createInstallation e2e test with proper connection data handling#78

Open
dionlow wants to merge 1 commit into
dl-modular-e2e-testsfrom
dl-e2e-create-installation
Open

test: add createInstallation e2e test with proper connection data handling#78
dionlow wants to merge 1 commit into
dl-modular-e2e-testsfrom
dl-e2e-create-installation

Conversation

@dionlow
Copy link
Copy Markdown
Contributor

@dionlow dionlow commented Dec 4, 2025

Summary

  • Adds end-to-end test for the createInstallation tool
  • Refactors connection and installation adapters to properly handle connection data
  • Improves type safety and data flow in installation creation process

Changes

  • Updated connection and installation adapters with better connection data handling

This PR stacks on top of #dl-modular-e2e-tests

…dling

Add comprehensive end-to-end test for createInstallation tool that:
- Checks for existing Salesforce connection and retrieves its data
- Uses connection's groupRef to avoid group mismatch errors
- Detects and skips creation if installation already exists
- Validates installation creation with proper assertions

Also includes code improvements:
- Refactor installation helper to extract requestBody for better debugging
- Add proper TypeScript typing for ListInstallationsInstallation
- Clean up connection helper with better type checking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link
Copy Markdown
Collaborator

@caiopizzol caiopizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good!

@@ -1,4 +1,5 @@
import { SDKNodePlatform } from '@amp-labs/sdk-node-platform';
import { ListInstallationsInstallation } from '@amp-labs/sdk-node-platform/src/models/operations/listinstallations';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this import path uses src/ which I think won't exist in the published package.

either import from models/operations/listinstallations or re-export these types from the main entry point at the SDK


const toolResult = toolResults[0].result;
assert('created' in toolResult, 'Result should have "created" field');
assert(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we assert toolResult.created === true? looks likeit passes even if the installation failed to create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants