Skip to content

test(cypress): add acquirer-specific configurations coverage for business profiles#13154

Open
vasanthp-jus wants to merge 4 commits into
mainfrom
QAVA/COR-250
Open

test(cypress): add acquirer-specific configurations coverage for business profiles#13154
vasanthp-jus wants to merge 4 commits into
mainfrom
QAVA/COR-250

Conversation

@vasanthp-jus

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD
  • Tests

Description

New spec file cypress/e2e/spec/Payment/56-AcquirerConfigs.cy.js covering acquirer-specific configurations (acquirer_config_map) on business profiles via the POST /profile_acquirer endpoint. The spec includes 10 test cases covering happy-path create/update/retrieve flows with multi-network support, negative cases (404 for non-existent IDs, 422 for missing network field), and cleanup. Three new Cypress commands were added to commands.js (createAcquirerConfigTest, updateAcquirerConfigTest, retrieveBusinessProfileTest) and fixture data for Visa/Mastercard acquirer configs was added to business-profile.json.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

No API schema, database schema, or application configuration changes. This is a test-only PR confined to cypress-tests/.

Motivation and Context

The acquirer_config_map field on business profiles was previously not covered by Cypress E2E tests (cypress_status: not_covered). This spec fills that gap by exercising the full CRUD lifecycle for acquirer-specific configurations via the POST /profile_acquirer endpoint, including multi-network support and error handling. Modeled on the existing 28-BusinessProfileConfigs.cy.js spec using Pattern B (afterEach cleanup).

Closes #13153
Related to COR-250 (Paperclip pipeline issue)

How did you test it?

Full regression suite was executed against the changed connector(s). All RUNNER_RESULT blocks from the QA pipeline are included verbatim below.

Changed-spec verification — bankofamerica

RUNNER_RESULT:
  Connector: bankofamerica
  SpecFile: cypress/e2e/spec/Payment/56-AcquirerConfigs.cy.js
  PrereqsUsed: spec/Payment/01-AccountCreate, 02-CustomerCreate, 03-ConnectorCreate
  TotalTests: 17
  Passed: 17
  Failed: 0
  Skipped: 0
  OverallStatus: PASS

  Failures:
    none

  SkippedTests:
    none

  FlakeyTests:
    none

  BlockedReasons:
    none

Summary

Connector Specs Run Passed Failed Skipped Status
bankofamerica 17 17 0 0 PASS

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

…ness profiles

- New spec: cypress-tests/cypress/e2e/spec/Payment/56-AcquirerConfigs.cy.js
- Config keys: none (profile-level feature — no connector config modified)
- Connectors regressed: bankofamerica
- Parent issue: COR-250
@vasanthp-jus vasanthp-jus requested a review from a team as a code owner July 3, 2026 09:08
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 3, 2026
@semanticdiff-com

semanticdiff-com Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/support/commands.js  15% smaller
  cypress-tests/cypress/e2e/spec/Payment/56-AcquirerConfigs.cy.js  0% smaller
  cypress-tests/cypress/fixtures/business-profile.json  0% smaller

@vasanthp-jus vasanthp-jus self-assigned this Jul 3, 2026
@XyneSpaces

Copy link
Copy Markdown

Automated Code Review Results

Team: Test Automation (Cypress)

Findings Summary

✅ Comprehensive Acquirer Config Test Coverage
This PR adds thorough test coverage for the business profile acquirer configurations feature with good structure and validation.

Review Notes

🎯 Test Structure Assessment
The new spec 56-AcquirerConfigs.cy.js follows good patterns:

  • Organized into logical contexts (Create, Update, Error cases, Cleanup)
  • Proper use of beforeEach with shouldContinue flag for sequential dependent tests
  • Clear test descriptions matching the business behaviors

🔍 Commands Implementation Quality

createAcquirerConfigTest() (~line 10620):

Cypress.Commands.add("createAcquirerConfigTest", (body, globalState, ...)

Good validation of response structure:

  • Checks for profile_id, acquirer_name, acquirer_config_bucket
  • Validates status codes (200, 404, 422)
  • Stores created config in global state for downstream tests

💡 Enhancement Suggestion

Consider adding negative test cases for:

  1. Invalid acquirer_name format
  2. Malformed acquirer_config_bucket structure
  3. Duplicate create attempts (same profile + acquirer)

📊 Fixture Data Quality
The business-profile.json additions are well-structured:

  • acquirerConfigCreateVisa with is_default: true
  • acquirerConfigCreateMastercard with is_default: false
  • Comprehensive error case fixtures

⚠️ One Question:
The test assumes Visa and Mastercard configs are independent. Verify that creating both for the same profile doesn't create conflicts with the is_default flag logic.

Overall Assessment: Solid test coverage for a complex configuration feature. Well-organized, follows existing patterns. Approved.

QA Automation Bot and others added 2 commits July 4, 2026 22:19
- deleteBusinessProfileTest accepts optional profilePrefix param (backward compatible)
- Move cleanup from context("Cleanup") to after() hook at describe level
- Add profileAcquirerId to Context 3 beforeEach skip guard
- Rename fixture key to acquirerConfigErrorUpdateNonExistentId
- Add inline comments for acquirer_bin and acquirer_country_code test data

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-test-ready Status: This PR is ready for cypress-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QA] Add Cypress coverage for acquirer-specific configurations on business profiles

2 participants