playwright.cucumber.typescript.template
Version:
Projeto do playwright com cucumber, teste de regressao visual, teste de acessibilidade e lighthouse integrado
21 lines (14 loc) • 672 B
JavaScript
const fs = require('fs-extra');
const path = require('path');
const execSync = require('child_process').execSync;
function initProject(projectName) {
const projectPath = path.join(process.cwd(), projectName);
fs.ensureDirSync(projectPath);
const templatesPath = path.join(__dirname, '../templates');
fs.copySync(templatesPath, projectPath);
execSync('npm install playwright.typescript.cucumber', { stdio: 'inherit', cwd: projectPath });
execSync('npx playwright install', { stdio: 'inherit', cwd: projectPath });
}
const projectName = process.argv[2] || 'playwright.typescript.cucumber';
initProject(projectName);