2018-12-20 19:46:37 +00:00
|
|
|
import { create, collection, text, visitable, clickable, isPresent } from 'ember-cli-page-object';
|
2018-04-03 14:16:57 +00:00
|
|
|
import { getter } from 'ember-cli-page-object/macros';
|
|
|
|
|
|
|
|
export default create({
|
|
|
|
visit: visitable('/vault/secrets/:backend/list/:id'),
|
|
|
|
visitRoot: visitable('/vault/secrets/:backend/list'),
|
|
|
|
create: clickable('[data-test-secret-create]'),
|
|
|
|
createIsPresent: isPresent('[data-test-secret-create]'),
|
|
|
|
configure: clickable('[data-test-secret-backend-configure]'),
|
|
|
|
configureIsPresent: isPresent('[data-test-secret-backend-configure]'),
|
2018-06-14 04:06:19 +00:00
|
|
|
tabs: collection('[data-test-tab]'),
|
2018-11-19 21:48:24 +00:00
|
|
|
secrets: collection('[data-test-secret-link]', {
|
|
|
|
menuToggle: clickable('[data-test-popup-menu-trigger]'),
|
2018-12-20 19:46:37 +00:00
|
|
|
id: text(),
|
|
|
|
click: clickable(),
|
2018-11-19 21:48:24 +00:00
|
|
|
}),
|
|
|
|
menuItems: collection('.ember-basic-dropdown-content li', {
|
|
|
|
testContainer: '#ember-testing',
|
|
|
|
}),
|
2018-12-20 19:46:37 +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
|
|
|
backendIsEmpty: getter(function() {
|
2018-06-14 04:06:19 +00:00
|
|
|
return this.secrets.length === 0;
|
2018-04-03 14:16:57 +00:00
|
|
|
}),
|
|
|
|
});
|