Refactor icu 15872 await authenticatesession admin (#2603)
* Add await for all authenticateSession within /tests/acceptance * Add await for all authenticateSession within /tests/unit
This commit is contained in:
1 parent
055607b3dd
commit
b64f1876dc
165 files changed
+312
-312
No files matched your search
@@ -34,7 +34,7 @@ module('Acceptance | accounts | change password', function (hooks) {
|
||||
changePassword: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -46,7 +46,7 @@ module('Acceptance | accounts | change password', function (hooks) {
|
||||
instances.account = this.server.create('account', {
|
||||
scope: instances.scopes.org,
|
||||
});
|
||||
authenticateSession({
|
||||
await authenticateSession({
|
||||
account_id: instances.account.id,
|
||||
username: 'admin',
|
||||
});
|
||||
|
||||
@@ -35,8 +35,8 @@ module('Acceptance | accounts | create', function (hooks) {
|
||||
account: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -33,8 +33,8 @@ module('Acceptance | accounts | delete', function (hooks) {
|
||||
account: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -31,8 +31,8 @@ module('Acceptance | accounts | list', function (hooks) {
|
||||
account: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -30,8 +30,8 @@ module('Acceptance | accounts | read', function (hooks) {
|
||||
account: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -32,8 +32,8 @@ module('Acceptance | accounts | set password', function (hooks) {
|
||||
setPassword: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -31,8 +31,8 @@ module('Acceptance | accounts | update', function (hooks) {
|
||||
account: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -43,7 +43,7 @@ module('Acceptance | aliases | create', function (hooks) {
|
||||
newAlias: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
urls.globalScope = `/scopes/global`;
|
||||
urls.aliases = `${urls.globalScope}/aliases`;
|
||||
@@ -51,7 +51,7 @@ module('Acceptance | aliases | create', function (hooks) {
|
||||
getAliasCount = () => this.server.schema.aliases.all().models.length;
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('users can create a new alias with host and target info', async function (assert) {
|
||||
|
||||
@@ -38,8 +38,8 @@ module('Acceptance | aliases | delete', function (hooks) {
|
||||
target: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -44,7 +44,7 @@ module('Acceptance | aliases | list', function (hooks) {
|
||||
aliasWithTarget: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -71,7 +71,7 @@ module('Acceptance | aliases | list', function (hooks) {
|
||||
urls.aliasWithTarget = `${urls.aliases}/${instances.aliasWithTarget.id}`;
|
||||
intl = this.owner.lookup('service:intl');
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can navigate to aliases with proper authorization', async function (assert) {
|
||||
|
||||
@@ -34,7 +34,7 @@ module('Acceptance | aliases | read', function (hooks) {
|
||||
unknownAlias: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -48,7 +48,7 @@ module('Acceptance | aliases | read', function (hooks) {
|
||||
urls.alias = `${urls.aliases}/${instances.alias.id}`;
|
||||
urls.unknownAlias = `${urls.aliases}/foo`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting a alias', async function (assert) {
|
||||
|
||||
@@ -48,7 +48,7 @@ module('Acceptance | aliases | update', function (hooks) {
|
||||
target: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -66,7 +66,7 @@ module('Acceptance | aliases | update', function (hooks) {
|
||||
urls.alias = `${urls.aliases}/${instances.alias.id}`;
|
||||
aliasCount = () => this.server.schema.aliases.all().models.length;
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can update an exisiting alias', async function (assert) {
|
||||
|
||||
@@ -69,8 +69,8 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
authMethod: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.orgScope = this.server.create(
|
||||
'scope',
|
||||
{
|
||||
|
||||
@@ -46,9 +46,9 @@ module('Acceptance | auth-methods | delete', function (hooks) {
|
||||
ldapAuthMethod: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Setup Mirage mock resources for this test
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -46,7 +46,7 @@ module('Acceptance | auth-methods | list', function (hooks) {
|
||||
oidcAuthMethod: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create(
|
||||
'scope',
|
||||
@@ -70,7 +70,7 @@ module('Acceptance | auth-methods | list', function (hooks) {
|
||||
urls.passwordAuthMethod = `${urls.authMethods}/${instances.passwordAuthMethod.id}`;
|
||||
urls.oidcAuthMethod = `${urls.authMethods}/${instances.oidcAuthMethod.id}`;
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can navigate to auth methods with proper authorization', async function (assert) {
|
||||
|
||||
@@ -35,8 +35,8 @@ module('Acceptance | auth-methods | oidc', function (hooks) {
|
||||
authMethod: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -47,9 +47,9 @@ module('Acceptance | auth-methods | read', function (hooks) {
|
||||
oidcAuthMethodGlobal: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Setup Mirage mock resources for this test
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -73,9 +73,9 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
ldapAuthMethod: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Setup Mirage mock resources for this test
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -235,7 +235,7 @@ module('Acceptance | authentication', function (hooks) {
|
||||
});
|
||||
|
||||
test('visiting any authentication parent route while already authenticated with an org redirects to projects', async function (assert) {
|
||||
authenticateSession({ scope });
|
||||
await authenticateSession({ scope });
|
||||
await visit(indexURL);
|
||||
assert.strictEqual(currentURL(), projectsURL);
|
||||
await visit(scopesURL);
|
||||
@@ -250,7 +250,7 @@ module('Acceptance | authentication', function (hooks) {
|
||||
});
|
||||
|
||||
test('visiting index or scopes routes while already authenticated with global redirects to orgs', async function (assert) {
|
||||
authenticateSession({
|
||||
await authenticateSession({
|
||||
scope: { id: globalScope.id, type: globalScope.type },
|
||||
});
|
||||
await visit(indexURL);
|
||||
@@ -316,7 +316,7 @@ module('Acceptance | authentication', function (hooks) {
|
||||
});
|
||||
|
||||
test('401 responses result in deauthentication', async function (assert) {
|
||||
authenticateSession({
|
||||
await authenticateSession({
|
||||
scope: { id: globalScope.id, type: globalScope.type },
|
||||
});
|
||||
await visit(orgsURL);
|
||||
@@ -333,7 +333,7 @@ module('Acceptance | authentication', function (hooks) {
|
||||
});
|
||||
|
||||
test('color theme is applied from session data', async function (assert) {
|
||||
authenticateSession({
|
||||
await authenticateSession({
|
||||
scope: { id: globalScope.id, type: globalScope.type },
|
||||
});
|
||||
await visit(orgsURL);
|
||||
|
||||
@@ -40,7 +40,7 @@ module('Acceptance | credential-libraries | create', function (hooks) {
|
||||
newCredentialLibrary: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -71,7 +71,7 @@ module('Acceptance | credential-libraries | create', function (hooks) {
|
||||
// Generate resource counter
|
||||
getCredentialLibraryCount = () =>
|
||||
this.server.schema.credentialLibraries.all().models.length;
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ module('Acceptance | credential-libraries | delete', function (hooks) {
|
||||
unknownCredentialLibrary: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -73,7 +73,7 @@ module('Acceptance | credential-libraries | delete', function (hooks) {
|
||||
// Generate resource counter
|
||||
getCredentialLibraryCount = () =>
|
||||
this.server.schema.credentialLibraries.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete resource', async function (assert) {
|
||||
|
||||
@@ -31,7 +31,7 @@ module('Acceptance | credential-libraries | list', function (hooks) {
|
||||
credentialLibraries: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -56,7 +56,7 @@ module('Acceptance | credential-libraries | list', function (hooks) {
|
||||
urls.credentialStore = `${urls.credentialStores}/${instances.credentialStore.id}`;
|
||||
urls.credentialLibraries = `${urls.credentialStore}/credential-libraries`;
|
||||
urls.credentialLibrary = `${urls.credentialLibraries}/${instances.credentialLibrary.id}`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('Users can navigate to credential libraries with proper authorization', async function (assert) {
|
||||
|
||||
@@ -37,7 +37,7 @@ module('Acceptance | credential-libraries | read', function (hooks) {
|
||||
vaultSshCredentialLibrary: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -65,7 +65,7 @@ module('Acceptance | credential-libraries | read', function (hooks) {
|
||||
urls.credentialLibrary = `${urls.credentialLibraries}/${instances.credentialLibrary.id}`;
|
||||
urls.newCredentialLibrary = `${urls.credentialLibraries}/new`;
|
||||
urls.unknownCredentialLibrary = `${urls.credentialLibraries}/foo`;
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('can navigate to resource', async function (assert) {
|
||||
|
||||
@@ -53,7 +53,7 @@ module('Acceptance | credential-libraries | update', function (hooks) {
|
||||
unknownCredentialLibrary: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -81,7 +81,7 @@ module('Acceptance | credential-libraries | update', function (hooks) {
|
||||
urls.credentialLibrary = `${urls.credentialLibraries}/${instances.credentialLibrary.id}`;
|
||||
urls.newCredentialLibrary = `${urls.credentialLibraries}/new`;
|
||||
urls.unknownCredentialLibrary = `${urls.credentialLibraries}/foo`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('cannot update resource without proper authorization', async function (assert) {
|
||||
|
||||
@@ -36,7 +36,7 @@ module('Acceptance | credential-stores | create', function (hooks) {
|
||||
newCredentialStore: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -64,7 +64,7 @@ module('Acceptance | credential-stores | create', function (hooks) {
|
||||
return this.server.schema.credentialStores.where({ type: 'vault' }).models
|
||||
.length;
|
||||
};
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ module(
|
||||
newCredential: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -77,7 +77,7 @@ module(
|
||||
getJsonCredentialCount = () => {
|
||||
return this.server.schema.credentials.where({ type: 'json' }).length;
|
||||
};
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can create a new username & password credential', async function (assert) {
|
||||
|
||||
@@ -42,7 +42,7 @@ module(
|
||||
jsonCredential: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -92,7 +92,7 @@ module(
|
||||
getJSONCredentialCount = () => {
|
||||
return this.server.schema.credentials.where({ type: 'json' }).length;
|
||||
};
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete username & password credential', async function (assert) {
|
||||
|
||||
@@ -38,7 +38,7 @@ module('Acceptance | credential-stores | credentials | list', function (hooks) {
|
||||
newCredential: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -73,7 +73,7 @@ module('Acceptance | credential-stores | credentials | list', function (hooks) {
|
||||
urls.staticCredentialStore = `${urls.credentialStores}/${instances.staticCredentialStore.id}`;
|
||||
urls.credentials = `${urls.staticCredentialStore}/credentials`;
|
||||
urls.newCredential = `${urls.staticCredentialStore}/credentials/new`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('Users can navigate to credentials with proper authorization', async function (assert) {
|
||||
|
||||
@@ -39,7 +39,7 @@ module('Acceptance | credential-stores | credentials | read', function (hooks) {
|
||||
unknownCredential: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -77,7 +77,7 @@ module('Acceptance | credential-stores | credentials | read', function (hooks) {
|
||||
urls.usernameKeyPairCredential = `${urls.credentials}/${instances.usernameKeyPairCredential.id}`;
|
||||
urls.jsonCredential = `${urls.credentials}/${instances.jsonCredential.id}`;
|
||||
urls.unknownCredential = `${urls.credentials}/foo`;
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ module(
|
||||
jsonCredential: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -87,7 +87,7 @@ module(
|
||||
urls.jsonCredential = `${urls.credentials}/${instances.jsonCredential.id}`;
|
||||
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can save changes to existing username & password credential', async function (assert) {
|
||||
|
||||
@@ -42,7 +42,7 @@ module('Acceptance | credential-stores | delete', function (hooks) {
|
||||
vaultCredentialStore: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -77,7 +77,7 @@ module('Acceptance | credential-stores | delete', function (hooks) {
|
||||
return this.server.schema.credentialStores.where({ type: 'vault' }).models
|
||||
.length;
|
||||
};
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete credential store of type vault', async function (assert) {
|
||||
|
||||
@@ -44,7 +44,7 @@ module('Acceptance | credential-stores | list', function (hooks) {
|
||||
vaultCredentialStore: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -70,7 +70,7 @@ module('Acceptance | credential-stores | list', function (hooks) {
|
||||
|
||||
const featuresService = this.owner.lookup('service:features');
|
||||
featuresService.enable('static-credentials');
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can navigate to credential-stores with proper authorization', async function (assert) {
|
||||
|
||||
@@ -39,7 +39,7 @@ module('Acceptance | credential-stores | read', function (hooks) {
|
||||
unknownCredentialStore: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -67,7 +67,7 @@ module('Acceptance | credential-stores | read', function (hooks) {
|
||||
urls.vaultCredentialStore = `${urls.credentialStores}/${instances.vaultCredentialStore.id}`;
|
||||
urls.unknownCredentialStore = `${urls.credentialStores}/foo`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ module('Acceptance | credential-stores | update', function (hooks) {
|
||||
vaultCredentialStore: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -59,7 +59,7 @@ module('Acceptance | credential-stores | update', function (hooks) {
|
||||
urls.credentialStores = `${urls.projectScope}/credential-stores`;
|
||||
urls.vaultCredentialStore = `${urls.credentialStores}/${instances.vaultCredentialStore.id}`;
|
||||
urls.staticCredentialStore = `${urls.credentialStores}/${instances.staticCredentialStore.id}`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can save changes to existing static credential store', async function (assert) {
|
||||
|
||||
@@ -31,8 +31,8 @@ module('Acceptance | groups | create', function (hooks) {
|
||||
newGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.org = this.server.create(
|
||||
'scope',
|
||||
{
|
||||
|
||||
@@ -33,8 +33,8 @@ module('Acceptance | groups | delete', function (hooks) {
|
||||
newGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -35,7 +35,7 @@ module('Acceptance | groups | list', function (hooks) {
|
||||
group2: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create(
|
||||
'scope',
|
||||
@@ -56,7 +56,7 @@ module('Acceptance | groups | list', function (hooks) {
|
||||
urls.groups = `/scopes/${instances.scopes.org.id}/groups`;
|
||||
urls.group1 = `${urls.groups}/${instances.group1.id}`;
|
||||
urls.group2 = `${urls.groups}/${instances.group2.id}`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can navigate to groups with proper authorization', async function (assert) {
|
||||
|
||||
@@ -37,8 +37,8 @@ module('Acceptance | groups | members', function (hooks) {
|
||||
const ADD_MEMBERS_ACTION_SELECTOR =
|
||||
'[data-test-manage-group-dropdown] ul li a';
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -31,8 +31,8 @@ module('Acceptance | groups | read', function (hooks) {
|
||||
newGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -28,8 +28,8 @@ module('Acceptance | groups | update', function (hooks) {
|
||||
newGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -47,7 +47,7 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
newAzureDynamicHostCatalog: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.orgScope = this.server.create(
|
||||
@@ -87,7 +87,7 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
getHostCatalogCount = () =>
|
||||
this.server.schema.hostCatalogs.all().models.length;
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('Users can create new static host catalogs', async function (assert) {
|
||||
|
||||
@@ -38,7 +38,7 @@ module('Acceptance | host-catalogs | delete', function (hooks) {
|
||||
hostCatalog: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -61,7 +61,7 @@ module('Acceptance | host-catalogs | delete', function (hooks) {
|
||||
// Generate resource counter
|
||||
getHostCatalogCount = () =>
|
||||
this.server.schema.hostCatalogs.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete host catalog', async function (assert) {
|
||||
|
||||
@@ -49,7 +49,7 @@ module('Acceptance | host-catalogs | host sets | create', function (hooks) {
|
||||
newHostSet: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -79,7 +79,7 @@ module('Acceptance | host-catalogs | host sets | create', function (hooks) {
|
||||
urls.newHostSet = `${urls.hostSets}/new`;
|
||||
// Generate resource couner
|
||||
getHostSetCount = () => this.server.schema.hostSets.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can create new host sets', async function (assert) {
|
||||
|
||||
@@ -43,7 +43,7 @@ module('Acceptance | host-catalogs | host sets | delete', function (hooks) {
|
||||
newHostSet: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -73,7 +73,7 @@ module('Acceptance | host-catalogs | host sets | delete', function (hooks) {
|
||||
urls.newHostSet = `${urls.hostSets}/new`;
|
||||
// Generate resource couner
|
||||
getHostSetCount = () => this.server.schema.hostSets.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete host', async function (assert) {
|
||||
|
||||
@@ -52,7 +52,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) {
|
||||
newHost: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -85,7 +85,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) {
|
||||
// Generate resource counter
|
||||
getHostSetHostCount = () =>
|
||||
this.server.schema.hostSets.all().models[0].hosts.length;
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting host set hosts', async function (assert) {
|
||||
|
||||
@@ -36,7 +36,7 @@ module('Acceptance | host-catalogs | host sets | list', function (hooks) {
|
||||
newHostSet: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -63,7 +63,7 @@ module('Acceptance | host-catalogs | host sets | list', function (hooks) {
|
||||
urls.hostSets = `${urls.hostCatalog}/host-sets`;
|
||||
urls.hostSet = `${urls.hostSets}/${instances.hostSet.id}`;
|
||||
urls.newHostSet = `${urls.hostSets}/new`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('Users can navigate to host-sets with proper authorization', async function (assert) {
|
||||
|
||||
@@ -36,7 +36,7 @@ module('Acceptance | host-catalogs | host-sets | read', function (hooks) {
|
||||
unknownHostSet: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -64,7 +64,7 @@ module('Acceptance | host-catalogs | host-sets | read', function (hooks) {
|
||||
urls.hostSet = `${urls.hostSets}/${instances.hostSet.id}`;
|
||||
urls.unknownHostSet = `${urls.hostSets}/foo`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting host sets', async function (assert) {
|
||||
|
||||
@@ -62,7 +62,7 @@ module('Acceptance | host-catalogs | host sets | update', function (hooks) {
|
||||
azureHostSet: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -119,7 +119,7 @@ module('Acceptance | host-catalogs | host sets | update', function (hooks) {
|
||||
urls.awshostSet = `${urls.hostCatalogs}/${instances.awsHostCatalog.id}/host-sets/${instances.awsHostSet.id}`;
|
||||
urls.azureHostSet = `${urls.hostCatalogs}/${instances.azureHostCatalog.id}/host-sets/${instances.azureHostSet.id}`;
|
||||
// Generate resource couner
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('saving a new host set with invalid fields displays error messages', async function (assert) {
|
||||
|
||||
@@ -39,7 +39,7 @@ module('Acceptance | host-catalogs | hosts | create', function (hooks) {
|
||||
newHost: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -70,7 +70,7 @@ module('Acceptance | host-catalogs | hosts | create', function (hooks) {
|
||||
urls.newHost = `${urls.hosts}/new`;
|
||||
// Generate resource couner
|
||||
getHostCount = () => this.server.schema.hosts.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can create new host', async function (assert) {
|
||||
|
||||
@@ -43,7 +43,7 @@ module('Acceptance | host-catalogs | hosts | delete', function (hooks) {
|
||||
newHost: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -73,7 +73,7 @@ module('Acceptance | host-catalogs | hosts | delete', function (hooks) {
|
||||
urls.newHost = `${urls.hosts}/new`;
|
||||
// Generate resource couner
|
||||
getHostCount = () => this.server.schema.hosts.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete host', async function (assert) {
|
||||
|
||||
@@ -39,7 +39,7 @@ module('Acceptance | host-catalogs | hosts | list', function (hooks) {
|
||||
newHost: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -67,7 +67,7 @@ module('Acceptance | host-catalogs | hosts | list', function (hooks) {
|
||||
urls.host = `${urls.hosts}/${instances.host.id}`;
|
||||
urls.unknownHost = `${urls.hosts}/foo`;
|
||||
urls.newHost = `${urls.hosts}/new`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
test('Users can navigate to hosts with proper authorization', async function (assert) {
|
||||
await visit(urls.hostCatalog);
|
||||
|
||||
@@ -36,7 +36,7 @@ module('Acceptance | host-catalogs | hosts | read', function (hooks) {
|
||||
unknownHost: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -64,7 +64,7 @@ module('Acceptance | host-catalogs | hosts | read', function (hooks) {
|
||||
urls.host = `${urls.hosts}/${instances.host.id}`;
|
||||
urls.unknownHost = `${urls.hosts}/foo`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting hosts', async function (assert) {
|
||||
|
||||
@@ -35,7 +35,7 @@ module('Acceptance | host-catalogs | hosts | update', function (hooks) {
|
||||
newHost: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -64,7 +64,7 @@ module('Acceptance | host-catalogs | hosts | update', function (hooks) {
|
||||
urls.unknownHost = `${urls.hosts}/foo`;
|
||||
urls.newHost = `${urls.hosts}/new`;
|
||||
// Generate resource couner
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can save changes to existing host', async function (assert) {
|
||||
|
||||
@@ -44,7 +44,7 @@ module('Acceptance | host-catalogs | list', function (hooks) {
|
||||
const SEARCH_INPUT_SELECTOR = '.search-filtering [type="search"]';
|
||||
const NO_RESULTS_MSG_SELECTOR = '[data-test-no-host-catalog-results]';
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -76,7 +76,7 @@ module('Acceptance | host-catalogs | list', function (hooks) {
|
||||
urls.awsHostCatalog = `${urls.hostCatalogs}/${instances.awsHostCatalog.id}`;
|
||||
urls.azureHostCatalog = `${urls.hostCatalogs}/${instances.azureHostCatalog.id}`;
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('user can navigate to host catalogs with proper authorization', async function (assert) {
|
||||
|
||||
@@ -34,7 +34,7 @@ module('Acceptance | host-catalogs | read', function (hooks) {
|
||||
hostCatalog: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -56,7 +56,7 @@ module('Acceptance | host-catalogs | read', function (hooks) {
|
||||
urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`;
|
||||
urls.unknownHostCatalog = `${urls.hostCatalogs}/foo`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting host catalogs', async function (assert) {
|
||||
|
||||
@@ -47,7 +47,7 @@ module('Acceptance | host-catalogs | update', function (hooks) {
|
||||
const CREDENTIAL_TYPE_SELECTOR =
|
||||
'.dynamic-credential-selection input:checked';
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -77,7 +77,7 @@ module('Acceptance | host-catalogs | update', function (hooks) {
|
||||
urls.hostCatalogs = `${urls.projectScope}/host-catalogs`;
|
||||
urls.hostCatalog = `${urls.hostCatalogs}/${instances.hostCatalog.id}`;
|
||||
urls.AWSHostCatalogWithStaticCredential = `${urls.hostCatalogs}/${instances.AWSHostCatalogWithStaticCredential.id}`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can update static AWS credentials to Dynamic AWS credentials', async function (assert) {
|
||||
|
||||
@@ -53,8 +53,8 @@ module('Acceptance | managed-groups | create', function (hooks) {
|
||||
newLdapManagedGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -50,8 +50,8 @@ module('Acceptance | managed-groups | delete', function (hooks) {
|
||||
ldapManagedGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -43,8 +43,8 @@ module('Acceptance | managed-groups | list', function (hooks) {
|
||||
newLdapManagedGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -33,8 +33,8 @@ module('Acceptance | managed-groups | members', function (hooks) {
|
||||
managedGroupMembers: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -39,8 +39,8 @@ module('Acceptance | managed-groups | read', function (hooks) {
|
||||
ldapManagedGroup: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -19,8 +19,8 @@ module('Acceptance | onboarding', function (hooks) {
|
||||
orgs: '/scopes/global/scopes',
|
||||
};
|
||||
|
||||
hooks.beforeEach(() => {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async () => {
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('show targetAddress and targetPort fields', async function (assert) {
|
||||
|
||||
@@ -13,8 +13,8 @@ module('Acceptance | onboarding | success', function (hooks) {
|
||||
setupApplicationTest(hooks);
|
||||
setupMirage(hooks);
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
const urls = {
|
||||
|
||||
@@ -45,7 +45,7 @@ module('Acceptance | policies | create', function (hooks) {
|
||||
newPolicy: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -57,7 +57,7 @@ module('Acceptance | policies | create', function (hooks) {
|
||||
getPolicyCount = () => this.server.schema.policies.all().models.length;
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('users can create a new policy with global scope', async function (assert) {
|
||||
|
||||
@@ -35,8 +35,8 @@ module('Acceptance | policies | delete', function (hooks) {
|
||||
policy: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -38,7 +38,7 @@ module('Acceptance | policies | list', function (hooks) {
|
||||
policy: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -49,7 +49,7 @@ module('Acceptance | policies | list', function (hooks) {
|
||||
|
||||
intl = this.owner.lookup('service:intl');
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ module('Acceptance | policies | read', function (hooks) {
|
||||
unknownPolicy: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -52,7 +52,7 @@ module('Acceptance | policies | read', function (hooks) {
|
||||
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting a policy', async function (assert) {
|
||||
|
||||
@@ -43,7 +43,7 @@ module('Acceptance | policies | update', function (hooks) {
|
||||
policy: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
|
||||
instances.policy = this.server.create('policy', {
|
||||
@@ -56,7 +56,7 @@ module('Acceptance | policies | update', function (hooks) {
|
||||
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can update forever select option to a custom input', async function (assert) {
|
||||
|
||||
@@ -32,8 +32,8 @@ module('Acceptance | roles | create', function (hooks) {
|
||||
orgScope: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.org = this.server.create(
|
||||
'scope',
|
||||
{
|
||||
|
||||
@@ -33,8 +33,8 @@ module('Acceptance | roles | delete', function (hooks) {
|
||||
newRole: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -86,8 +86,8 @@ module('Acceptance | roles | global-scope', function (hooks) {
|
||||
manageCustomScopes: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
confirmService = this.owner.lookup('service:confirm');
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
|
||||
@@ -39,8 +39,8 @@ module('Acceptance | roles | grants', function (hooks) {
|
||||
const grantsForm = 'form:nth-child(2)';
|
||||
let grantsCount;
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -49,7 +49,7 @@ module('Acceptance | roles | list', function (hooks) {
|
||||
role2: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -66,7 +66,7 @@ module('Acceptance | roles | list', function (hooks) {
|
||||
urls.roles = `/scopes/${instances.scopes.org.id}/roles`;
|
||||
urls.role1 = `${urls.roles}/${instances.role1.id}`;
|
||||
urls.role2 = `${urls.roles}/${instances.role2.id}`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can navigate to roles with proper authorization', async function (assert) {
|
||||
|
||||
@@ -79,8 +79,8 @@ module('Acceptance | roles | org-scope', function (hooks) {
|
||||
manageOrgProjects: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
confirmService = this.owner.lookup('service:confirm');
|
||||
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
|
||||
@@ -35,8 +35,8 @@ module('Acceptance | roles | principals', function (hooks) {
|
||||
};
|
||||
let principalsCount;
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -40,8 +40,8 @@ module('Acceptance | roles | project-scope', function (hooks) {
|
||||
roleScopes: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -31,8 +31,8 @@ module('Acceptance | roles | read', function (hooks) {
|
||||
newRole: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({ username: 'admin' });
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({ username: 'admin' });
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -29,8 +29,8 @@ module('Acceptance | roles | update', function (hooks) {
|
||||
newRole: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
authenticateSession({});
|
||||
hooks.beforeEach(async function () {
|
||||
await authenticateSession({});
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
|
||||
@@ -52,7 +52,7 @@ module('Acceptance | scopes', function (hooks) {
|
||||
project2ScopeEdit: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -87,7 +87,7 @@ module('Acceptance | scopes', function (hooks) {
|
||||
urls.project2ScopeEdit = `${urls.project2Scope}/edit`;
|
||||
// Generate resource counter
|
||||
getScopeCount = (type) => this.server.schema.scopes.where({ type }).length;
|
||||
authenticateSession({ isGlobal: true, username: 'admin' });
|
||||
await authenticateSession({ isGlobal: true, username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting global scope', async function (assert) {
|
||||
|
||||
@@ -50,7 +50,7 @@ module('Acceptance | scope | add storage policy', function (hooks) {
|
||||
addStoragePolicy: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
@@ -74,7 +74,7 @@ module('Acceptance | scope | add storage policy', function (hooks) {
|
||||
urls.policy = `${urls.policies}/${policyOne.id}`;
|
||||
urls.addStoragePolicy = `${urls.orgScope}/add-storage-policy`;
|
||||
urls.newPolicy = `${urls.addStoragePolicy}/create`;
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('cannot attach policy on a scope without proper authorization', async function (assert) {
|
||||
|
||||
@@ -37,7 +37,7 @@ module('Acceptance | scopes | delete', function (hooks) {
|
||||
projectScopeEdit: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -55,7 +55,7 @@ module('Acceptance | scopes | delete', function (hooks) {
|
||||
urls.projectScope = `/scopes/${instances.scopes.project.id}`;
|
||||
// Generate resource counter
|
||||
getScopeCount = (type) => this.server.schema.scopes.where({ type }).length;
|
||||
authenticateSession({ isGlobal: true });
|
||||
await authenticateSession({ isGlobal: true });
|
||||
});
|
||||
|
||||
test('can delete scope', async function (assert) {
|
||||
|
||||
@@ -35,7 +35,7 @@ module('Acceptance | scopes | list', function (hooks) {
|
||||
orgScope: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org1 = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -55,7 +55,7 @@ module('Acceptance | scopes | list', function (hooks) {
|
||||
});
|
||||
urls.globalScope = `/scopes/global/scopes`;
|
||||
urls.orgScope = `/scopes/${instances.scopes.org1.id}/scopes`;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('user can search for a specifc org scope by id', async function (assert) {
|
||||
|
||||
@@ -39,7 +39,7 @@ module('Acceptance | scopes | read', function (hooks) {
|
||||
orgScopeEdit: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -53,7 +53,7 @@ module('Acceptance | scopes | read', function (hooks) {
|
||||
urls.orgScopeEdit = `/scopes/${instances.scopes.org.id}/edit`;
|
||||
features = this.owner.lookup('service:features');
|
||||
featureEdition = this.owner.lookup('service:featureEdition');
|
||||
authenticateSession({ isGlobal: true, username: 'admin' });
|
||||
await authenticateSession({ isGlobal: true, username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting org scope edit', async function (assert) {
|
||||
|
||||
@@ -30,7 +30,7 @@ module('Acceptance | scopes | update', function (hooks) {
|
||||
projectScope: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -50,7 +50,7 @@ module('Acceptance | scopes | update', function (hooks) {
|
||||
urls.orgScope = `/scopes/${instances.scopes.org.id}/scopes`;
|
||||
urls.orgScopeEdit = `/scopes/${instances.scopes.org.id}/edit`;
|
||||
urls.projectScope = `/scopes/${instances.scopes.project.id}`;
|
||||
authenticateSession({ isGlobal: true });
|
||||
await authenticateSession({ isGlobal: true });
|
||||
});
|
||||
|
||||
test('can save changes to existing scope', async function (assert) {
|
||||
|
||||
@@ -61,7 +61,7 @@ module('Acceptance | session recordings | list', function (hooks) {
|
||||
sessionRecording2: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -122,7 +122,7 @@ module('Acceptance | session recordings | list', function (hooks) {
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
featuresService.enable('ssh-session-recording');
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('users can navigate to session-recordings with proper authorization', async function (assert) {
|
||||
|
||||
@@ -42,7 +42,7 @@ module('Acceptance | session-recordings | read', function (hooks) {
|
||||
channelRecording: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -69,7 +69,7 @@ module('Acceptance | session-recordings | read', function (hooks) {
|
||||
urls.sessionRecordings = `${urls.globalScope}/session-recordings`;
|
||||
urls.sessionRecording = `${urls.sessionRecordings}/${instances.sessionRecording.id}/channels-by-connection`;
|
||||
urls.channelRecording = `${urls.sessionRecording}/${instances.channelRecording.id}`;
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ module(
|
||||
channelRecording: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -81,7 +81,7 @@ module(
|
||||
this.server.schema.sessionRecordings.all().models.length;
|
||||
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('user can navigate to a channel', async function (assert) {
|
||||
|
||||
@@ -51,7 +51,7 @@ module('Acceptance | sessions | list', function (hooks) {
|
||||
sessions: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.admin = this.server.create('user', {
|
||||
scopeId: 'global',
|
||||
@@ -98,7 +98,7 @@ module('Acceptance | sessions | list', function (hooks) {
|
||||
urls.projectScope = `/scopes/${instances.scopes.project.id}`;
|
||||
urls.sessions = `${urls.projectScope}/sessions`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting sessions', async function (assert) {
|
||||
|
||||
@@ -33,7 +33,7 @@ module('Acceptance | storage-buckets | create', function (hooks) {
|
||||
newStorageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -47,7 +47,7 @@ module('Acceptance | storage-buckets | create', function (hooks) {
|
||||
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('users can create a new storage bucket aws plugin type with global scope', async function (assert) {
|
||||
|
||||
@@ -42,7 +42,7 @@ module('Acceptance | storage-buckets | delete', function (hooks) {
|
||||
storageBuckets: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -56,7 +56,7 @@ module('Acceptance | storage-buckets | delete', function (hooks) {
|
||||
getStorageBucketCount = () =>
|
||||
this.server.schema.storageBuckets.all().models.length;
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
intl = this.owner.lookup('service:intl');
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
|
||||
@@ -34,7 +34,7 @@ module('Acceptance | storage-buckets | list', function (hooks) {
|
||||
storageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -45,7 +45,7 @@ module('Acceptance | storage-buckets | list', function (hooks) {
|
||||
|
||||
intl = this.owner.lookup('service:intl');
|
||||
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
});
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ module('Acceptance | storage-buckets | read', function (hooks) {
|
||||
unknownStorageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -50,7 +50,7 @@ module('Acceptance | storage-buckets | read', function (hooks) {
|
||||
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting a storage bucket', async function (assert) {
|
||||
|
||||
@@ -30,7 +30,7 @@ module('Acceptance | storage-buckets | update', function (hooks) {
|
||||
storageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.storageBucket = this.server.create('storage-bucket', {
|
||||
scope: instances.scopes.global,
|
||||
|
||||
@@ -49,7 +49,7 @@ module('Acceptance | targets | brokered credential sources', function (hooks) {
|
||||
brokeredCredentialSources: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
@@ -117,7 +117,7 @@ module('Acceptance | targets | brokered credential sources', function (hooks) {
|
||||
this.server.schema.credentials.all().models.length;
|
||||
credentialSourceCount = getCredentialLibraryCount() + getCredentialCount();
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('visiting target brokered credential sources', async function (assert) {
|
||||
|
||||
@@ -50,7 +50,7 @@ module('Acceptance | targets | create-alias', function (hooks) {
|
||||
target: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
const { owner } = getContext();
|
||||
featuresService = owner.lookup('service:features');
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
@@ -78,7 +78,7 @@ module('Acceptance | targets | create-alias', function (hooks) {
|
||||
|
||||
getAliasCount = () => this.server.schema.aliases.all().models.length;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('users can create a new alias for a target of TCP type', async function (assert) {
|
||||
|
||||
@@ -49,7 +49,7 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
newSSHTarget: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
const { owner } = getContext();
|
||||
featuresService = owner.lookup('service:features');
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
@@ -79,7 +79,7 @@ module('Acceptance | targets | create', function (hooks) {
|
||||
this.server.schema.targets.where({ type: TYPE_TARGET_SSH }).models.length;
|
||||
getTCPTargetCount = () =>
|
||||
this.server.schema.targets.where({ type: TYPE_TARGET_TCP }).models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('defaults to type `ssh` when no query param provided', async function (assert) {
|
||||
|
||||
@@ -38,7 +38,7 @@ module('Acceptance | targets | delete', function (hooks) {
|
||||
newTarget: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
@@ -60,7 +60,7 @@ module('Acceptance | targets | delete', function (hooks) {
|
||||
urls.newTarget = `${urls.targets}/new`;
|
||||
// Generate resource counter
|
||||
getTargetCount = () => this.server.schema.targets.all().models.length;
|
||||
authenticateSession({});
|
||||
await authenticateSession({});
|
||||
});
|
||||
|
||||
test('can delete target', async function (assert) {
|
||||
|
||||
@@ -53,7 +53,7 @@ module('Acceptance | targets | enable session recording', function (hooks) {
|
||||
newStorageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
@@ -89,7 +89,7 @@ module('Acceptance | targets | enable session recording', function (hooks) {
|
||||
urls.newStorageBucket = `${urls.enableSessionRecording}/create-storage-bucket`;
|
||||
urls.storageBucket = `${urls.storageBuckets}/${storageBucketOne.id}`;
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('cannot enable session recording for a target without proper authorization', async function (assert) {
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ module(
|
||||
newStorageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
instances.scopes.org = this.server.create('scope', {
|
||||
type: 'org',
|
||||
@@ -74,7 +74,7 @@ module(
|
||||
|
||||
features = this.owner.lookup('service:features');
|
||||
features.enable('ssh-session-recording');
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('users can create a new storage bucket with global scope', async function (assert) {
|
||||
|
||||
@@ -56,7 +56,7 @@ module(
|
||||
newStorageBucket: null,
|
||||
};
|
||||
|
||||
hooks.beforeEach(function () {
|
||||
hooks.beforeEach(async function () {
|
||||
featuresService = this.owner.lookup('service:features');
|
||||
// Generate resources
|
||||
instances.scopes.global = this.server.create('scope', { id: 'global' });
|
||||
@@ -94,7 +94,7 @@ module(
|
||||
|
||||
intl = this.owner.lookup('service:intl');
|
||||
|
||||
authenticateSession({ username: 'admin' });
|
||||
await authenticateSession({ username: 'admin' });
|
||||
});
|
||||
|
||||
test('cannot enable session recording for a target without proper authorization', async function (assert) {
|
||||
|
||||
Loaded 100 of 165 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user