2019-05-01 18:09:29 +00:00
|
|
|
export default (clickable, deletable, collection, alias, roleForm) => (scope = '#roles') => {
|
|
|
|
return {
|
|
|
|
scope: scope,
|
2021-03-09 09:30:01 +00:00
|
|
|
create: clickable('[data-test-role-create]'),
|
2019-05-01 18:09:29 +00:00
|
|
|
form: roleForm(),
|
|
|
|
roles: alias('selectedOptions'),
|
|
|
|
selectedOptions: collection(
|
|
|
|
'[data-test-roles] [data-test-tabular-row]',
|
2021-10-14 12:54:27 +00:00
|
|
|
{
|
|
|
|
actions: clickable('label > button'),
|
|
|
|
delete: clickable('[data-test-delete]'),
|
|
|
|
confirmDelete: clickable('.informed-action button'),
|
|
|
|
}
|
2019-05-01 18:09:29 +00:00
|
|
|
),
|
|
|
|
};
|
|
|
|
};
|