@saucebase/laravel-playwright 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -116,7 +116,25 @@ REDIS_PREFIX=<your prefix>e2e_
116
116
 
117
117
  `DB_URL` carries the SQLite settings that let parallel workers wait for each other. `transaction_mode=IMMEDIATE` needs PHP 8.4 or later; older versions ignore it, so read-then-write transactions can still hit `database is locked`. `busy_timeout` applies on every version.
118
118
 
119
- Options: `php artisan playwright:env <environment> --url=http://localhost:9000 --force`. Edit the file afterwards for anything else the suite needs. Keep `.env.e2e` out of git like `.env`, and in CI, run the command after creating `.env`.
119
+ To change a value, set it in `.env` with an `E2E_` prefix. It wins over the defaults above and is copied as written, with any `${VARIABLE}` resolved. The prefix follows the environment: `playwright:env browser` reads `BROWSER_*`.
120
+
121
+ ```dotenv
122
+ E2E_MAIL_MAILER=smtp
123
+
124
+ # A real database, e.g. MySQL in Docker. Create it first.
125
+ E2E_DB_CONNECTION=mysql
126
+ E2E_DB_HOST=127.0.0.1
127
+ E2E_DB_PORT=3307
128
+ E2E_DB_DATABASE=${APP_SLUG}_e2e
129
+ E2E_DB_USERNAME=root
130
+ E2E_DB_PASSWORD=password
131
+ ```
132
+
133
+ **The suite wipes this database**, so the command refuses one that is also the app's. On SQLite, `E2E_DB_DATABASE` keeps the lock settings. `E2E_DB_URL` is used exactly as written, so include them yourself or parallel workers can hit `database is locked`.
134
+
135
+ If the file exists, the command asks whether to back it up and replace it, replace it, or keep it. `--backup` and `--force` answer without asking, and an unattended run without either keeps the file. The backup is `.env.e2e.backup`, replaced by the next one. It holds your secrets, so keep it out of git too.
136
+
137
+ Options: `php artisan playwright:env <environment> --url=http://localhost:9000`. Edit the file afterwards for anything else the suite needs. Keep `.env.e2e` out of git like `.env`, and in CI, run the command after creating `.env`.
120
138
 
121
139
  **2. Let Playwright start the server:**
122
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saucebase/laravel-playwright",
3
- "version": "v2.2.0",
3
+ "version": "v2.3.0",
4
4
  "description": "Blends Laravel and Playwright into seamless E2E tests — factories, queries, artisan commands, and time travel.",
5
5
  "license": "MIT",
6
6
  "repository": {