open-consul/ui-v2/tests/lib/page-object/createDeletable.js

15 lines
318 B
JavaScript
Raw Normal View History

2018-07-04 14:06:20 +00:00
export default function(clickable) {
return function(obj = {}, scope = '') {
if (scope !== '') {
scope = scope + ' ';
}
2018-07-04 14:06:20 +00:00
return {
...obj,
...{
delete: clickable(scope + '[data-test-delete]'),
confirmDelete: clickable(scope + 'button.type-delete'),
2018-07-04 14:06:20 +00:00
},
};
};
}