wix-style-react
Version:
wix-style-react
20 lines (18 loc) • 610 B
JavaScript
var FieldWithSelectionCompositeDriverFactory = function FieldWithSelectionCompositeDriverFactory(component) {
var inputWrappers = component.$('[data-hook="input-wrappers"]');
return {
getLabel: function getLabel() {
return component.find('label');
},
getInput: function getInput() {
return inputWrappers.all(by.xpath('./div')).first();
},
getSelection: function getSelection() {
return inputWrappers.all(by.xpath('./div')).last();
},
element: function element() {
return component;
}
};
};
export default FieldWithSelectionCompositeDriverFactory;