mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 13:45:40 +08:00
Fixed issues with e2e
This commit is contained in:
+8
-3
@@ -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
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user