wix-style-react
Version:
wix-style-react
25 lines (20 loc) • 756 B
JavaScript
import focusableDriverFactory from '../../common/Focusable/Focusable.protractor.driver';
import { mergeDrivers } from '../../../test/utils/private-drivers';
var buttonDriverFactory = function buttonDriverFactory(element) {
var getRadio = function getRadio() {
return element.$('[data-hook="radiobutton-radio"]');
};
var getTextChildren = function getTextChildren() {
return element.$('[data-hook="radiobutton-children"]');
};
var focusableDriver = focusableDriverFactory({
rootElement: element,
nativeFocusableElement: element,
clickableElements: [getRadio, getTextChildren]
});
var publicDriver = {
// Empty driver
};
return mergeDrivers(publicDriver, focusableDriver);
};
export default buttonDriverFactory;