You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -429,6 +429,54 @@ ESLint should run without generating any errors.
429
429
430
430
It's significantly easier to do development with ESLint integrated directly into your IDE (such as VSCode).
431
431
432
+
433
+
#### Playwright End-to-End Testing
434
+
435
+
This project uses [Playwright](https://playwright.dev/) for end-to-end and authentication testing. Playwright tests are located in the `tests/` directory and cover user flows, authentication, and admin features. These tests help ensure that the application works as expected from the user's perspective and that critical workflows are protected against regressions.
436
+
437
+
**How to run Playwright tests:**
438
+
439
+
- To run all tests:
440
+
441
+
```
442
+
npx playwright test
443
+
```
444
+
445
+
- To run tests for a specific file:
446
+
447
+
```
448
+
npx playwright test tests/john-pages.spec.ts
449
+
```
450
+
451
+
- To view tests in headed mode (see the browser UI):
452
+
453
+
```
454
+
npx playwright test --headed
455
+
```
456
+
457
+
For more information, see the [Playwright documentation](https://playwright.dev/).
458
+
459
+
460
+
#### Continuous Integration (CI)
461
+
462
+
Continuous Integration is implemented using GitHub Actions. The workflow is defined in `.github/workflows/ci.yml` and runs automatically on every push or pull request to the `main` or `master` branches.
463
+
464
+
The CI workflow performs the following steps:
465
+
466
+
- Checks out the repository code.
467
+
- Sets up Node.js and installs dependencies.
468
+
- Installs Playwright browsers and dependencies.
469
+
- Generates the Prisma client and runs database migrations.
470
+
- Seeds the test database.
471
+
- Runs ESLint to check code quality.
472
+
- Builds the Next.js application.
473
+
- Runs Playwright end-to-end tests.
474
+
- Uploads the Playwright test report as a workflow artifact for review.
475
+
476
+
The workflow uses a PostgreSQL service for testing and sets environment variables for the test environment. You can view and download the Playwright test report from the workflow run's summary page in GitHub Actions.
477
+
478
+
For details, see the [`ci.yml` workflow file](.github/workflows/ci.yml).
0 commit comments