feat: improve test setup and authentication handling

- Added `dev:test` script to package.json for streamlined testing without file watching.
- Introduced `kill-test-servers` script to ensure no existing servers are running on test ports before executing tests.
- Enhanced Playwright configuration to use mock agent for tests, ensuring consistent API responses and disabling rate limiting.
- Updated various test files to include authentication steps and handle login screens, improving reliability and reducing flakiness in tests.
- Added `global-setup` for e2e tests to ensure proper initialization before test execution.
This commit is contained in:
Test User
2025-12-30 00:06:27 -05:00
parent 59a6a23f9b
commit 46caae05d2
22 changed files with 376 additions and 33 deletions

View File

@@ -67,6 +67,7 @@ export function LoginView() {
disabled={isLoading}
autoFocus
className="font-mono"
data-testid="login-api-key-input"
/>
</div>
@@ -77,7 +78,12 @@ export function LoginView() {
</div>
)}
<Button type="submit" className="w-full" disabled={isLoading || !apiKey.trim()}>
<Button
type="submit"
className="w-full"
disabled={isLoading || !apiKey.trim()}
data-testid="login-submit-button"
>
{isLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />