EnergyVenom's picture
Patchwise Agent Studio: Oracle AI Agent Studio cycles
af1bee9 verified
Raw History Blame Contribute Delete
727 Bytes
import { Page } from '@playwright/test';
import { SCMUi } from '../scm/ui';
import { NAV, FIELD, BUTTON } from './labels';
/** Page actions for the MOCK P2M pack (same locator policy as the other packs). Every label comes from ./labels.ts. */
export class P2MUi extends SCMUi {
constructor(page: Page) { super(page); }
async p2mNav(key: keyof typeof NAV) { await this.go(NAV[key]); }
spin(name: string) { return this.page.getByRole('spinbutton', { name, exact: true }); }
/** Work Order textbox -> Search (any P2M page with a work-order search). */
async findWo(n: string) { await this.page.getByRole('textbox', { name: FIELD.workOrder, exact: true }).fill(n); await this.btn(BUTTON.search).click(); }
}