Files
Umbraco-CMS/tests/Umbraco.Tests.AcceptanceTest/createTest.js
Nikolaj Geisle 8c61e9e00b Update acceptance test readme & scripts (#13078)
* Update readme to reflect the change to playwright

* Update test scripts

* update README

* update pipelines to run new script

* update package.json scripts

* dont include demo test in package.json

* Add creation of blueprint test

* Implement create test script

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-09-30 11:45:26 +02:00

21 lines
471 B
JavaScript

const fs = require('fs');
const args = process.argv.slice(2);
function generate(fileName) {
fs.writeFileSync(
`./tests/${fileName}.spec.ts`,
`import {test} from '@umbraco/playwright-testhelpers';
test.describe('New test file description', () => {
test.beforeEach(async ({page, umbracoApi}) => {
await umbracoApi.login();
});
test('New test', async ({page, umbracoApi, umbracoUi}) => {
});
});`
);
}
generate(args[0] || "newTest");