Skip to content

test(cypress): RealTimePayment for xendit#13339

Merged
vasanthp-jus merged 14 commits into
mainfrom
QAVASA/HYP-161
Jul 22, 2026
Merged

test(cypress): RealTimePayment for xendit#13339
vasanthp-jus merged 14 commits into
mainfrom
QAVASA/HYP-161

Conversation

@HS-QUALIBOT

Copy link
Copy Markdown
Collaborator

Type of Change

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

Description

Add Cypress test coverage for Xendit QRIS RealTimePayment payment authorization and recurring mandates. The spec 31-RealTimePayment.cy.js now includes QRIS base payment (5 tests) and QRIS mandate (4 tests) context blocks, with mock-based QR code flow handling via mockReplayQris. The DuitNow context was removed and replaced with QRIS-specific config keys (Qris, QrisRetrieve, QrisMandate) in the Xendit connector config. The expectedIntentStatus for QRIS retrieve flows was updated to requires_customer_action to reflect the pending nature of QRIS payments in the sandbox environment.

Additional Changes

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

No API schema changes. No database schema changes. No application configuration changes.

Motivation and Context

This change adds test coverage for the Xendit connector's QRIS (Quick Response Indonesian Standard) RealTimePayment flow, which was previously untested. QRIS is a widely used payment method in Indonesia, and this coverage ensures that both base payment authorization and recurring mandate setups are validated. Due to sandbox limitations, payment status remains at requires_customer_action (PENDING) — tests validate request payload structure, API response handling, and status transitions up to that point.

Related to HYP-161 — Xendit Connector - Qris RealTimePayment Testing.

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 — xendit

RUNNER_RESULT:
  Connector: xendit
  SpecFile: cypress-tests/cypress/e2e/spec/Payment/31-RealTimePayment.cy.js
  TotalTests: 15
  Passed: 15
  Failed: 0
  Skipped: 0
  OverallStatus: PASS
  Failures: NONE
  SkippedTests: NONE
  FlakeyTests: NONE
  BlockedReasons: NONE

Summary

Connector Specs Run Passed Failed Skipped Status
xendit 15 15 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

Closes #13338
Related to HYP-161

QA Automation Bot and others added 2 commits July 14, 2026 01:13
- Add Qris + QrisRetrieve config keys to Commons.js real_time_payment_pm
- Add real_time_payment_pm section to Xendit.js with PaymentIntent, Qris,
  QrisRetrieve, QrisMandate configs
- Add case 'qris' to confirmRealTimePaymentCallTest in commands.js
- Add QRIS automatic capture + QRIS mandate setup context blocks to
  31-RealTimePayment.cy.js

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- New spec: cypress-tests/cypress/e2e/spec/Payment/31-RealTimePayment.cy.js
- Config keys: Qris, QrisRetrieve, QrisMandate (real_time_payment_pm)
- Connectors regressed: xendit
- Parent issue: HYP-161
@HS-QUALIBOT
HS-QUALIBOT requested a review from a team as a code owner July 15, 2026 17:44
@HS-QUALIBOT HS-QUALIBOT added the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@semanticdiff-com

semanticdiff-com Bot commented Jul 15, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 16, 2026
@vasanthp-jus vasanthp-jus self-assigned this Jul 16, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 16, 2026
QA Automation Bot and others added 2 commits July 16, 2026 16:14
- New spec context: DuitNow automatic capture flow in 31-RealTimePayment.cy.js
- Config keys: DuitNow, DuitNowRetrieve in Xendit.js
- Runner verification: 12 tests, 9 passed, 0 failed, 3 skipped (PASS)
- Parent issue: HYP-161

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- Removed DuitNow context from 31-RealTimePayment.cy.js (69 lines deleted)
- Removed DuitNow + DuitNowRetrieve config keys from Xendit.js (33 lines deleted)
- Removed mockReplayQris function from mitmProxy.js (12 lines deleted)
- Removed mockReplayQris import + isReplayMode() call from commands.js (4 lines deleted)
- Handle Redirection NOT restored (QRIS-only scope per board review)
- Parent issue: HYP-161

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 16, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 16, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@bb924e5). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13339   +/-   ##
=======================================
  Coverage        ?        0           
=======================================
  Files           ?        0           
  Lines           ?        0           
  Branches        ?        0           
=======================================
  Hits            ?        0           
  Misses          ?        0           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

QA Automation Bot and others added 2 commits July 17, 2026 13:47
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 17, 2026
…ent spec

- Restored original DuitNow automatic capture flow context from origin/main as first context block
- QRIS automatic capture flow context left unchanged
- QRIS mandate setup flow context left unchanged
- Parent issue: HYP-161

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
},
},
},
QrisRetrieve: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This config is not required , you can use Qris to retrieve call

cy.retrievePaymentCallTest({
globalState,
data,
expectedIntentStatus: "requires_customer_action",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not required the status will be verified from the config itself and remove everywhere added

cy.retrievePaymentCallTest({
globalState,
data,
expectedIntentStatus: "requires_customer_action",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove this

@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
likhinbopanna
likhinbopanna previously approved these changes Jul 20, 2026
billing: standardBillingAddress,
},
}),
QrisRetrieve: getCustomExchange({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We havent used this config anywhere then why this config required remove it

Gnanasundari24
Gnanasundari24 previously approved these changes Jul 20, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
vasanthp-jus
vasanthp-jus previously approved these changes Jul 20, 2026
@vasanthp-jus
vasanthp-jus enabled auto-merge July 20, 2026 19:36
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 20, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 21, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 21, 2026
@vasanthp-jus vasanthp-jus added the S-test-ready Status: This PR is ready for cypress-tests label Jul 21, 2026
The MITM mock Cypress test for bluesnap was failing with:
  TypeError: Cannot read properties of undefined (reading 'status')

Root cause: `31-RealTimePayment.cy.js` accesses
`real_time_payment_pm["QrisMandate"]` but `QrisMandate` only existed
in `Xendit.js`, not in `Commons.js`. When bluesnap (which has no
`real_time_payment_pm`) was used, the merged config had no `QrisMandate`
key, returning `undefined`. This was passed to `defaultErrorHandler` as
`response_data`, causing `response_data.status` to throw.

Fix: Add `QrisMandate` to `Commons.js` `real_time_payment_pm` with a
default 501 "not implemented" response via `getCustomExchange` (no
Response field = defaults to 501). Connectors that support QRIS mandates
(like Xendit) can still override with their own definition.
auto-merge was automatically disabled July 21, 2026 10:06

Head branch was pushed to by a user without write access

Copilot AI dismissed stale reviews from Gnanasundari24 and vasanthp-jus via 33e3d13 July 21, 2026 10:06
Copilot AI requested a review from Gnanasundari24 July 21, 2026 10:06
@vasanthp-jus
vasanthp-jus added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 38a4f87 Jul 22, 2026
50 of 53 checks passed
@vasanthp-jus
vasanthp-jus deleted the QAVASA/HYP-161 branch July 22, 2026 08:14
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 RealTimePayment on xendit

5 participants