vault/ui/tests/acceptance/console-test.js
Matthew Irish 6f89952767
Ember update (#5386)
Ember update - update ember-cli, ember-data, and ember to 3.4 series
2018-09-25 11:28:26 -05:00

26 lines
890 B
JavaScript

import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import enginesPage from 'vault/tests/pages/secrets/backends';
import authPage from 'vault/tests/pages/auth';
module('Acceptance | console', function(hooks) {
setupApplicationTest(hooks);
hooks.beforeEach(function() {
return authPage.login();
});
test("refresh reloads the current route's data", async function(assert) {
await enginesPage.visit();
let numEngines = enginesPage.rows.length;
await enginesPage.consoleToggle();
let now = Date.now();
for (let num of [1, 2, 3]) {
let inputString = `write sys/mounts/${now + num} type=kv`;
await enginesPage.console.runCommands(inputString);
}
await enginesPage.console.runCommands('refresh');
assert.equal(enginesPage.rows.length, numEngines + 3, 'new engines were added to the page');
});
});