consul/ui/packages/consul-ui/app/components/policy-selector/pageobject.js

21 lines
497 B
JavaScript
Raw Normal View History

export default (clickable, deletable, collection, alias, policyForm) => (
scope = '#policies',
2021-03-09 09:30:01 +00:00
createSelector = '[data-test-policy-create]'
) => {
return {
scope: scope,
create: clickable(createSelector),
form: policyForm('#new-policy'),
policies: alias('selectedOptions'),
selectedOptions: collection(
'[data-test-policies] [data-test-tabular-row]',
deletable(
{
expand: clickable('label'),
},
'+ tr'
)
),
};
};