default login with admin if not to create user (#6260)

This commit is contained in:
Eugenio Romano
2020-10-16 14:28:01 +01:00
committed by GitHub
parent 13e86833f9
commit 04f5e35e05

View File

@@ -39,6 +39,10 @@ export class UsersActions {
} }
async createUser(userModel?: UserModel): Promise<UserModel> { async createUser(userModel?: UserModel): Promise<UserModel> {
if (!this.api.apiService.isLoggedIn()) {
await this.api.apiService.login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
}
const user = new UserModel({ ...(userModel ? userModel : {}) }); const user = new UserModel({ ...(userModel ? userModel : {}) });
try { try {