Skip to content

[QA] Add Cypress coverage for Webhook Config Disabled Events on bankofamerica #13047

Description

@HS-QUALIBOT

QA: Add Cypress Coverage for Webhook Config Disabled Events on bankofamerica

Summary

Added Cypress test coverage for the Webhook Config Disabled Events feature in 28-BusinessProfileConfigs.cy.js. This covers the ability to disable specific webhook events (payment, refund, payout) per connector at the business profile level.

Test Cases Added (10 new tests)

  • Create Business Profile with webhook disabled events (payment_statuses_enabled, refund_statuses_enabled, payout_statuses_enabled) — happy path
  • Update Business Profile webhook disabled events (change payment_failed_enabled, expand payment_statuses_enabled, add initiated to payout_statuses_enabled) — happy path
  • Delete Business Profile (cleanup) — happy path
  • Create Business Profile (setup for connector webhook registration context) — happy path
  • connector-create-call-test (setup connector under webhook profile) — happy path
  • Register connector webhook with all_events — expect 400 IR_20 (bankofamerica does not support webhook registration) — negative
  • Register connector webhook with specific_event (payment_succeeded) — expect 400 IR_20 — negative
  • Retrieve connector webhooks — expect 200 with empty webhooks list — edge case
  • Delete Business Profile (cleanup for connector webhook context) — happy path
  • Create Business Profile with invalid refund_statuses_enabled (succeeded) — expect 400 deserialize error — negative

Files Modified

  • cypress-tests/cypress/e2e/configs/Payment/Commons.js — Added WebhookConfig key (Create, Update, RegisterWebhookAllEvents, RegisterWebhookSpecificEvent, RetrieveWebhook)
  • cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js — Added WebhookConfig key with connector-specific responses (400 IR_20 for webhook registration, 200 with empty webhooks for retrieval)
  • cypress-tests/cypress/e2e/spec/Payment/28-BusinessProfileConfigs.cy.js — Added new contexts for webhook disabled events and connector webhook registration/retrieval
  • cypress-tests/cypress/support/commands.js — Added new commands: updateBusinessProfileWebhookConfigTest, registerConnectorWebhookTest, retrieveConnectorWebhooksTest; modified deleteBusinessProfileTest (backward compatible)

Why

Feature gap: Webhook Config Disabled Events had no Cypress test coverage. This PR adds comprehensive test coverage including happy paths, negative cases, and edge cases for the bankofamerica connector.

Runner Results

RUNNER_RESULT:
  Connector: bankofamerica
  SpecFile: cypress/e2e/spec/Payment/28-BusinessProfileConfigs.cy.js
  PrereqsUsed: spec/Payment/01-,02-,03-
  TotalTests: 48
  Passed: 48
  Failed: 0
  Skipped: 0
  OverallStatus: PASS

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions