508860b73b
* add permissions and conditional * stuff * following the default setting to zero * wip * handle no permissions to mount sys * maybe closer * closer but configuration page not updating correctly with serializer issues * wip but figured out configuration page and model * clean up * add test coverage * clean up * remove meep * refactor * clean test * fix conditional on seralizer delete * fix test * test fixes * fix test * test fix * more test stuff * condense
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
JavaScript
import { create, visitable, fillable, clickable } from 'ember-cli-page-object';
|
|
import { settled } from '@ember/test-helpers';
|
|
import mountForm from 'vault/tests/pages/components/mount-backend-form';
|
|
|
|
export default create({
|
|
visit: visitable('/vault/settings/mount-secret-backend'),
|
|
...mountForm,
|
|
version: fillable('[data-test-input="options.version"]'),
|
|
setMaxVersion: fillable('[data-test-input="maxVersions"]'),
|
|
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"]'),
|
|
enableEngine: clickable('[data-test-enable-engine]'),
|
|
secretList: clickable('[data-test-navbar-item="secrets"]'),
|
|
defaultTTLVal: fillable('input[data-test-ttl-value="Default Lease TTL"]'),
|
|
defaultTTLUnit: fillable('[data-test-ttl-unit="Default Lease TTL"] [data-test-select="ttl-unit"]'),
|
|
enable: async function(type, path) {
|
|
await this.visit();
|
|
await settled();
|
|
await this.mount(type, path);
|
|
await settled();
|
|
},
|
|
});
|