2020-04-20 15:17:50 +00:00
|
|
|
import { create, visitable, fillable, clickable } from 'ember-cli-page-object';
|
2021-03-16 18:23:48 +00:00
|
|
|
import { settled } from '@ember/test-helpers';
|
2018-08-28 05:03:55 +00:00
|
|
|
import mountForm from 'vault/tests/pages/components/mount-backend-form';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
|
|
|
export default create({
|
|
|
|
visit: visitable('/vault/settings/mount-secret-backend'),
|
2018-08-28 05:03:55 +00:00
|
|
|
...mountForm,
|
|
|
|
version: fillable('[data-test-input="options.version"]'),
|
2020-04-20 15:17:50 +00:00
|
|
|
enableMaxTtl: clickable('[data-test-toggle-input="Max Lease TTL"]'),
|
|
|
|
maxTTLVal: fillable('[data-test-ttl-value="Max Lease TTL"]'),
|
|
|
|
maxTTLUnit: fillable('[data-test-ttl-unit="Max Lease TTL"] [data-test-select="ttl-unit"]'),
|
|
|
|
enableDefaultTtl: clickable('[data-test-toggle-input="Default Lease TTL"]'),
|
|
|
|
defaultTTLVal: fillable('input[data-test-ttl-value="Default Lease TTL"]'),
|
|
|
|
defaultTTLUnit: fillable('[data-test-ttl-unit="Default Lease TTL"] [data-test-select="ttl-unit"]'),
|
2018-09-25 16:28:26 +00:00
|
|
|
enable: async function(type, path) {
|
|
|
|
await this.visit();
|
2021-03-16 18:23:48 +00:00
|
|
|
await settled();
|
2019-04-10 14:36:32 +00:00
|
|
|
await this.mount(type, path);
|
2021-03-16 18:23:48 +00:00
|
|
|
await settled();
|
2018-09-25 16:28:26 +00:00
|
|
|
},
|
2018-04-03 14:16:57 +00:00
|
|
|
});
|