mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-4586] Implemented Playwright Framework and add it to CI/CD (#2985)
This commit is contained in:
committed by
GitHub
parent
197ef8f0e3
commit
d68deab2bd
44
e2e/playwright/shared/models/user-model.ts
Normal file
44
e2e/playwright/shared/models/user-model.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright © 2005 - 2023 Alfresco Software, Ltd. All rights reserved.
|
||||
*
|
||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
*/
|
||||
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
|
||||
const LOWER_CASE_ALPHA = 'helloworld';
|
||||
export class UserModel {
|
||||
firstName?: string = StringUtil.generateRandomCharset(length, LOWER_CASE_ALPHA)(7);
|
||||
lastName?: string = StringUtil.generateRandomCharset(length, LOWER_CASE_ALPHA)(7);
|
||||
password?: string = StringUtil.generateRandomCharset(length, LOWER_CASE_ALPHA)(7);
|
||||
email?: string;
|
||||
username?: string;
|
||||
idIdentityService?: string;
|
||||
type = 'enterprise';
|
||||
tenantId?: number;
|
||||
company?: string;
|
||||
id: number;
|
||||
|
||||
constructor(details: any = {}) {
|
||||
const EMAIL_DOMAIN = 'alfresco';
|
||||
this.firstName = details.firstName ?? this.firstName;
|
||||
this.lastName = details.lastName ?? this.lastName;
|
||||
|
||||
const USER_IDENTIFY = `${this.firstName}${this.lastName}.${StringUtil.generateRandomCharset(length, LOWER_CASE_ALPHA)(7)}`;
|
||||
|
||||
this.password = details.password ?? this.password;
|
||||
this.email = details.email ?? `${USER_IDENTIFY}@${EMAIL_DOMAIN}.com`;
|
||||
this.username = details.username ?? USER_IDENTIFY;
|
||||
this.idIdentityService = details.idIdentityService ?? this.idIdentityService;
|
||||
this.type = details.type ?? this.type;
|
||||
this.tenantId = details.tenantId ?? this.tenantId;
|
||||
this.company = details.company ?? this.company;
|
||||
this.id = details.id ?? this.id;
|
||||
}
|
||||
|
||||
get fullName(): string {
|
||||
return `${this.firstName ?? ''} ${this.lastName ?? ''}`;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user