* 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>
50 lines
1.1 KiB
JavaScript
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;
|
|
}
|