Download automation/src/modules/p2m/ui.ts from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 727 Bytes
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/automation/src/modules/p2m/ui.ts
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/automation/src/modules/p2m/ui.ts
-
curl -L -o ui.ts https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/automation/src/modules/p2m/ui.ts
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(); } | |
| } | |