2019-01-09 18:30:19 +00:00
|
|
|
import { text, create, collection, clickable, visitable } from 'ember-cli-page-object';
|
2018-04-03 14:16:57 +00:00
|
|
|
export default create({
|
|
|
|
visit: visitable('/vault/policies/:type'),
|
2018-09-25 16:28:26 +00:00
|
|
|
policies: collection('[data-test-policy-item]', {
|
|
|
|
name: text('[data-test-policy-name]'),
|
2018-04-03 14:16:57 +00:00
|
|
|
}),
|
2019-01-09 18:30:19 +00:00
|
|
|
row: collection('[data-test-policy-link]', {
|
|
|
|
name: text(),
|
|
|
|
menu: clickable('[data-test-popup-menu-trigger]'),
|
|
|
|
}),
|
2018-09-25 16:28:26 +00:00
|
|
|
findPolicyByName(name) {
|
|
|
|
return this.policies.filterBy('name', name)[0];
|
|
|
|
},
|
2019-01-09 18:30:19 +00:00
|
|
|
delete: clickable('[data-test-confirm-action-trigger]', {
|
|
|
|
testContainer: '#ember-testing',
|
|
|
|
}),
|
|
|
|
confirmDelete: clickable('[data-test-confirm-button]', {
|
|
|
|
testContainer: '#ember-testing',
|
|
|
|
}),
|
2018-04-03 14:16:57 +00:00
|
|
|
});
|