File size: 486 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import { Page } from '@playwright/test'
export async function createService(
page: Page,
name: string,
description: string,
): Promise<string> {
await page.goto('./services')
await page.getByRole('button', { name: 'Create Service' }).click()
await page.fill('input[name=name]', name)
await page.fill('textarea[name=description]', description)
await page.click('[role=dialog] button[type=submit]')
await page.waitForURL(/services\/[0-9a-f]+/)
return page.url()
}
|