import { Page } from '@playwright/test'; import { SCPUi } from '../scp/ui'; import { NAV, TABLE } from './labels'; /** Page actions for the MOCK HCM pack (same locator policy as the other packs). Every label comes from ./labels.ts. */ export class HCMUi extends SCPUi { constructor(page: Page) { super(page); } async hcmNav(key: keyof typeof NAV) { await this.go(NAV[key]); } region(name: string) { return this.page.getByRole('region', { name, exact: true }); } /** Notifications worklist -> the row whose text matches -> its document link. */ async openNotificationRow(text: string | RegExp) { await this.btn('Notifications').click(); await this.table(TABLE.notifications).getByRole('row').filter({ hasText: text }).getByRole('link').click(); } }