Add Playwright tests for live site authentication and race page loading
- Introduced `auth.setup.js` to handle authentication against the live site and store the session state. - Created `live-race.spec.js` to test loading a live race page with an authenticated session, including cookie validation. - Added utility functions in `live-site-test-utils.js` for managing authentication, dismissing cookie banners, and checking UI states. - Included a temporary JSON file for live state inspection. - Updated deployment manifest to reflect new and modified files. - Implemented `_inc_faceai_identity.jsp` for managing FaceAI identity cookies and included it in relevant JSP files. - Added language management JavaScript in `lang.js`. - Adjusted `fotoCR-en.jsp` and `fotoCR.jsp` to include the FaceAI identity logic. - Created a tarball for staging deployment.
This commit is contained in:
parent
9f56dfba1d
commit
1d1bccdae6
23 changed files with 4358 additions and 11 deletions
|
|
@ -172,6 +172,35 @@ If you want to keep the local containers running after the test for manual inspe
|
|||
FACEAI_E2E_KEEP_STACK=1
|
||||
```
|
||||
|
||||
## Live Site Playwright Checks
|
||||
|
||||
The `faceai/` workspace now also includes a separate Playwright project for the live site. It is isolated from the Docker-backed simulator suite and is intended to verify that production login still works and that a real race page loads correctly after authentication.
|
||||
|
||||
Set these environment variables before running it:
|
||||
|
||||
```bash
|
||||
LIVE_SITE_BASE_URL=https://www.regalamiunsorriso.it
|
||||
LIVE_SITE_LOGIN_URL=https://www.regalamiunsorriso.it/login_clienti-it.html
|
||||
LIVE_SITE_RACE_URL=https://www.regalamiunsorriso.it/42%20HALF%20MARATHON%20FIRENZE_gara-1018545---96-1.html
|
||||
LIVE_SITE_USERNAME=your-login
|
||||
LIVE_SITE_PASSWORD=your-password
|
||||
```
|
||||
|
||||
Then run:
|
||||
|
||||
```bash
|
||||
npm run test:live:install
|
||||
npm run test:live
|
||||
```
|
||||
|
||||
What it does:
|
||||
|
||||
- opens the live login page
|
||||
- signs in with the supplied credentials
|
||||
- persists authenticated Playwright storage state under `tests/live-site/.auth/user.json`
|
||||
- opens the configured live race URL
|
||||
- verifies the account UI is present and the race search form renders correctly
|
||||
|
||||
## Optional Backend And Frontend Dev Loop
|
||||
|
||||
If you only want to iterate on the app without the PHP simulator, you can still run the public site and the processor separately. The queue-backed flow now requires Redis and the processor, so `npm run dev` alone is no longer the full stack.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue