Change email domain for users created by e2e (#7910)

* Change email domain for users created by e2e

* Fix typo

* Use example.net as default
This commit is contained in:
Ardit Domi
2022-10-20 08:59:08 +01:00
committed by GitHub
parent 2c80214999
commit 1a76776e65
2 changed files with 3 additions and 2 deletions

View File

@@ -33,14 +33,14 @@ export class UserModel {
id: number;
constructor(details: any = {}) {
const EMAIL_DOMAIN = browser.params?.testConfig?.projectName ? browser.params.testConfig.projectName : 'alfresco';
const EMAIL_DOMAIN = browser.params?.testConfig?.emailDomain ? browser.params.testConfig.emailDomain : 'example.net';
this.firstName = details.firstName ? details.firstName : this.firstName;
this.lastName = details.lastName ? details.lastName : this.lastName;
const USER_IDENTIFY = `${this.firstName}${this.lastName}.${StringUtil.generateRandomLowercaseString(5)}`;
this.password = details.password ? details.password : this.password;
this.email = details.email ? details.email : `${USER_IDENTIFY}@${EMAIL_DOMAIN}.com`;
this.email = details.email ? details.email : `${USER_IDENTIFY}@${EMAIL_DOMAIN}`;
this.username = details.username ? details.username : USER_IDENTIFY;
this.idIdentityService = details.idIdentityService ? details.idIdentityService : this.idIdentityService;
this.type = details.type ? details.type : this.type;