mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
8163a30b77
* ezqms-1109: add signature details for reviews/approvals Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
27 lines
785 B
TypeScript
27 lines
785 B
TypeScript
import { type Page, expect } from '@playwright/test'
|
|
import { DocumentCommonPage } from './document-common-page'
|
|
|
|
export class DocumentApprovalsPage extends DocumentCommonPage {
|
|
readonly page: Page
|
|
|
|
constructor (page: Page) {
|
|
super(page)
|
|
this.page = page
|
|
}
|
|
|
|
async checkRejectApproval (approvalName: string, message: string): Promise<void> {
|
|
await expect(
|
|
this.page
|
|
.locator('div.reject-message', { hasText: message })
|
|
.locator('xpath=..')
|
|
.locator('div.approver span.ap-label')
|
|
).toHaveText(approvalName)
|
|
}
|
|
|
|
async checkSuccessApproval (approvalName: string): Promise<void> {
|
|
await expect(this.page.locator('svg[fill*="accepted"]').locator('xpath=../..').locator('span.ap-label')).toHaveText(
|
|
approvalName
|
|
)
|
|
}
|
|
}
|