open-vault/ui/tests/acceptance/settings/configure-secret-backends/pki/section-crl-test.js

27 lines
1 KiB
JavaScript
Raw Normal View History

import { currentRouteName } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
2018-04-03 14:16:57 +00:00
import page from 'vault/tests/pages/settings/configure-secret-backends/pki/section';
import authPage from 'vault/tests/pages/auth';
import enablePage from 'vault/tests/pages/settings/mount-secret-backend';
2018-04-03 14:16:57 +00:00
module('Acceptance | settings/configure/secrets/pki/crl', function(hooks) {
setupApplicationTest(hooks);
2018-04-03 14:16:57 +00:00
hooks.beforeEach(function() {
return authPage.login();
2018-04-03 14:16:57 +00:00
});
test('it saves crl config', async function(assert) {
const path = `pki-${new Date().getTime()}`;
await enablePage.enable('pki', path);
await page.visit({ backend: path, section: 'crl' });
assert.equal(currentRouteName(), 'vault.cluster.settings.configure-secret-backend.section');
2018-04-03 14:16:57 +00:00
await page.form.fillInValue(3);
await page.form.fillInUnit('h');
await page.form.submit();
assert.equal(page.lastMessage, 'The crl config for this backend has been updated.');
2018-04-03 14:16:57 +00:00
});
});