2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2022-09-15 08:43:17 +00:00
|
|
|
export default function (visitable, submitable, deletable, cancelable, clickable, tokenList) {
|
2019-05-01 18:09:29 +00:00
|
|
|
return {
|
|
|
|
visit: visitable(['/:dc/acls/policies/:policy', '/:dc/acls/policies/create']),
|
2020-05-11 15:37:11 +00:00
|
|
|
...submitable({}, 'main form > div'),
|
|
|
|
...cancelable({}, 'main form > div'),
|
|
|
|
...deletable({}, 'main form > div'),
|
2019-05-01 18:09:29 +00:00
|
|
|
tokens: tokenList(),
|
2019-05-08 16:12:16 +00:00
|
|
|
validDatacenters: clickable('[name="policy[isScoped]"]'),
|
|
|
|
datacenter: clickable('[name="policy[Datacenters]"]'),
|
2019-05-01 18:09:29 +00:00
|
|
|
deleteModal: {
|
|
|
|
resetScope: true,
|
2021-12-21 06:40:55 +00:00
|
|
|
scope: '[data-test-delete-modal]:not([aria-hidden="true"])',
|
2019-05-01 18:09:29 +00:00
|
|
|
...deletable({}),
|
|
|
|
},
|
|
|
|
};
|
2018-10-19 15:17:02 +00:00
|
|
|
}
|