fix: browser testing issues and missing UI tools
- Fix WebSocket URL to use ws:// for http development environments - Make createLayer idempotent to prevent race-condition 500 under React StrictMode - Add URL-based routing for /register so register page actually shows register form - Add missing tool buttons to LeftSidebar: polygon, chair, extend, fillet - Add Playwright browser test suite for exhaustive UI testing - Update .gitignore for Playwright artifacts Unit tests: backend 254/254, frontend 380/380
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './playwright-tests',
|
||||
fullyParallel: false,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: 0,
|
||||
workers: 1,
|
||||
reporter: [['list'], ['json', { outputFile: './playwright-tests/playwright-report.json' }]],
|
||||
use: {
|
||||
baseURL: 'http://localhost:5173',
|
||||
trace: 'on-first-retry',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
webServer: [
|
||||
{
|
||||
command: 'cd /tmp/web-cad-clone/backend && npm run dev',
|
||||
url: 'http://localhost:3001/api/health',
|
||||
reuseExistingServer: true,
|
||||
timeout: 120000,
|
||||
},
|
||||
{
|
||||
command: 'cd /tmp/web-cad-clone/frontend && npm run dev -- --port 5173',
|
||||
url: 'http://localhost:5173',
|
||||
reuseExistingServer: true,
|
||||
timeout: 120000,
|
||||
},
|
||||
],
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'], viewport: { width: 1600, height: 1000 } },
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user