@svatah/yam-playwright-test
The bind() fixture for an existing Playwright Test project
- Source:
packages/playwright-test· README:packages/playwright-test/README.md - Install:
npm install @svatah/yam-playwright-test - Version 0.1.0 · Apache-2.0
Exports
| Export | Kind | Signature | |
|---|---|---|---|
Binder | class | export class Binder | A bind() bound to one page. |
BindGrounder | interface | export interface BindGrounder | |
BindGroundRequest | interface | export interface BindGroundRequest | What record mode knows about the element it is asked to bind. |
BindMode | typealias | export type BindMode = "run" | "record" | "heal"; | |
BindOptions | interface | export interface BindOptions | |
BindOutcome | interface | export interface BindOutcome | How a bind() call was answered, for the reporter and the annotations. |
clearBindGrounder | function | export function clearBindGrounder(): void | Put the default back. For tests, and for a project without module (b). |
clearPickerStamp | function | export async function clearPickerStamp(page: Page): Promise<void> | Remove the picker's stamp from wherever it landed. |
currentBindGrounder | function | export function currentBindGrounder(): BindGrounder | |
expect | variable | expect: Expect<{}> | |
hasBindGrounder | function | export function hasBindGrounder(): boolean | Whether anything but the picker-only default is registered. |
HEALED_ANNOTATION | variable | HEALED_ANNOTATION = "healed" | The annotation a healed test carries. |
modeFromEnvironment | function | export function modeFromEnvironment(value: string | undefined): BindMode | YAM_MODE, defaulting to run (LLD §6.5). |
NO_BIND_GROUNDER | variable | NO_BIND_GROUNDER: BindGrounder | The default: module (a) has no model, and says so by declining every request. |
parseProgrammaticPicks | function | export function parseProgrammaticPicks( | Parse YAM_PICK: a JSON object of element id → selector. |
Pick | interface | export interface Pick | |
pickInteractively | function | export async function pickInteractively( | Ask a person to click the element, and return a selector for what they chose. |
pickSelector | function | export function pickSelector(value: string, testIdAttribute = "data-testid"): string | Read a pick's value as a selector. |
PickSource | typealias | export type PickSource = "human" | "programmatic"; | How an element was chosen. |
registerBindGrounder | function | export function registerBindGrounder(grounder: BindGrounder): void | Register module (b)'s grounder. @svatah/yam-host-playwright does this when the |
test | variable | test = base.extend<YamOptions & YamFixtures>( | |
YamFixtures | interface | export interface YamFixtures | |
YamOptions | interface | export interface YamOptions |