wix-style-react
Version:
wix-style-react
15 lines • 751 B
JavaScript
import { baseUniDriverFactory } from '../test-utils/utils/unidriver';
import DataHooks from './dataHooks';
export const labelledElementDriverFactory = base => {
const getLabel = () => base.$(`[data-hook="${DataHooks.label}"]`);
return {
...baseUniDriverFactory(base),
/** Gets the content of rendered label */
getLabelText: () => getLabel().text(),
/** Checks if position the label is positioned at thetop of the input element */
isLabelAtTop: async () => (await getLabel().attr('data-top')) === 'true',
/** Gets the children container UniDriver */
getChildren: () => base.$(`[data-hook="${DataHooks.childrenWrapper}"]`),
};
};
//# sourceMappingURL=LabelledElement.uni.driver.js.map