Skip to content

Conversation

@pettinarip
Copy link
Member

Adds contract tests that validate form field mappings against the Salesforce schema to prevent integration failures from schema mismatches.

Changes

  • New test suite (sf-contract.test.ts) that queries Salesforce metadata API to verify:

    • All mapped fields exist in Salesforce for RFP, Direct Grant, Wishlist, and Office Hours forms
    • Picklist values match Salesforce options (Profile Type, Domain, Output, Timezone, Currency, Office Hours Request Type)
    • Hardwired fields and common fields are present
  • Salesforce metadata utilities (lib/sf/metadata.ts) with caching to fetch object schemas efficiently

  • Updated test configuration with extended timeout for Salesforce API calls

Benefits

  • Early detection of schema mismatches before production deployment
  • Prevents runtime errors from missing or renamed Salesforce fields
  • Validates picklist values to ensure form options match Salesforce configuration
  • Automated validation runs in CI/CD pipeline

Testing

Tests run against live Salesforce metadata API (requires SF credentials in test environment).

@corwintines corwintines self-assigned this Nov 19, 2025
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.

3 participants