89 lines
2.8 KiB
TypeScript
89 lines
2.8 KiB
TypeScript
|
import { Page, Locator } from "@playwright/test"
|
||
|
|
||
|
export class LeftMenuAdminPage {
|
||
|
readonly page: Page;
|
||
|
readonly dashboardLink: Locator
|
||
|
readonly usersLink: Locator
|
||
|
readonly viewUsersLink: Locator
|
||
|
readonly addUsersLink: Locator
|
||
|
readonly rolesLink: Locator
|
||
|
readonly manageRolesLink: Locator
|
||
|
readonly manageServicesLink: Locator
|
||
|
readonly credentialsLink: Locator
|
||
|
readonly viewCredentialsLink: Locator
|
||
|
readonly organisationWalletLink: Locator
|
||
|
readonly templatesLink: Locator
|
||
|
readonly dataLink: Locator
|
||
|
|
||
|
|
||
|
public constructor(page: Page) {
|
||
|
this.page = page;
|
||
|
this.dashboardLink = this.page.getByRole('link', { name: ' Dashboard' })
|
||
|
this.usersLink = this.page.getByRole('link', { name: ' Users' })
|
||
|
this.rolesLink = this.page.getByRole('link', { name: ' Roles' })
|
||
|
this.credentialsLink = this.page.getByRole('link', { name: ' Credentials' })
|
||
|
this.templatesLink = this.page.getByRole('link', { name: ' Templates' })
|
||
|
this.dataLink = this.page.getByRole('link', { name: ' Data' })
|
||
|
this.addUsersLink = this.page.getByRole('link', { name: 'Add user'})
|
||
|
this.viewUsersLink = this.page.getByRole('link', { name: 'View users' })
|
||
|
this.manageRolesLink = this.page.getByRole('link', { name: 'Manage roles' })
|
||
|
this.manageServicesLink = this.page.getByRole('link', { name: 'Manage services' })
|
||
|
this.credentialsLink = this.page.getByRole('link', { name: 'Credentials' })
|
||
|
this.viewCredentialsLink = this.page.getByRole('link', { name: 'View credentials' })
|
||
|
this.organisationWalletLink = this.page.getByRole('link', { name: 'View credentials' })
|
||
|
this.templatesLink = this.page.getByRole('link', { name: 'Templates' })
|
||
|
this.dataLink = this.page.getByRole('link', { name: ' Data' })
|
||
|
}
|
||
|
|
||
|
async getDashboardLink() {
|
||
|
return this.dashboardLink
|
||
|
}
|
||
|
|
||
|
async getUsersLink() {
|
||
|
return this.usersLink
|
||
|
}
|
||
|
|
||
|
async getAddUserLink() {
|
||
|
return this.addUsersLink
|
||
|
}
|
||
|
|
||
|
async getViewUsersLink() {
|
||
|
return this.viewUsersLink
|
||
|
}
|
||
|
|
||
|
async getRolesLink() {
|
||
|
return this.rolesLink
|
||
|
}
|
||
|
|
||
|
async getManageRolesLink() {
|
||
|
return this.manageRolesLink
|
||
|
}
|
||
|
|
||
|
async getManageServicesLink() {
|
||
|
return this.manageServicesLink
|
||
|
}
|
||
|
|
||
|
async getCredentialsLink() {
|
||
|
return this.credentialsLink
|
||
|
}
|
||
|
|
||
|
async getViewCredentialsLink() {
|
||
|
return this.viewCredentialsLink
|
||
|
}
|
||
|
|
||
|
async getOrganisationalWalletLink() {
|
||
|
return this.organisationWalletLink
|
||
|
}
|
||
|
|
||
|
async getTemplatesLink() {
|
||
|
return this.templatesLink
|
||
|
}
|
||
|
|
||
|
async getDataLink() {
|
||
|
return this.dataLink
|
||
|
}
|
||
|
|
||
|
async getDashboardLinkLocator(){
|
||
|
return '.admin.nav-link[href="/admin/dashboard/"]';
|
||
|
}
|
||
|
}
|