Download automation/src/modules/ppm/ui.ts from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/automation/src/modules/ppm/ui.ts
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/automation/src/modules/ppm/ui.ts
-
curl -L -o ui.ts https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/automation/src/modules/ppm/ui.ts
1.04 kB
| import { Page } from '@playwright/test'; | |
| import { P2MUi } from '../p2m/ui'; | |
| import { NAV, FIELD, BUTTON } from './labels'; | |
| /** Page actions for the MOCK PPM pack (same locator policy as the other packs). Every label comes from ./labels.ts. */ | |
| export class PPMUi extends P2MUi { | |
| constructor(page: Page) { super(page); } | |
| async ppmNav(key: keyof typeof NAV) { await this.go(NAV[key]); } | |
| textbox(name: string) { return this.page.getByRole('textbox', { name, exact: true }); } | |
| combo(name: string) { return this.page.getByRole('combobox', { name, exact: true }); } | |
| /** Fill a search textbox (Project / Adjustment / Invoice) and press the Search button of that same form. */ | |
| async searchField(field: string, value: string) { | |
| const box = this.textbox(field); await box.fill(value); | |
| await this.page.getByRole('search', { name: field, exact: true }).getByRole('button', { name: BUTTON.search, exact: true }).click(); | |
| } | |
| async projectSearch(project: string) { await this.searchField(FIELD.project, project); } | |
| } | |