UNPKG

@augment-vir/test

Version:

A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.

12 lines (11 loc) 450 B
import { assertTestContext, TestEnv, } from '../augments/universal-testing-suite/universal-test-context.js'; /** * Clicks a label to select its input and then types the given text. * * @category Internal */ export async function enterTextByLabel(testContext, { label, text }) { assertTestContext(testContext, TestEnv.Playwright); await testContext.page.getByLabel(label).first().click(); await testContext.page.keyboard.type(text); }