Files
huly-platform/qms-tests/sanity/tests/model/documents/document-approvals-page.ts
T
Victor IlyushchenkoandGitHub 3c822510cd Additional tweaks for EQMS-1317 (#7854)
* Additional tweaks for EZQMS-1317

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* fixed tests

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* v2

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* fixed tests

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

---------

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
2025-02-07 19:27:04 +03:00

28 lines
817 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.approval-status-message', { hasText: message })
.locator('xpath=..')
.locator('div.approver span.ap-label')
.last()
).toHaveText(approvalName)
}
async checkSuccessApproval (approvalName: string): Promise<void> {
await expect(
this.page.locator('svg[fill*="accepted"]').locator('xpath=../..').locator('span.ap-label').last()
).toHaveText(approvalName)
}
}