* Fixed failing tests * Updated tests to use the updated helpers * Clean up tests * Enabled our pipeline for E2E testing * Updated the CMS URl for our E2E tests * Bumped version of our testHelpers * Did some fixing, still a bit more to do * Updated auth tests to use LoginUiHelper * Updated Telemetry tests to use TelemetryUiHelper * Updated LogViewer tests to use LogViewerUiHelper * Updated api tests to apply AAA pattern and fix failed tests * Removed unused import * Fixed comments * Bumped version of test helper * Updated the version to 10 instead of 11 * Updated the package-lock.json file to contain the correct versions * Added a waitForTimeout The reason for this is that this test is failing on the pipeline * Bumped version of testhelpers * Removed TODO * Updated EnsurePathExists so we create the stylesheet and scripts folder * Added a waits for response, otherwise our test would be too fast * Sometimes it reloads before the save is complete * Added timeout for locator * Removed duplicate * Wait until save * This was an actual bug, so we should not use a workaround, we should fix it * Skips the tests for script. * Bug was fixed, so this can be used again --------- Co-authored-by: Andreas Zerbst <andr317c@live.dk>
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:44339)',
|
|
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:44339"}`;
|
|
|
|
fs.writeFile(configPath, fileContent, function (error) {
|
|
if (error) return console.error(error);
|
|
console.log('Configuration saved');
|
|
});
|
|
});
|
|
|
|
function onError(error) {
|
|
console.error(error);
|
|
return true;
|
|
}
|