Files
Umbraco-CMS/tests/Umbraco.Tests.AcceptanceTest/config.js
Paul Johnson 00133e880d Move test projects from src/ to tests/ (#11357)
* Update gitignore

* Move csproj

* Update project references

* Update solutions

* Update build scripts

* Tests used to share editorconfig with projects in src

* Fix broken tests.

* Stop copying around .editorconfig

merged root one with linting

* csharp_style_expression_bodied -> suggestion

* Move StyleCop rulesets to matching directories and update shared build properties

* Remove legacy build files, update NuGet.cofig and solution files

* Restore myget source

* Clean up .gitignore

* Update .gitignore

* Move new test classes to tests after merge

* Gitignore + nuget config

* Move new test

Co-authored-by: Ronald Barendse <ronald@barend.se>
2021-10-18 08:14:04 +01:00

50 lines
1.1 KiB
JavaScript

const prompt = require('prompt');
const fs = require('fs');
const properties = [
{
description: 'Enter your superadmin username/email',
name: 'username',
required: true
},
{
description: 'Enter your superadmin password',
name: 'password',
hidden: true,
required: true
},
{
description: 'Enter CMS URL, or leave empty for default(https://localhost:44331)',
name: 'baseUrl'
}
];
const configPath = './cypress.env.json'
console.log("Configure your test enviroment")
prompt.start();
prompt.get(properties, function (error, result) {
if (error) { return onError(error); }
var fileContent = `{
"username": "${result.username}",
"password": "${result.password}"${
result.baseUrl && `,
"baseUrl": "${result.baseUrl}"`
}
}`;
fs.writeFile(configPath, fileContent, function (error) {
if (error) return console.error(error);
console.log('Configuration saved');
});
});
function onError(error) {
console.error(error);
return true;
}