acupedia-store-ui/TESTING.md

1.0 KiB

Running Storefront Tests (acupedia_store_ui)

All commands below should be run from the acupedia_store_ui/ directory:

cd acupedia_store_ui

1. Prerequisites (First Time Only)

If dependencies or Playwright browsers are not installed yet:

npm install
npx playwright install chromium

2. Run Playwright E2E Tests

Run all E2E tests (headless, Desktop + Mobile)

npm run test:e2e

Playwright automatically starts the Vite dev server on http://localhost:3000/store/ if it is not already running.

npm run test:e2e:ui

Run in Headed Mode (watch the browser window)

npm run test:e2e:headed

Run a specific test file

npx playwright test tests/e2e/smoke.spec.ts

Run only Desktop or only Mobile

npx playwright test --project=chromium-desktop
npx playwright test --project=chromium-mobile

View the HTML Test Report (after a run)

npm run test:e2e:report