forked from cartsnitch/cartsnitch
8659b99059
feat(e2e): add J1 and J8 journey tests - J1: Registration and Login — register flow, validation errors, sign-in with existing account, nav between pages - J8: Unauthenticated Access — /, /purchases, /products, /coupons all redirect to /login when no session - Enable VITE_MOCK_AUTH in playwright webServer so registration tests work without a live Better-Auth instance - Add playwright to devDependencies to ensure CI has the package Co-Authored-By: Paperclip <noreply@paperclip.ing>
20 lines
410 B
TypeScript
20 lines
410 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'VITE_MOCK_AUTH=true npm run dev',
|
|
url: 'http://localhost:5173',
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
},
|
|
});
|