e455d5dba5
Reviewed-on: #41 Co-authored-by: David Gwilliam <dhgwilliam@gmail.com> Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
33 lines
856 B
TypeScript
33 lines
856 B
TypeScript
import { test } from '@playwright/test';
|
|
import { execSync } from 'child_process';
|
|
|
|
test.describe.skip('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);
|
|
});
|
|
});
|