Skip to content

Conversation

@yinanazhou
Copy link
Member

@yinanazhou yinanazhou commented Jan 9, 2026

  • Replace blockGoogleTranslate with googleTranslateMode enum
  • Add three modes: 'block' (default), 'stub', and 'allow'
  • Add google-translate-stub.js to mimic basic GT functionalities
  • Update GT tests to use 'stub' mode
  • Non-GT tests now block GT requests entirely
  • This should make the GT E2E test more stable

refs: #494


Note

Refactors E2E Google Translate handling to be configurable and stable.

  • Replace blockGoogleTranslate with googleTranslateMode option in tests/fixtures/pages.ts supporting 'block', 'stub', and 'allow'
  • Add request routing: block GT script, fulfill with local stub (google-translate-stub.js), or allow real script
  • New tests/fixtures/google-translate-stub.js implementing minimal google.translate.TranslateElement, cookie-driven lang switching, and deterministic DOM updates
  • Update desktop and mobile GT specs to test.use({ googleTranslateMode: 'stub' })

Written by Cursor Bugbot for commit 1b62609. This will update automatically on new commits. Configure here.

- Replace `blockGoogleTranslate` with `googleTranslateMode` enum
- Add three modes: 'block' (default), 'stub', and 'allow'
- Add `google-translate-stub.js` to mimic basic GT functionalities
- Update GT tests to use 'stub' mode
- Non-GT tests now block GT requests entirely
- This should make the GT E2E test more stable

refs: #494
@yinanazhou yinanazhou changed the title test(e2e): refactor Google Translate with configmodes test(e2e): refactor Google Translate with config modes Jan 9, 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.

2 participants