@atomic-testing/component-driver-html
Version:
HTML component driver for atomic-testing
1 lines • 25.4 kB
Source Map (JSON)
{"version":3,"file":"index.cjs","names":["ComponentDriver","ComponentDriver","ComponentDriver","ComponentDriver","locatorUtil","collectionUtil","ComponentDriver","ComponentDriver","ComponentDriver","ComponentDriver","ComponentDriver","locatorUtil","ComponentDriver","ComponentDriver","locatorUtil","listHelper","collectionUtil","ComponentDriver"],"sources":["../src/components/HTMLAnchorDriver.ts","../src/components/HTMLButtonDriver.ts","../src/components/HTMLCheckboxDriver.ts","../src/components/HTMLCheckboxGroupDriver.ts","../src/components/HTMLElementDriver.ts","../src/components/HTMLFileInputDriver.ts","../src/components/HTMLHiddenInputDriver.ts","../src/components/HTMLOptionDriver.ts","../src/components/HTMLRadioButtonGroupDriver.ts","../src/components/HTMLRangeInputDriver.ts","../src/components/HTMLSelectDriver.ts","../src/components/HTMLTextInputDriver.ts","../src/components/HTMLTextAreaDriver.ts"],"sourcesContent":["import {\n ClickOption,\n ComponentDriver,\n HoverOption,\n IClickableDriver,\n IMouseInteractableDriver,\n Optional,\n} from '@atomic-testing/core';\n\nexport class HTMLAnchorDriver extends ComponentDriver<{}> implements IClickableDriver, IMouseInteractableDriver {\n /**\n * Trigger a click on the anchor element.\n */\n async click(option?: ClickOption): Promise<void> {\n await this.interactor.click(this.locator, option);\n }\n\n /**\n * Hover over the anchor element.\n */\n async hover(option?: HoverOption): Promise<void> {\n await this.interactor.hover(this.locator, option);\n }\n\n /**\n * Retrieve the link's `href` attribute.\n */\n async getHref(): Promise<Optional<string>> {\n return this.interactor.getAttribute(this.locator, 'href');\n }\n\n /**\n * Retrieve the link's `target` attribute.\n */\n async getTarget(): Promise<Optional<string>> {\n return this.interactor.getAttribute(this.locator, 'target');\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLAnchorDriver';\n }\n}\n","import { ComponentDriver, IClickableDriver, IDisableableDriver, IMouseInteractableDriver } from '@atomic-testing/core';\n\nexport class HTMLButtonDriver\n extends ComponentDriver<{}>\n implements IClickableDriver, IMouseInteractableDriver, IDisableableDriver\n{\n /**\n * Check if the button element is disabled.\n *\n * @returns A promise that resolves to `true` when the underlying\n * `disabled` attribute is present.\n */\n isDisabled(): Promise<boolean> {\n return this.interactor.isDisabled(this.locator);\n }\n\n /**\n * Identifier for this driver. Primarily used by debugging utilities.\n */\n get driverName(): string {\n return 'HTMLButtonDriver';\n }\n}\n","import {\n ComponentDriver,\n IDisableableDriver,\n IFormFieldDriver,\n IReadonlyableDriver,\n IToggleDriver,\n} from '@atomic-testing/core';\n\nexport class HTMLCheckboxDriver\n extends ComponentDriver<{}>\n implements IFormFieldDriver<string | null>, IToggleDriver, IDisableableDriver, IReadonlyableDriver\n{\n /**\n * Read the checkbox value attribute.\n *\n * @returns The value assigned to the checkbox or `null` when the attribute is\n * not present.\n */\n async getValue(): Promise<string | null> {\n const value = await this.interactor.getAttribute(this.locator, 'value');\n return value ?? null;\n }\n\n /**\n * Determine if the checkbox is currently checked.\n */\n async isSelected(): Promise<boolean> {\n const isChecked = await this.interactor.isChecked(this.locator);\n return isChecked;\n }\n\n /**\n * Change the checked state of the checkbox.\n *\n * No-ops on a disabled checkbox rather than clicking it regardless: under\n * jsdom, `userEvent.click` already silently skips a disabled native\n * `<input>`, but `PlaywrightInteractor.click`'s actionability check instead\n * retries \"is enabled\" until the click's own timeout — indistinguishable\n * from a hang for a control that can never become enabled. Checking\n * `isDisabled` first keeps the no-op behavior identical across every\n * `Interactor`.\n *\n * @param selected Desired checked state.\n */\n async setSelected(selected: boolean): Promise<void> {\n const currentSelected = await this.isSelected();\n if (currentSelected === selected) {\n return;\n }\n if (await this.isDisabled()) {\n return;\n }\n await this.interactor.click(this.locator);\n }\n\n /**\n * Check whether the checkbox element is disabled.\n */\n isDisabled(): Promise<boolean> {\n return this.interactor.isDisabled(this.locator);\n }\n\n /**\n * Check whether the checkbox is read only.\n */\n isReadonly(): Promise<boolean> {\n return this.interactor.isReadonly(this.locator);\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLCheckboxDriver';\n }\n}\n","import { byValue, collectionUtil, ComponentDriver, IInputDriver, locatorUtil } from '@atomic-testing/core';\n\nimport { HTMLCheckboxDriver } from './HTMLCheckboxDriver';\n\nexport class HTMLCheckboxGroupDriver extends ComponentDriver<{}> implements IInputDriver<readonly string[]> {\n /**\n * Retrieve the list of values currently selected within the group.\n *\n * Iterates over every checkbox rather than relying on a CSS selector so that\n * an empty selection does not cause a driver error.\n */\n async getValue(): Promise<readonly string[]> {\n const availableValues = await this.interactor.getAttribute(this.locator, 'value', true);\n const value: string[] = [];\n for (const val of availableValues) {\n const itemLocator = byValue(val, 'Same');\n const locator = locatorUtil.append(this.locator, itemLocator);\n const isChecked = await this.interactor.isChecked(locator);\n if (isChecked) {\n value.push(val);\n }\n }\n return value;\n }\n\n /**\n * Select or deselect checkboxes so that their combined values equal the\n * provided list.\n *\n * @param values Values that should be selected after the operation.\n * @returns Always resolves to `true` once the selection has been adjusted.\n */\n async setValue(values: readonly string[]): Promise<boolean> {\n const currentValues = await this.getValue();\n const { toAdd, toRemove } = collectionUtil.getDifference<string>(currentValues, values);\n for (const val of toAdd) {\n await this.setSelectedByValue(val, true);\n }\n\n for (const val of toRemove) {\n await this.setSelectedByValue(val, false);\n }\n return true;\n }\n\n /**\n * Helper used by {@link setValue} to change the checked state of a checkbox\n * with a specific value.\n */\n protected async setSelectedByValue(value: string, selected: boolean): Promise<void> {\n const itemLocator = byValue(value, 'Same');\n const locator = locatorUtil.append(this.locator, itemLocator);\n const checkBoxDriver = new HTMLCheckboxDriver(locator, this.interactor);\n await checkBoxDriver.setSelected(selected);\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLCheckboxGroupDriver';\n }\n}\n","import { ComponentDriver } from '@atomic-testing/core';\n\n/**\n * Generic HTML element driver for non-interactive elements\n */\nexport class HTMLElementDriver extends ComponentDriver<{}> {\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLElementDriver';\n }\n}\n","import { ComponentDriver, IComponentDriverOption, Interactor, PartLocator } from '@atomic-testing/core';\n\nexport class HTMLFileInputDriver extends ComponentDriver<{}> {\n /**\n * Create a file input driver.\n */\n constructor(locator: PartLocator, interactor: Interactor, option?: Partial<IComponentDriverOption>) {\n super(locator, interactor, {\n ...option,\n parts: {},\n });\n }\n\n /**\n * Select one or more files on the `<input type=\"file\">` element.\n *\n * A file input cannot be filled via {@link HTMLTextInputDriver.setValue} —\n * browsers block programmatic value assignment on `type=file` — so this\n * delegates to the dedicated `setInputFiles` interactor primitive.\n *\n * @param files One or more filesystem paths. Pass a single path for a\n * non-`multiple` input; pass an array for a `multiple` input.\n */\n async uploadFiles(files: string | string[]): Promise<void> {\n return this.interactor.setInputFiles(this.locator, files);\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLFileInput';\n }\n}\n","import { ComponentDriver, IComponentDriverOption, IInputDriver, Interactor, PartLocator } from '@atomic-testing/core';\n\nexport class HTMLHiddenInputDriver extends ComponentDriver<{}> implements IInputDriver<string | null> {\n /**\n * Create a driver for a hidden input element.\n */\n constructor(locator: PartLocator, interactor: Interactor, option?: Partial<IComponentDriverOption>) {\n super(locator, interactor, {\n ...option,\n parts: {},\n });\n }\n\n /**\n * Retrieve the value attribute of the hidden input.\n */\n async getValue(): Promise<string | null> {\n const value = await this.interactor.getAttribute(this.locator, 'value');\n return value ?? null;\n }\n\n /**\n * Setting the value of a hidden input is not supported.\n */\n setValue(_value: string | null): Promise<boolean> {\n throw new Error('Setting value on hidden inputs is not supported as it does not represent user interaction');\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLHiddenInput';\n }\n}\n","import { ComponentDriver } from '@atomic-testing/core';\n\nexport class HTMLOptionDriver extends ComponentDriver {\n /**\n * Text content of the option element.\n */\n async label(): Promise<string | null> {\n const label = await this.getText();\n return label?.trim() || null;\n }\n\n /**\n * Value attribute for the option element.\n *\n * When no explicit value is set, the trimmed label is returned.\n */\n async value(): Promise<string | null> {\n const val = (await this.interactor.getAttribute(this.locator, 'value')) ?? (await this.label());\n return val?.trim() || null;\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLOptionDriver';\n }\n}\n","import { byChecked, byValue, ComponentDriver, IInputDriver, locatorUtil } from '@atomic-testing/core';\n\nexport class HTMLRadioButtonGroupDriver extends ComponentDriver<{}> implements IInputDriver<string | null> {\n /**\n * Get the value of the currently selected radio button in the group.\n */\n async getValue(): Promise<string | null> {\n const checkedLocator = byChecked(true);\n const locator = locatorUtil.append(this.locator, checkedLocator);\n const value = await this.interactor.getAttribute(locator, 'value');\n return value ?? null;\n }\n\n /**\n * Select the radio button with the specified value.\n *\n * @param value Value attribute of the radio button to select.\n */\n async setValue(value: string | null): Promise<boolean> {\n if (value == null) {\n throw new Error('Cannot deselect a radio button group - use setValue with a valid value instead');\n }\n const valueLocator = byValue(value, 'Same');\n const locator = locatorUtil.append(this.locator, valueLocator);\n await this.interactor.click(locator);\n return true;\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLRadioButtonGroupDriver';\n }\n}\n","import {\n ComponentDriver,\n IComponentDriverOption,\n IDisableableDriver,\n IInputDriver,\n Interactor,\n IReadonlyableDriver,\n PartLocator,\n} from '@atomic-testing/core';\n\n/**\n * Driver for a range input (`<input type=\"range\">`), the native control behind a\n * slider. The value is read from the input's `value` property (the browser-stable\n * source for the *current* value — unlike the `value` attribute, which keeps the\n * initial value after a programmatic change) and written through the dedicated\n * {@link Interactor.setRangeValue} primitive, since a range input accepts no typed\n * text and a positional click yields only a coordinate-derived value.\n */\nexport class HTMLRangeInputDriver\n extends ComponentDriver<{}>\n implements IInputDriver<number>, IDisableableDriver, IReadonlyableDriver\n{\n constructor(locator: PartLocator, interactor: Interactor, option?: Partial<IComponentDriverOption>) {\n super(locator, interactor, {\n ...option,\n parts: {},\n });\n }\n\n /**\n * Read the current value of the range input.\n */\n async getValue(): Promise<number> {\n const value = await this.interactor.getInputValue(this.locator);\n return Number.parseFloat(value ?? '');\n }\n\n /**\n * Set the value of the range input. The browser snaps an off-step target to the\n * nearest valid step; jsdom stores it verbatim. Pass a step-aligned value for\n * assertions that must hold in both environments.\n */\n async setValue(value: number): Promise<boolean> {\n await this.interactor.setRangeValue(this.locator, value);\n return true;\n }\n\n /**\n * Check whether the range input is disabled.\n */\n isDisabled(): Promise<boolean> {\n return this.interactor.isDisabled(this.locator);\n }\n\n /**\n * Check whether the range input is read only.\n */\n isReadonly(): Promise<boolean> {\n return this.interactor.isReadonly(this.locator);\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLRangeInput';\n }\n}\n","import {\n byTagName,\n collectionUtil,\n ComponentDriver,\n IDisableableDriver,\n IInputDriver,\n IReadonlyableDriver,\n listHelper,\n locatorUtil,\n Nullable,\n} from '@atomic-testing/core';\n\nimport { HTMLOptionDriver } from './HTMLOptionDriver';\n\ntype ValueT = string | readonly string[];\nconst optionLocator = byTagName('option');\n\nexport class HTMLSelectDriver\n extends ComponentDriver<{}>\n implements IInputDriver<Nullable<ValueT>>, IDisableableDriver, IReadonlyableDriver\n{\n /**\n * Determine whether the select element allows multiple selections.\n */\n async isMultiple(): Promise<boolean> {\n const multiple = await this.interactor.getAttribute(this.locator, 'multiple');\n return multiple != null;\n }\n\n /**\n * Get the current value(s) of the select element.\n *\n * @returns `null` when nothing is selected, otherwise the selected value or\n * array of values depending on the `multiple` attribute.\n */\n async getValue(): Promise<Nullable<ValueT>> {\n const isMultiple = await this.isMultiple();\n const values = await this.interactor.getSelectValues(this.locator);\n const returnedValue = isMultiple ? values : values?.[0];\n return returnedValue ?? null;\n }\n\n /**\n * Select one or more options based on their value attribute.\n *\n * @param value Value or list of values to select. Use `null` to clear the\n * selection.\n */\n async setValue(value: Nullable<ValueT>): Promise<boolean> {\n let selectedValues: string[] = [];\n if (value != null) {\n selectedValues = Array.isArray(value) ? value : [value];\n }\n await this.interactor.selectOptionValue(this.locator, selectedValues);\n return true;\n }\n\n /**\n * Resolve option values from their visible labels.\n */\n async getValuesByLabels(labels: readonly string[]): Promise<readonly string[]> {\n const labelSet = new Set(labels);\n const values: string[] = [];\n const itemLocatorBase = locatorUtil.append(this.locator, optionLocator);\n for await (const item of listHelper.getListItemIterator(this, itemLocatorBase, HTMLOptionDriver)) {\n const label = await item.label();\n const value = await item.value();\n if (label != null && labelSet.has(label) && value != null) {\n values.push(value);\n }\n }\n return values;\n }\n\n /**\n * Select option(s) using their labels rather than values.\n */\n async selectByLabel(label: string | readonly string[]): Promise<void> {\n const labels = collectionUtil.toArray(label);\n const values = await this.getValuesByLabels(labels);\n await this.setValue(values);\n }\n\n async getSelectedLabel(isMultiple: true): Promise<readonly string[] | null>;\n async getSelectedLabel(isMultiple: false): Promise<string | null>;\n async getSelectedLabel(): Promise<string | null>;\n /**\n * Retrieve the label text for the currently selected option(s).\n */\n async getSelectedLabel(isMultiple?: boolean) {\n if (await this.exists()) {\n const labels = await this.interactor.getSelectLabels(this.locator);\n if (isMultiple) {\n return labels;\n }\n return labels![0] ?? null;\n }\n return null;\n }\n\n /**\n * Check whether the select element is disabled.\n */\n isDisabled(): Promise<boolean> {\n return this.interactor.isDisabled(this.locator);\n }\n\n /**\n * Check whether the select element is read only.\n */\n isReadonly(): Promise<boolean> {\n return this.interactor.isReadonly(this.locator);\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLSelectDriver';\n }\n}\n","import {\n ComponentDriver,\n IComponentDriverOption,\n IDisableableDriver,\n IInputDriver,\n Interactor,\n IReadonlyableDriver,\n IRequirableDriver,\n IValidatableDriver,\n PartLocator,\n} from '@atomic-testing/core';\n\nexport class HTMLTextInputDriver\n extends ComponentDriver<{}>\n implements\n IInputDriver<string | null>,\n IDisableableDriver,\n IReadonlyableDriver,\n IRequirableDriver,\n IValidatableDriver\n{\n /**\n * Create a text input driver.\n */\n constructor(locator: PartLocator, interactor: Interactor, option?: Partial<IComponentDriverOption>) {\n super(locator, interactor, {\n ...option,\n parts: {},\n });\n }\n\n /**\n * Read the value of the input element.\n */\n async getValue(): Promise<string | null> {\n const value = await this.interactor.getInputValue(this.locator);\n return value ?? null;\n }\n\n /**\n * Set the value of the input, if the input is date, the value should be in the format of 'yyyy-MM-dd'.\n * If the input is time, the value should be in the format of 'HH:mm'.\n * If the input is datetime-local, the value should be in the format of 'yyyy-MM-ddTHH:mm'.\n * @param value Value to be set.\n * @returns\n */\n async setValue(value: string | null): Promise<boolean> {\n await this.interactor.enterText(this.locator, value ?? '');\n return true;\n }\n\n /**\n * Check whether the text input is disabled.\n */\n isDisabled(): Promise<boolean> {\n return this.interactor.isDisabled(this.locator);\n }\n\n /**\n * Check whether the text input is read only.\n */\n isReadonly(): Promise<boolean> {\n return this.interactor.isReadonly(this.locator);\n }\n\n /**\n * Check whether the text input is marked required.\n */\n isRequired(): Promise<boolean> {\n return this.interactor.isRequired(this.locator);\n }\n\n /**\n * Check whether the text input is in an invalid/error state\n * (signalled by `aria-invalid=\"true\"`).\n */\n isError(): Promise<boolean> {\n return this.interactor.isError(this.locator);\n }\n\n /**\n * Identifier for this driver.\n */\n get driverName(): string {\n return 'HTMLTextInput';\n }\n}\n","import { HTMLTextInputDriver } from './HTMLTextInputDriver';\n\nexport class HTMLTextAreaDriver extends HTMLTextInputDriver {\n /**\n * Identifier for this driver.\n */\n override get driverName(): string {\n return 'HTMLTextArea';\n }\n}\n"],"mappings":";;;AASA,IAAa,mBAAb,cAAsCA,qBAAAA,gBAA0E;;;;CAI9G,MAAM,MAAM,QAAqC;EAC/C,MAAM,KAAK,WAAW,MAAM,KAAK,SAAS,MAAM;CAClD;;;;CAKA,MAAM,MAAM,QAAqC;EAC/C,MAAM,KAAK,WAAW,MAAM,KAAK,SAAS,MAAM;CAClD;;;;CAKA,MAAM,UAAqC;EACzC,OAAO,KAAK,WAAW,aAAa,KAAK,SAAS,MAAM;CAC1D;;;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