Change to setting token directly

Most tests bypass setting the token via the UI, instead choosing
to set it in localStorage directly, because the acceptance tests
for the token UI are sufficient to exercise that part of the UI,
so this speeds up the test a bit.
This commit is contained in:
Buck Doyle
2020-04-03 12:26:25 -05:00
parent b7999b31fb
commit 4fccaaa2e3

View File

@@ -2,7 +2,6 @@ import { module, test } from 'qunit';
import { currentURL, settled } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';
import { setupMirage } from 'ember-cli-mirage/test-support';
import Tokens from 'nomad-ui/tests/pages/settings/tokens';
import Service from '@ember/service';
import Exec from 'nomad-ui/tests/pages/exec';
@@ -284,8 +283,7 @@ module('Acceptance | exec', function(hooks) {
const { secretId } = managementToken;
await Tokens.visit();
await Tokens.secret(secretId).submit();
window.localStorage.nomadTokenSecret = secretId;
let mockSocket = new MockSocket();
let mockSockets = Service.extend({