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),
|
2021-04-06 12:40:40 +00:00
|
|
|
form: policyForm('#new-policy'),
|
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'
|
|
|
|
)
|
|
|
|
),
|
|
|
|
};
|
|
|
|
};
|