Skip to content

[BUG FIX] [MER-5500] Fix Playwright payment session token transport#6733

Merged
nicocirio merged 2 commits into
masterfrom
MER-5500-automated-payment-provider-integration-part2
Jul 17, 2026
Merged

[BUG FIX] [MER-5500] Fix Playwright payment session token transport#6733
nicocirio merged 2 commits into
masterfrom
MER-5500-automated-payment-provider-integration-part2

Conversation

@nicocirio

@nicocirio nicocirio commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Jira

https://eliterate.atlassian.net/browse/MER-5500

Summary

  • fix the Playwright student payment login helper to send the scenario token in the x-playwright-scenario-token header
  • add a focused Playwright regression spec for the helper contract
  • keep the backend contract unchanged

Bug Origin

The regression was introduced in the AI review commit:
f88908e

That change hardened the backend session helper to accept the scenario token only from the x-playwright-scenario-token header, but the Playwright payment helper still sent the token in the query string. As a result, payment smoke tests could stop at /test/log_in_user instead of reaching the seeded section.

Fix

  • update the Playwright helper to send the token via header instead of query params
  • add a regression spec that verifies the header is present and the token query param is absent

Validation

  • cd assets/automation && npx playwright test tests/torus/student_payment/support.spec.ts
  • cd assets/automation && npx playwright test tests/torus/student_payment/payment-unlock.spec.ts --grep "learner unlocks a paid section with a payment code"
  • mix format
  • mix compile
  • yarn --cwd assets run format
  • yarn --cwd assets run check-types
  • yarn --cwd assets run deploy

Image

image

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Risk score: 0 → risk/low

Generated by 🚫 dangerJS against cc6bcaa

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

AI Review —

No issues found

@nicocirio
nicocirio marked this pull request as ready for review July 17, 2026 15:10
@nicocirio
nicocirio merged commit b6119ce into master Jul 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants