mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
f7471a1a18
- Fix rate limiter to allow 100 attempts in dev mode so E2E tests are not blocked by failed-login attempts during test development - Simplify logout button selector to use Lucide icon class (lucide-log-out) instead of the fragile Tooltip-content locator chain that broke on navigation - Rewrite stacks E2E spec: use waitForFunction to wait for sidebar to load, delete leftover stacks via browser-context fetch before creating, and use page.reload() to get a clean sidebar state - Fix AlertDialogContent: remove asChild+motion.div pattern that triggered a React.Children.only crash — Radix AlertDialog.Content injects a second DescriptionWarning child internally, breaking Slot when asChild=true; replace with CSS keyframe animations (data-[state=open]:animate-in) - Fix final assertion in delete test to use exact text + listbox scope to avoid false positives from similarly-named stacks like e2e-test-stack-* - All 6 E2E tests pass (4 auth + 2 stacks); node tests skip gracefully
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
/**
|
|
* Playwright E2E config for Sencho.
|
|
*
|
|
* Before running: ensure both dev servers are up:
|
|
* cd backend && npm run dev &
|
|
* cd frontend && npm run dev &
|
|
*
|
|
* Or use the webServer config below (which starts them automatically).
|
|
*/
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
// Don't stop on first failure — show all results
|
|
maxFailures: 0,
|
|
// How long to wait for a single test
|
|
timeout: 30_000,
|
|
// How long to wait for an expect() assertion
|
|
expect: { timeout: 5_000 },
|
|
// Run tests serially — Sencho is a single-user app and tests share DB state
|
|
workers: 1,
|
|
reporter: [['list'], ['html', { outputFolder: 'e2e/report', open: 'never' }]],
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
// Persist auth state between tests in the same file
|
|
storageState: undefined,
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
|
|
projects: [
|
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
],
|
|
});
|