Skip to content

feat: add withLocale() to global browser configuration#204

Open
ThibaudDauce wants to merge 1 commit intopestphp:4.xfrom
ThibaudDauce:feature/global-withLocale
Open

feat: add withLocale() to global browser configuration#204
ThibaudDauce wants to merge 1 commit intopestphp:4.xfrom
ThibaudDauce:feature/global-withLocale

Conversation

@ThibaudDauce
Copy link
Copy Markdown

Summary

  • Add Configuration::withLocale() for global locale setting via pest()->browser()->withLocale('fr')
  • Add Playwright::setDefaultLocale() / Playwright::defaultLocale() static methods
  • Replace hardcoded 'en-US' in PendingAwaitablePage::buildAwaitablePage() with Playwright::defaultLocale()
  • Per-visit withLocale() override still works as before

Closes pestphp/pest#1659

Test plan

  • Unit tests for Configuration::withLocale() fluent API
  • Unit tests for Playwright::setDefaultLocale() / defaultLocale() state management
  • PHPStan passes with no errors

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.

Add withLocale() to global browser configuration

1 participant