2019-05-01 18:09:29 +00:00
|
|
|
export default (clickable, deletable, collection, alias, policyForm) => (
|
|
|
|
scope = '#policies',
|
2021-03-09 09:30:01 +00:00
|
|
|
createSelector = '[data-test-policy-create]'
|
2019-05-01 18:09:29 +00:00
|
|
|
) => {
|
|
|
|
return {
|
|
|
|
scope: scope,
|
|
|
|
create: clickable(createSelector),
|
2019-06-04 14:53:10 +00:00
|
|
|
form: policyForm('#new-policy-toggle + div'),
|
2019-05-01 18:09:29 +00:00
|
|
|
policies: alias('selectedOptions'),
|
|
|
|
selectedOptions: collection(
|
|
|
|
'[data-test-policies] [data-test-tabular-row]',
|
|
|
|
deletable(
|
|
|
|
{
|
|
|
|
expand: clickable('label'),
|
|
|
|
},
|
|
|
|
'+ tr'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
};
|
|
|
|
};
|