* Updated existing locator as it was prone to failing * Removed old tests from earlier versions * Added a timeout and an await. This was because the locator sometimes failed * Added missing import for crypto * Updated locator as it sometimes failed. * Updated the README to include information for using the UI mode for playwright * Bumped the timeout time for our tests * We updated the naming for out methods in our testHelpers, so we need to update the usage as well * Added additional timeout * Updated the config so it is easier to understand what you need to input * Added UI acceptance tests for templates * Added types/node, allows us to use crypto. Updated the testhelpers to use the newest version. * fixed error with testhelper dependency * Bumped testhelper version * Moved to settings instead of templating
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
const prompt = require('prompt');
|
|
const fs = require('fs');
|
|
|
|
const properties = [
|
|
{
|
|
description: 'Enter your umbraco superadmin username/email',
|
|
name: 'username',
|
|
required: true
|
|
},
|
|
{
|
|
description: 'Enter your umbraco superadmin password',
|
|
name: 'password',
|
|
hidden: true,
|
|
required: true
|
|
},
|
|
{
|
|
description: 'Enter CMS URL, or leave empty for default(https://localhost:44331)',
|
|
name: 'baseUrl'
|
|
}
|
|
];
|
|
|
|
|
|
const configPath = './.env'
|
|
|
|
console.log("Configure your umbraco test environment")
|
|
|
|
prompt.start();
|
|
|
|
prompt.get(properties, function (error, result) {
|
|
if (error) { return onError(error); }
|
|
|
|
var fileContent = `UMBRACO_USER_LOGIN=${result.username}
|
|
UMBRACO_USER_PASSWORD=${result.password}
|
|
URL=${result.baseUrl || "https://localhost:44331"}`;
|
|
|
|
fs.writeFile(configPath, fileContent, function (error) {
|
|
if (error) return console.error(error);
|
|
console.log('Configuration saved');
|
|
});
|
|
});
|
|
|
|
function onError(error) {
|
|
console.error(error);
|
|
return true;
|
|
}
|