open-vault/ui/tests/pages/policies/index.js

21 lines
677 B
JavaScript
Raw Normal View History

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'),
policies: collection('[data-test-policy-item]', {
name: text('[data-test-policy-name]'),
2018-04-03 14:16:57 +00:00
}),
row: collection('[data-test-policy-link]', {
name: text(),
menu: clickable('[data-test-popup-menu-trigger]'),
}),
findPolicyByName(name) {
return this.policies.filterBy('name', name)[0];
},
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
});