import { test } from '@playwright/test'; import { execSync } from 'child_process'; test.describe('Cucumber E2E Tests', () => { test('Run all Cucumber feature files', async () => { const baseURL = process.env.CI ? 'https://euchre-ci.notsosm.art' : 'http://localhost:3000'; let result; try { result = execSync( 'npx cucumber-js --config e2e/cucumber/cucumber.config.ts', { encoding: 'utf-8', stdio: 'pipe', env: { ...process.env, BASE_URL: baseURL, }, cwd: process.cwd(), } ); } catch (error: any) { console.log('Cucumber stderr:', error.stderr?.toString() || 'none'); console.log('Cucumber stdout:', error.stdout?.toString() || 'none'); throw error; } console.log(result); }); });