UNPKG

webssh2-server

Version:

A Websocket to SSH2 gateway using xterm.js, socket.io, ssh2

72 lines (59 loc) 1.76 kB
/** * Playwright Configuration for WebSSH2 WebSocket Tests */ import { defineConfig, devices } from '@playwright/test' export default defineConfig({ testDir: './tests/playwright', // Maximum time one test can run for timeout: 30 * 1000, // Test execution settings fullyParallel: false, // Run tests sequentially to avoid port conflicts forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: 1, // Single worker to avoid concurrent SSH connections // Reporter configuration reporter: [ ['html', { outputFolder: 'playwright-report' }], ['list'] ], // Shared settings for all projects use: { // Base URL for the application baseURL: 'http://localhost:2222', // Collect trace when retrying the failed test trace: 'on-first-retry', // Screenshot on failure screenshot: 'only-on-failure', // Video on failure video: 'retain-on-failure', // Timeout for actions actionTimeout: 10000, // Navigation timeout navigationTimeout: 30000, }, // Configure projects for different browsers projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, { name: 'firefox', use: { ...devices['Desktop Firefox'] }, }, { name: 'webkit', use: { ...devices['Desktop Safari'] }, }, ], // Web server configuration // Commented out - run server manually before tests // webServer: { // command: 'NODE_ENV=development node index.js', // WebSocket is now default // url: 'http://localhost:2222', // reuseExistingServer: true, // Always try to reuse existing server // timeout: 120 * 1000, // stdout: 'pipe', // stderr: 'pipe', // }, })