4d29d70b98
* remove dev-leased-kv flag, handle non-secret responses in the console * skip lease tests for now * use the newer collection api for ember-page-object * include generic in types that can have a v2 * add tests for generic v2 * isolate kv v2 logic in the secret-engine model and add unit tests
32 lines
926 B
JavaScript
32 lines
926 B
JavaScript
import { test } from 'qunit';
|
|
import moduleForAcceptance from 'vault/tests/helpers/module-for-acceptance';
|
|
import enginesPage from 'vault/tests/pages/secrets/backends';
|
|
|
|
moduleForAcceptance('Acceptance | console', {
|
|
beforeEach() {
|
|
return authLogin();
|
|
},
|
|
});
|
|
|
|
test("refresh reloads the current route's data", function(assert) {
|
|
let numEngines;
|
|
enginesPage.visit();
|
|
andThen(() => {
|
|
numEngines = enginesPage.rows().count;
|
|
enginesPage.consoleToggle();
|
|
let now = Date.now();
|
|
[1, 2, 3].forEach(num => {
|
|
let inputString = `write sys/mounts/${now + num} type=kv`;
|
|
enginesPage.console.consoleInput(inputString);
|
|
enginesPage.console.enter();
|
|
});
|
|
});
|
|
andThen(() => {
|
|
enginesPage.console.consoleInput('refresh');
|
|
enginesPage.console.enter();
|
|
});
|
|
andThen(() => {
|
|
assert.equal(enginesPage.rows().count, numEngines + 3, 'new engines were added to the page');
|
|
});
|
|
});
|