Skip to content

fix(ci): skip unnecessary waits in Cypress mock server replay mode#13323

Open
venkatakarthikm-maker wants to merge 4 commits into
mainfrom
payloadfix
Open

fix(ci): skip unnecessary waits in Cypress mock server replay mode#13323
venkatakarthikm-maker wants to merge 4 commits into
mainfrom
payloadfix

Conversation

@venkatakarthikm-maker

@venkatakarthikm-maker venkatakarthikm-maker commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

In mock/replay mode (CYPRESS_MOCK_SERVER=true), several Cypress specs have hardcoded cy.wait() calls designed to let real-world TTLs expire. Since cassettes are already recorded with the final state, these waits serve no purpose in replay and inflate mock batch CI runtime significantly.

Closes #13327

Waits removed in mock mode

Spec Wait removed
00-CoreFlows.cy.js 65s (client secret session expiry)
52-ClientSessionValidation.cy.js 61s (Redis TTL)
33-ManualRetry.cy.js 2 × 35s (manual retry cutoff)
40-ExternalVault.cy.js 5 × 10s (VGS vault token polling)
52-AlternativePayments.cy.js 5s (Skrill sync poll)

~251 seconds saved per connector in mock batches.

Additional Changes

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

Motivation and Context

Fixes #13327 — mock batch 3 (nmi calida adyen peachpayments payload) was taking 1–1.5 hours partly due to these waits running unnecessarily in replay mode.

How did you test it?

Guards use the existing isMockServer() helper from mitmProxy.js. Live/mandatory test runs are unaffected — the waits only skip when CYPRESS_MOCK_SERVER=true.

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

@venkatakarthikm-maker venkatakarthikm-maker self-assigned this Jul 15, 2026
@venkatakarthikm-maker
venkatakarthikm-maker requested review from a team as code owners July 15, 2026 09:47
@venkatakarthikm-maker venkatakarthikm-maker 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

@venkatakarthikm-maker
venkatakarthikm-maker removed the request for review from a team July 15, 2026 09:52
@HS-QUALIBOT HS-QUALIBOT changed the title Payloadfix fix(ci): skip unnecessary waits in Cypress mock server replay mode Jul 15, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@venkatakarthikm-maker venkatakarthikm-maker added the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@venkatakarthikm-maker venkatakarthikm-maker added the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@venkatakarthikm-maker venkatakarthikm-maker added the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13323   +/-   ##
=======================================
  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.

@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 15, 2026
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.

fix(ci): skip unnecessary waits in Cypress mock server replay mode

1 participant