UNPKG

wix-style-react

Version:
24 lines (20 loc) 839 B
import focusableDriverFactory from '../../common/Focusable/Focusable.protractor.driver'; import { mergeDrivers } from '../../../test/utils/private-drivers'; import { dataHooks } from './constants'; var buttonDriverFactory = function buttonDriverFactory(element) { var getRadio = function getRadio() { return element.$("[data-hook=\"".concat(dataHooks.RadioButtonRadio, "\"]")); }; var getTextChildren = function getTextChildren() { return element.$("[data-hook=\"".concat(dataHooks.RadioButtonChildren, "\"]")); }; var focusableDriver = focusableDriverFactory({ rootElement: element, nativeFocusableElement: element, clickableElements: [getRadio, getTextChildren] }); var publicDriver = {// Empty driver }; return mergeDrivers(publicDriver, focusableDriver); }; export default buttonDriverFactory;