-
-
Notifications
You must be signed in to change notification settings - Fork 440
Closed
Labels
Description
Pest 4 browser testing is excellent, but it is currently not usable with subdomains and Laravel Sail.
This issue has been reported multiple times, and several pull requests have already been submitted, but none have been merged despite months of activity.
The root cause appears to be in pest-plugin-browser, where the default host is hardcoded in the following line:
Related Issues
- [Bug]: Browser testing doesn't work for domain based routing #1443
- [Bug]: Browser tests for subdomains point to local environment instead of testing environment #1520
- [Feature] Browser testing support for external playwright server #1587
- [Feature Request]: Centralized browser initialization and global defaults (Dusk-style) for pest-plugin-browser (Playwright) #1497
- No documentation on browser test environments #1512
- [Feature Request]: Make it possible to set custom Host header for browser tests #1476
Related PRs
- feat: allow overriding the request hostname pest-plugin-browser#128
- Has been reverted via pestphp/pest-plugin-browser@45e762f
- Feature: allow "remote" Playwright and/or HTTP Servers pest-plugin-browser#131
- Created concern to bypass domain routing with associated testing pest-plugin-laravel#63
How to Reproduce
Define a route with subdomain and try browser testing!
Pest Version
4.2.0
PHP Version
8.4
Operation System
Linux
negoziator, valerius21, calebdw, joostdebruijn, weshooper and 4 more