open-vault/ui/tests/acceptance/settings/configure-secret-backends/pki/section-crl-test.js
Matthew Irish d509588cd2
Ember update (#5386)
Ember update - update ember-cli, ember-data, and ember to 3.4 series
2018-09-25 11:28:26 -05:00

29 lines
1.1 KiB
JavaScript

import { currentRouteName } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
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';
import withFlash from 'vault/tests/helpers/with-flash';
module('Acceptance | settings/configure/secrets/pki/crl', function(hooks) {
setupApplicationTest(hooks);
hooks.beforeEach(function() {
return authPage.login();
});
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');
await page.form.fillInField('time', 3);
await page.form.fillInField('unit', 'h');
await withFlash(page.form.submit(), () => {
assert.equal(page.lastMessage, 'The crl config for this backend has been updated.');
});
});
});