UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

22 lines (21 loc) 996 B
/*! * KoliBri - The accessible HTML-Standard */ import { expect } from "@playwright/test"; import { test } from "@stencil/playwright"; import { INPUTS_SELECTOR } from "./utils/inputsSelector"; const testInputValueReflection = ({ additionalProperties = '', componentName, equalityCheck = 'toBe', fillAction, testValue, }) => { test.skip(`should reflect the _value property on the web component`, async ({ page }) => { await page.setContent(`<${componentName} _label="Input" ${additionalProperties}></${componentName}>`); if (fillAction) { await fillAction(page); } else if (typeof testValue === 'string') { await page.locator(INPUTS_SELECTOR).fill(testValue); } const valueDomProperty = await page.locator(componentName).evaluate((element) => element._value); expect(valueDomProperty)[equalityCheck](testValue); }); }; export { testInputValueReflection }; //# sourceMappingURL=input-value-reflection.js.map