This repository contains automated end-to-end (E2E) tests and API tests for a Notes Application using Playwright. The tests cover user registration (signup) validation and API-based login functionality.
- File:
tests/register/verify_signup.spec.js - Description: Validates that the system prevents users from signing up with an email address that is already registered.
- Test Steps:
- Navigate to signup page
- Fill Full Name: "boss test"
- Fill Email Address: "boss@test.com"
- Fill Password: "123456789"
- Fill Confirm Password: "123456789"
- Click "Sign Up" button
- Capture screenshot
- Expected Result: Display error message "Email already in use"
- File:
tests/register/verify_signup.spec.js - Description: Validates that the system prevents users from signing up when password and confirm password fields don't match.
- Test Steps:
- Navigate to signup page
- Fill Full Name: "jrd test"
- Fill Email Address: "jrd@test.com"
- Fill Password: "123456789"
- Fill Confirm Password: "4567891230" (different password)
- Click "Sign Up" button
- Capture screenshot
- Expected Result: Display error message "Passwords do not match."
- File:
tests/api/login_api.spec.js - Description: Validates that users can successfully authenticate using the API endpoint and receive a valid access token.
- Test Steps:
- Send POST request to authentication endpoint
- Provide credentials (email: "apitest2@example.com", password: "123456789")
- Verify response status is OK (200)
- Validate access token is returned and not null
- Expected Result: Response status 200 with valid access token in response
playwright_boss/
βββ tests/
β βββ api/
β β βββ login_api.spec.js # API authentication tests
β βββ register/
β β βββ verify_signup.spec.js # Signup UI validation tests
β βββ auth/
β β βββ auth.setup.js # Authentication setup for UI tests
β βββ login.spec.js # Login UI tests (requires auth)
βββ playwright-report/ # Test reports
βββ test-results/ # Test execution results
βββ playwright.config.js # Playwright configuration
βββ package.json # Dependencies and scripts
βββ Readme.MD # This file
- Node.js (v14 or higher)
- npm or yarn
-
Clone or navigate to the project directory:
cd c:\Users\Admin\Desktop\playwright_boss
-
Install dependencies:
npm install
-
Install Playwright browsers (if not already done):
npx playwright install
npx playwright testnpx playwright test tests/register/verify_signup.spec.js
npx playwright test tests/api/login_api.spec.jsnpx playwright test -g "TC-01"
npx playwright test -g "TC-02"
npx playwright test -g "TC-03"npx playwright test --headednpx playwright test --project=chromium
npx playwright test --project=firefox
npx playwright test --project=webkitnpx playwright test tests/auth/auth.setup.js --project=chromiumAfter running tests, generate and view the HTML report:
npx playwright show-reportThis will open an interactive report showing:
- β Passed tests
- β Failed tests
- πΈ Screenshots
- π₯ Videos (if configured)
- β±οΈ Test execution time
Playwright configuration is defined in playwright.config.js:
- Browsers: Chromium, Firefox, WebKit
- Base URL: Configured for the application
- Screenshots: Automatically captured on failure
- Timeout: Default 30 seconds per test
- Frontend URL: https://rag-notes-app-frontend.vercel.app
- Backend URL: https://rag-notes-app-backend.onrender.com
| Test Case | Type | Feature | Status |
|---|---|---|---|
| TC-01 | UI | Duplicate Email Validation | β Passing |
| TC-02 | UI | Password Matching Validation | β Passing |
| TC-03 | API | User Authentication | β Passing |
- UI tests that require authentication use the stored session state from
tests/playwright/.auth/user.json - Run
auth.setup.jsonce before running authenticated UI tests - API tests use direct HTTP requests with credentials
Screenshots are automatically captured:
- On test failure (stored in
test-results/) - On-demand within test code (examples:
screenshot-example1.png,screenshot-example2.png)
Solution: Run the authentication setup first:
npx playwright test tests/auth/auth.setup.js --project=chromiumSolution: Use cmd.exe instead:
cmd /c npx playwright testSolution: Increase timeout in playwright.config.js or individual tests
This project is for testing purposes.
Created for automated testing of the RAG Notes Application
Last Updated: November 13, 2025