Fixed issues with e2e

This commit is contained in:
Wyatt Johnson
2017-01-30 18:38:06 -07:00
parent 91cd2e9e86
commit 864413b5d6
3 changed files with 21 additions and 15 deletions
+8 -3
View File
@@ -22,17 +22,22 @@ util.onshutdown([
program
.description('runs the setup wizard to setup the application')
.option('--defaults', 'apply defaults for config instead of prompting')
.parse(process.argv);
//==============================================================================
// Setup the application
//==============================================================================
console.log('We\'ll ask you some questions in order to setup your installation of Talk.\n');
SettingsService
.init()
.then((settings) => {
if (program.defaults) {
return settings.save();
}
console.log('We\'ll ask you some questions in order to setup your installation of Talk.\n');
return inquirer.prompt([
{
type: 'input',
@@ -74,7 +79,7 @@ SettingsService
});
})
.then(() => {
console.log('\nTalk is now installed!');
console.log('Talk is now installed!');
util.shutdown();
})
.catch((err) => {
+11 -10
View File
@@ -28,18 +28,19 @@ util.onshutdown([
function getUserCreateAnswers(options) {
if (options.flag_mode) {
let user = {
email: options.email,
password: options.password,
confirmPassword: options.password,
displayName: options.name,
roles: []
};
if (options.role && UserModel.USER_ROLES.indexOf(options.role) > -1) {
let roles = {};
roles[options.role] = true;
return Promise.resolve({
email: options.email,
password: options.password,
displayName: options.name,
roles
});
user.roles = [options.role];
}
return Promise.resolve(user);
}
return inquirer.prompt([
+2 -2
View File
@@ -3,8 +3,8 @@
# install selenium
selenium-standalone install --config=./selenium.config.js
#Init settings
./bin/cli settings init
# Init application
./bin/cli setup --defaults
# Creating Admin Test User
./bin/cli users create --flag_mode --email "admin@test.com" --password "testtest" --name "AdminTestUser" --role "ADMIN"