2018-06-01 22:18:31 +00:00
|
|
|
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();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2018-06-14 18:52:00 +00:00
|
|
|
test('refresh reloads the current route\'s data', function(assert) {
|
2018-06-01 22:18:31 +00:00
|
|
|
let numEngines;
|
|
|
|
enginesPage.visit();
|
|
|
|
andThen(() => {
|
|
|
|
numEngines = enginesPage.rows().count;
|
|
|
|
enginesPage.consoleToggle();
|
|
|
|
let now = Date.now();
|
|
|
|
[1, 2, 3].forEach(num => {
|
2018-06-14 04:06:19 +00:00
|
|
|
let inputString = `write sys/mounts/${now + num} type=kv`;
|
2018-06-01 22:18:31 +00:00
|
|
|
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');
|
|
|
|
});
|
|
|
|
});
|