Skip to content

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

  • Make auth-cache.ts API URL configurable via E2E_API_URL environment variable
  • Add playwright.local.config.ts for running tests against localhost:3000
  • Add refund-creditor-data.spec.ts with 5 comprehensive E2E tests for bank refund flow
  • Add visual regression baseline and test screenshots

Tests included

  1. should load refund page for a failed transaction - Verifies refund page loads correctly
  2. should display refund details and creditor form - Checks all form fields are present
  3. should fill creditor data and submit refund request - Tests form filling flow
  4. visual regression - refund page - Screenshot comparison for UI consistency
  5. should show transaction list with refund option - Verifies transaction list rendering

Usage

# Create .env.test.local with:
E2E_API_URL=http://localhost:3000/v1
TEST_TX_ID=T11  # or your transaction UID

# Run tests
npx env-cmd -f .env.test.local npx playwright test --config=playwright.local.config.ts

Test plan

  • All 5 tests pass against localhost:3000 API
  • Visual regression baseline created
  • Screenshots captured for documentation

- Make auth-cache.ts API URL configurable via E2E_API_URL env variable
- Add playwright.local.config.ts for running tests against localhost:3000
- Add refund-creditor-data.spec.ts with 5 E2E tests for bank refund flow
- Add visual regression baseline and test screenshots

Tests cover:
- Loading refund page for failed transactions
- Displaying refund details and creditor form
- Filling creditor data (name, address, city, country)
- Visual regression for refund page
- Transaction list with refund option

Usage:
  npx env-cmd -f .env.test.local npx playwright test --config=playwright.local.config.ts

Required .env.test.local:
  E2E_API_URL=http://localhost:3000/v1
  TEST_TX_ID=<transaction-uid>
- Change screenshot paths from e2e/screenshots/ to e2e/test-results/
- Add playwright-report-local/ to .gitignore
- Remove debug screenshots from repo (only keep visual regression baselines)

Debug screenshots are now automatically ignored while visual regression
baselines (*.spec.ts-*-chromium-darwin.png) remain tracked.
@TaprootFreak
Copy link
Collaborator Author

Superseded by #838 and #839. The refund UI no longer has creditor input fields, so these tests are obsolete.

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.

2 participants