mirror of
https://github.com/status-im/consul.git
synced 2025-01-15 00:04:47 +00:00
077d70ff44
Previously we were creating a fake event and amending the name of the fake event, this meant that other `event.target` properties weren't being passed through (in this instance `checked`) this changes the approach to not use fake events, and allows you to overwrite the name that the form uses for `handleEvent`
17 lines
566 B
JavaScript
17 lines
566 B
JavaScript
export default function(visitable, submitable, deletable, cancelable, clickable, tokenList) {
|
|
return {
|
|
visit: visitable(['/:dc/acls/policies/:policy', '/:dc/acls/policies/create']),
|
|
...submitable({}, 'form > div'),
|
|
...cancelable({}, 'form > div'),
|
|
...deletable({}, 'form > div'),
|
|
tokens: tokenList(),
|
|
validDatacenters: clickable('[name="policy[isScoped]"]'),
|
|
datacenter: clickable('[name="policy[Datacenters]"]'),
|
|
deleteModal: {
|
|
resetScope: true,
|
|
scope: '[data-test-delete-modal]',
|
|
...deletable({}),
|
|
},
|
|
};
|
|
}
|