diff --git a/ui/admin/tests/acceptance/accounts/change-password-test.js b/ui/admin/tests/acceptance/accounts/change-password-test.js index 3d7a868296..4787620175 100644 --- a/ui/admin/tests/acceptance/accounts/change-password-test.js +++ b/ui/admin/tests/acceptance/accounts/change-password-test.js @@ -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', }); diff --git a/ui/admin/tests/acceptance/accounts/create-test.js b/ui/admin/tests/acceptance/accounts/create-test.js index 55421fb929..0ce845a6fa 100644 --- a/ui/admin/tests/acceptance/accounts/create-test.js +++ b/ui/admin/tests/acceptance/accounts/create-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/accounts/delete-test.js b/ui/admin/tests/acceptance/accounts/delete-test.js index 963e0b285a..c0cc9e9506 100644 --- a/ui/admin/tests/acceptance/accounts/delete-test.js +++ b/ui/admin/tests/acceptance/accounts/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/accounts/list-test.js b/ui/admin/tests/acceptance/accounts/list-test.js index 2d4e9a172b..57396a8c36 100644 --- a/ui/admin/tests/acceptance/accounts/list-test.js +++ b/ui/admin/tests/acceptance/accounts/list-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/accounts/read-test.js b/ui/admin/tests/acceptance/accounts/read-test.js index 73ed838f92..e640f312fd 100644 --- a/ui/admin/tests/acceptance/accounts/read-test.js +++ b/ui/admin/tests/acceptance/accounts/read-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/accounts/set-password-test.js b/ui/admin/tests/acceptance/accounts/set-password-test.js index a781f29631..7e6d6c40cf 100644 --- a/ui/admin/tests/acceptance/accounts/set-password-test.js +++ b/ui/admin/tests/acceptance/accounts/set-password-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/accounts/update-test.js b/ui/admin/tests/acceptance/accounts/update-test.js index 74bd33a03b..af3195f338 100644 --- a/ui/admin/tests/acceptance/accounts/update-test.js +++ b/ui/admin/tests/acceptance/accounts/update-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/aliases/create-test.js b/ui/admin/tests/acceptance/aliases/create-test.js index 16c28b432d..f571bd9e5a 100644 --- a/ui/admin/tests/acceptance/aliases/create-test.js +++ b/ui/admin/tests/acceptance/aliases/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/aliases/delete-test.js b/ui/admin/tests/acceptance/aliases/delete-test.js index 81885c1bbd..3c30d0296b 100644 --- a/ui/admin/tests/acceptance/aliases/delete-test.js +++ b/ui/admin/tests/acceptance/aliases/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/aliases/list-test.js b/ui/admin/tests/acceptance/aliases/list-test.js index 0f1e549ec5..39701da444 100644 --- a/ui/admin/tests/acceptance/aliases/list-test.js +++ b/ui/admin/tests/acceptance/aliases/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/aliases/read-test.js b/ui/admin/tests/acceptance/aliases/read-test.js index f40e955fa3..483132d848 100644 --- a/ui/admin/tests/acceptance/aliases/read-test.js +++ b/ui/admin/tests/acceptance/aliases/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/aliases/update-test.js b/ui/admin/tests/acceptance/aliases/update-test.js index 37e49392de..2820e0c52f 100644 --- a/ui/admin/tests/acceptance/aliases/update-test.js +++ b/ui/admin/tests/acceptance/aliases/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/auth-methods/create-test.js b/ui/admin/tests/acceptance/auth-methods/create-test.js index 88b07a1f59..25d83725f1 100644 --- a/ui/admin/tests/acceptance/auth-methods/create-test.js +++ b/ui/admin/tests/acceptance/auth-methods/create-test.js @@ -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', { diff --git a/ui/admin/tests/acceptance/auth-methods/delete-test.js b/ui/admin/tests/acceptance/auth-methods/delete-test.js index b28c31e467..b63b529be2 100644 --- a/ui/admin/tests/acceptance/auth-methods/delete-test.js +++ b/ui/admin/tests/acceptance/auth-methods/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/auth-methods/list-test.js b/ui/admin/tests/acceptance/auth-methods/list-test.js index 1a9817a01f..77f9f1b2f2 100644 --- a/ui/admin/tests/acceptance/auth-methods/list-test.js +++ b/ui/admin/tests/acceptance/auth-methods/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/auth-methods/oidc-test.js b/ui/admin/tests/acceptance/auth-methods/oidc-test.js index 2c24d550ab..43bf98e1dd 100644 --- a/ui/admin/tests/acceptance/auth-methods/oidc-test.js +++ b/ui/admin/tests/acceptance/auth-methods/oidc-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/auth-methods/read-test.js b/ui/admin/tests/acceptance/auth-methods/read-test.js index 88d1de9696..0b3fd07388 100644 --- a/ui/admin/tests/acceptance/auth-methods/read-test.js +++ b/ui/admin/tests/acceptance/auth-methods/read-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/auth-methods/update-test.js b/ui/admin/tests/acceptance/auth-methods/update-test.js index fbe6eae5e1..6458bb141b 100644 --- a/ui/admin/tests/acceptance/auth-methods/update-test.js +++ b/ui/admin/tests/acceptance/auth-methods/update-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/authentication-test.js b/ui/admin/tests/acceptance/authentication-test.js index 7b10d49508..949f9e4158 100644 --- a/ui/admin/tests/acceptance/authentication-test.js +++ b/ui/admin/tests/acceptance/authentication-test.js @@ -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); diff --git a/ui/admin/tests/acceptance/credential-library/create-test.js b/ui/admin/tests/acceptance/credential-library/create-test.js index 4127772fcd..c14fe80706 100644 --- a/ui/admin/tests/acceptance/credential-library/create-test.js +++ b/ui/admin/tests/acceptance/credential-library/create-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/credential-library/delete-test.js b/ui/admin/tests/acceptance/credential-library/delete-test.js index 1a2c1b1827..f5ee59daee 100644 --- a/ui/admin/tests/acceptance/credential-library/delete-test.js +++ b/ui/admin/tests/acceptance/credential-library/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-library/list-test.js b/ui/admin/tests/acceptance/credential-library/list-test.js index 017b6d6a59..3b7dcc8b7d 100644 --- a/ui/admin/tests/acceptance/credential-library/list-test.js +++ b/ui/admin/tests/acceptance/credential-library/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-library/read-test.js b/ui/admin/tests/acceptance/credential-library/read-test.js index 82bb2e4a98..2794a145eb 100644 --- a/ui/admin/tests/acceptance/credential-library/read-test.js +++ b/ui/admin/tests/acceptance/credential-library/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-library/update-test.js b/ui/admin/tests/acceptance/credential-library/update-test.js index 19b24eba30..28b93d1f95 100644 --- a/ui/admin/tests/acceptance/credential-library/update-test.js +++ b/ui/admin/tests/acceptance/credential-library/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/create-test.js b/ui/admin/tests/acceptance/credential-store/create-test.js index 5eb3f3b512..3eb9219975 100644 --- a/ui/admin/tests/acceptance/credential-store/create-test.js +++ b/ui/admin/tests/acceptance/credential-store/create-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/credential-store/credentials/create-test.js b/ui/admin/tests/acceptance/credential-store/credentials/create-test.js index 1c004ce47b..2dbfa320fe 100644 --- a/ui/admin/tests/acceptance/credential-store/credentials/create-test.js +++ b/ui/admin/tests/acceptance/credential-store/credentials/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/credentials/delete-test.js b/ui/admin/tests/acceptance/credential-store/credentials/delete-test.js index bf53e345aa..13466e9b9e 100644 --- a/ui/admin/tests/acceptance/credential-store/credentials/delete-test.js +++ b/ui/admin/tests/acceptance/credential-store/credentials/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/credentials/list-test.js b/ui/admin/tests/acceptance/credential-store/credentials/list-test.js index a73edcdc6d..7154d4eb14 100644 --- a/ui/admin/tests/acceptance/credential-store/credentials/list-test.js +++ b/ui/admin/tests/acceptance/credential-store/credentials/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/credentials/read-test.js b/ui/admin/tests/acceptance/credential-store/credentials/read-test.js index ecfafc63e4..91324a860d 100644 --- a/ui/admin/tests/acceptance/credential-store/credentials/read-test.js +++ b/ui/admin/tests/acceptance/credential-store/credentials/read-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/credential-store/credentials/update-test.js b/ui/admin/tests/acceptance/credential-store/credentials/update-test.js index 86acc2a182..5230d0ab21 100644 --- a/ui/admin/tests/acceptance/credential-store/credentials/update-test.js +++ b/ui/admin/tests/acceptance/credential-store/credentials/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/delete-test.js b/ui/admin/tests/acceptance/credential-store/delete-test.js index fc0481f8fb..a4d234d840 100644 --- a/ui/admin/tests/acceptance/credential-store/delete-test.js +++ b/ui/admin/tests/acceptance/credential-store/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/list-test.js b/ui/admin/tests/acceptance/credential-store/list-test.js index 3afbb68947..521c36d1b3 100644 --- a/ui/admin/tests/acceptance/credential-store/list-test.js +++ b/ui/admin/tests/acceptance/credential-store/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/credential-store/read-test.js b/ui/admin/tests/acceptance/credential-store/read-test.js index 0d471bdd15..c96a188314 100644 --- a/ui/admin/tests/acceptance/credential-store/read-test.js +++ b/ui/admin/tests/acceptance/credential-store/read-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/credential-store/update-test.js b/ui/admin/tests/acceptance/credential-store/update-test.js index a3ab4ba10e..8123ab6dc1 100644 --- a/ui/admin/tests/acceptance/credential-store/update-test.js +++ b/ui/admin/tests/acceptance/credential-store/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/groups/create-test.js b/ui/admin/tests/acceptance/groups/create-test.js index b6560071a1..6d226d7b87 100644 --- a/ui/admin/tests/acceptance/groups/create-test.js +++ b/ui/admin/tests/acceptance/groups/create-test.js @@ -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', { diff --git a/ui/admin/tests/acceptance/groups/delete-test.js b/ui/admin/tests/acceptance/groups/delete-test.js index 301e9ee120..ef28b75bd4 100644 --- a/ui/admin/tests/acceptance/groups/delete-test.js +++ b/ui/admin/tests/acceptance/groups/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/groups/list-test.js b/ui/admin/tests/acceptance/groups/list-test.js index d0ec248a95..07e49d60d5 100644 --- a/ui/admin/tests/acceptance/groups/list-test.js +++ b/ui/admin/tests/acceptance/groups/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/groups/members-test.js b/ui/admin/tests/acceptance/groups/members-test.js index 436b71d2ae..8feda962e0 100644 --- a/ui/admin/tests/acceptance/groups/members-test.js +++ b/ui/admin/tests/acceptance/groups/members-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/groups/read-test.js b/ui/admin/tests/acceptance/groups/read-test.js index 56524d3f30..e74ee74680 100644 --- a/ui/admin/tests/acceptance/groups/read-test.js +++ b/ui/admin/tests/acceptance/groups/read-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/groups/update-test.js b/ui/admin/tests/acceptance/groups/update-test.js index bebe103a4b..3fb55c9702 100644 --- a/ui/admin/tests/acceptance/groups/update-test.js +++ b/ui/admin/tests/acceptance/groups/update-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index 067b3cbfdd..95aaaaa85e 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/delete-test.js b/ui/admin/tests/acceptance/host-catalogs/delete-test.js index ca2a6a23cc..2a8cd6e8b9 100644 --- a/ui/admin/tests/acceptance/host-catalogs/delete-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js index ef804f22fb..a9906a4456 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js index 83e5e3bed7..82529926b8 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js index 63122c079a..19fbd677d0 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/hosts-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/list-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/list-test.js index 5753fca8e9..54eda5971c 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/list-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js index 73eae6ac22..a8a9b0536e 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js index d516040bb6..13bfa4dafa 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js index f3bd2cabd9..64cde54e49 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js index a146b1fd62..1aeaf24055 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/list-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/list-test.js index 8b5a0d2160..d1660818f5 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/list-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/list-test.js @@ -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); diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js index 16ee14445b..9351fcb8ed 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js b/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js index 7dd34192e5..b93d87f826 100644 --- a/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/hosts/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/list-test.js b/ui/admin/tests/acceptance/host-catalogs/list-test.js index e039177910..a1eecb0ba7 100644 --- a/ui/admin/tests/acceptance/host-catalogs/list-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/read-test.js b/ui/admin/tests/acceptance/host-catalogs/read-test.js index 401746baeb..b2ab8ccfeb 100644 --- a/ui/admin/tests/acceptance/host-catalogs/read-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/host-catalogs/update-test.js b/ui/admin/tests/acceptance/host-catalogs/update-test.js index 3df14a6dcc..38151056ff 100644 --- a/ui/admin/tests/acceptance/host-catalogs/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/managed-groups/create-test.js b/ui/admin/tests/acceptance/managed-groups/create-test.js index 8434ce7e8a..c82c5fb374 100644 --- a/ui/admin/tests/acceptance/managed-groups/create-test.js +++ b/ui/admin/tests/acceptance/managed-groups/create-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/managed-groups/delete-test.js b/ui/admin/tests/acceptance/managed-groups/delete-test.js index d2157be059..343e656bda 100644 --- a/ui/admin/tests/acceptance/managed-groups/delete-test.js +++ b/ui/admin/tests/acceptance/managed-groups/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/managed-groups/list-test.js b/ui/admin/tests/acceptance/managed-groups/list-test.js index c81c552a2f..f906a9af74 100644 --- a/ui/admin/tests/acceptance/managed-groups/list-test.js +++ b/ui/admin/tests/acceptance/managed-groups/list-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/managed-groups/members-test.js b/ui/admin/tests/acceptance/managed-groups/members-test.js index 0fc02a2e4b..95f1ec123e 100644 --- a/ui/admin/tests/acceptance/managed-groups/members-test.js +++ b/ui/admin/tests/acceptance/managed-groups/members-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/managed-groups/read-test.js b/ui/admin/tests/acceptance/managed-groups/read-test.js index 0dff6da6b9..ddeddf5311 100644 --- a/ui/admin/tests/acceptance/managed-groups/read-test.js +++ b/ui/admin/tests/acceptance/managed-groups/read-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/onboarding/onboarding-test.js b/ui/admin/tests/acceptance/onboarding/onboarding-test.js index 642fcab946..3d5da16362 100644 --- a/ui/admin/tests/acceptance/onboarding/onboarding-test.js +++ b/ui/admin/tests/acceptance/onboarding/onboarding-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/onboarding/success-test.js b/ui/admin/tests/acceptance/onboarding/success-test.js index 904091d1d0..2926935a1d 100644 --- a/ui/admin/tests/acceptance/onboarding/success-test.js +++ b/ui/admin/tests/acceptance/onboarding/success-test.js @@ -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 = { diff --git a/ui/admin/tests/acceptance/policy/create-test.js b/ui/admin/tests/acceptance/policy/create-test.js index e0658c4dca..ed7853477c 100644 --- a/ui/admin/tests/acceptance/policy/create-test.js +++ b/ui/admin/tests/acceptance/policy/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/policy/delete-test.js b/ui/admin/tests/acceptance/policy/delete-test.js index 1c8232c3a8..4ad1162477 100644 --- a/ui/admin/tests/acceptance/policy/delete-test.js +++ b/ui/admin/tests/acceptance/policy/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/policy/list-test.js b/ui/admin/tests/acceptance/policy/list-test.js index 20657ba209..55460be367 100644 --- a/ui/admin/tests/acceptance/policy/list-test.js +++ b/ui/admin/tests/acceptance/policy/list-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/policy/read-test.js b/ui/admin/tests/acceptance/policy/read-test.js index f012212c53..04195cabc8 100644 --- a/ui/admin/tests/acceptance/policy/read-test.js +++ b/ui/admin/tests/acceptance/policy/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/policy/update-test.js b/ui/admin/tests/acceptance/policy/update-test.js index b5de7d8654..398fdec030 100644 --- a/ui/admin/tests/acceptance/policy/update-test.js +++ b/ui/admin/tests/acceptance/policy/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/roles/create-test.js b/ui/admin/tests/acceptance/roles/create-test.js index 321626b580..39e509c964 100644 --- a/ui/admin/tests/acceptance/roles/create-test.js +++ b/ui/admin/tests/acceptance/roles/create-test.js @@ -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', { diff --git a/ui/admin/tests/acceptance/roles/delete-test.js b/ui/admin/tests/acceptance/roles/delete-test.js index eed2f09235..c43e21c43f 100644 --- a/ui/admin/tests/acceptance/roles/delete-test.js +++ b/ui/admin/tests/acceptance/roles/delete-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/roles/global-scope-test.js b/ui/admin/tests/acceptance/roles/global-scope-test.js index 015f964704..163e1bebff 100644 --- a/ui/admin/tests/acceptance/roles/global-scope-test.js +++ b/ui/admin/tests/acceptance/roles/global-scope-test.js @@ -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' }); diff --git a/ui/admin/tests/acceptance/roles/grants-test.js b/ui/admin/tests/acceptance/roles/grants-test.js index 8ff1dc95f9..1061d271cd 100644 --- a/ui/admin/tests/acceptance/roles/grants-test.js +++ b/ui/admin/tests/acceptance/roles/grants-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/roles/list-test.js b/ui/admin/tests/acceptance/roles/list-test.js index 7a2002bbdb..131463aa98 100644 --- a/ui/admin/tests/acceptance/roles/list-test.js +++ b/ui/admin/tests/acceptance/roles/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/roles/org-scope-test.js b/ui/admin/tests/acceptance/roles/org-scope-test.js index 1d26bb2bc7..664bd6dbe5 100644 --- a/ui/admin/tests/acceptance/roles/org-scope-test.js +++ b/ui/admin/tests/acceptance/roles/org-scope-test.js @@ -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' }); diff --git a/ui/admin/tests/acceptance/roles/principals-test.js b/ui/admin/tests/acceptance/roles/principals-test.js index 9d2abdab0a..26b7755147 100644 --- a/ui/admin/tests/acceptance/roles/principals-test.js +++ b/ui/admin/tests/acceptance/roles/principals-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/roles/project-scope-test.js b/ui/admin/tests/acceptance/roles/project-scope-test.js index aee2543b8d..1bbb4699ea 100644 --- a/ui/admin/tests/acceptance/roles/project-scope-test.js +++ b/ui/admin/tests/acceptance/roles/project-scope-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/roles/read-test.js b/ui/admin/tests/acceptance/roles/read-test.js index 3e04cdeeb8..085d551921 100644 --- a/ui/admin/tests/acceptance/roles/read-test.js +++ b/ui/admin/tests/acceptance/roles/read-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/roles/update-test.js b/ui/admin/tests/acceptance/roles/update-test.js index f2d17a2e0e..2df9a4e65f 100644 --- a/ui/admin/tests/acceptance/roles/update-test.js +++ b/ui/admin/tests/acceptance/roles/update-test.js @@ -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', diff --git a/ui/admin/tests/acceptance/scopes-test.js b/ui/admin/tests/acceptance/scopes-test.js index dba906dc48..c22d0aba87 100644 --- a/ui/admin/tests/acceptance/scopes-test.js +++ b/ui/admin/tests/acceptance/scopes-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/scopes/add-storage-policy-test.js b/ui/admin/tests/acceptance/scopes/add-storage-policy-test.js index 5c81118a4e..8f7d83aedf 100644 --- a/ui/admin/tests/acceptance/scopes/add-storage-policy-test.js +++ b/ui/admin/tests/acceptance/scopes/add-storage-policy-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/scopes/delete-test.js b/ui/admin/tests/acceptance/scopes/delete-test.js index 1a9cbd9bb1..59320599e7 100644 --- a/ui/admin/tests/acceptance/scopes/delete-test.js +++ b/ui/admin/tests/acceptance/scopes/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/scopes/list-test.js b/ui/admin/tests/acceptance/scopes/list-test.js index fae969a833..7f185dd7bb 100644 --- a/ui/admin/tests/acceptance/scopes/list-test.js +++ b/ui/admin/tests/acceptance/scopes/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/scopes/read-test.js b/ui/admin/tests/acceptance/scopes/read-test.js index e72b754dbe..ce1a4be6ca 100644 --- a/ui/admin/tests/acceptance/scopes/read-test.js +++ b/ui/admin/tests/acceptance/scopes/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/scopes/update-test.js b/ui/admin/tests/acceptance/scopes/update-test.js index bb8479f410..48ebb09ff3 100644 --- a/ui/admin/tests/acceptance/scopes/update-test.js +++ b/ui/admin/tests/acceptance/scopes/update-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/session-recordings/list-test.js b/ui/admin/tests/acceptance/session-recordings/list-test.js index 42e077c066..8cda56987d 100644 --- a/ui/admin/tests/acceptance/session-recordings/list-test.js +++ b/ui/admin/tests/acceptance/session-recordings/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/session-recordings/read-test.js b/ui/admin/tests/acceptance/session-recordings/read-test.js index 542ce77afd..1613f69a76 100644 --- a/ui/admin/tests/acceptance/session-recordings/read-test.js +++ b/ui/admin/tests/acceptance/session-recordings/read-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/session-recordings/session-recording/channels-by-connection/channel-test.js b/ui/admin/tests/acceptance/session-recordings/session-recording/channels-by-connection/channel-test.js index b791ac31da..e49efd784e 100644 --- a/ui/admin/tests/acceptance/session-recordings/session-recording/channels-by-connection/channel-test.js +++ b/ui/admin/tests/acceptance/session-recordings/session-recording/channels-by-connection/channel-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/sessions/list-test.js b/ui/admin/tests/acceptance/sessions/list-test.js index 3469cd9e58..6f753fd48c 100644 --- a/ui/admin/tests/acceptance/sessions/list-test.js +++ b/ui/admin/tests/acceptance/sessions/list-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/storage-buckets/create-test.js b/ui/admin/tests/acceptance/storage-buckets/create-test.js index ba1ae3c0ef..bf2ea9ac4b 100644 --- a/ui/admin/tests/acceptance/storage-buckets/create-test.js +++ b/ui/admin/tests/acceptance/storage-buckets/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/storage-buckets/delete-test.js b/ui/admin/tests/acceptance/storage-buckets/delete-test.js index 7e0696129d..d68c170f64 100644 --- a/ui/admin/tests/acceptance/storage-buckets/delete-test.js +++ b/ui/admin/tests/acceptance/storage-buckets/delete-test.js @@ -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'); diff --git a/ui/admin/tests/acceptance/storage-buckets/list-test.js b/ui/admin/tests/acceptance/storage-buckets/list-test.js index 1bb6690284..8bdad990dc 100644 --- a/ui/admin/tests/acceptance/storage-buckets/list-test.js +++ b/ui/admin/tests/acceptance/storage-buckets/list-test.js @@ -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'); }); diff --git a/ui/admin/tests/acceptance/storage-buckets/read-test.js b/ui/admin/tests/acceptance/storage-buckets/read-test.js index 0b1b7f0818..1a9cfc9c45 100644 --- a/ui/admin/tests/acceptance/storage-buckets/read-test.js +++ b/ui/admin/tests/acceptance/storage-buckets/read-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/storage-buckets/update-test.js b/ui/admin/tests/acceptance/storage-buckets/update-test.js index 8563a2e869..33182f536d 100644 --- a/ui/admin/tests/acceptance/storage-buckets/update-test.js +++ b/ui/admin/tests/acceptance/storage-buckets/update-test.js @@ -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, diff --git a/ui/admin/tests/acceptance/targets/brokered-credential-sources-test.js b/ui/admin/tests/acceptance/targets/brokered-credential-sources-test.js index 01a4c49a18..fa8170dec8 100644 --- a/ui/admin/tests/acceptance/targets/brokered-credential-sources-test.js +++ b/ui/admin/tests/acceptance/targets/brokered-credential-sources-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/create-alias-test.js b/ui/admin/tests/acceptance/targets/create-alias-test.js index 8ec2ce2657..7d1b3b92b3 100644 --- a/ui/admin/tests/acceptance/targets/create-alias-test.js +++ b/ui/admin/tests/acceptance/targets/create-alias-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/create-test.js b/ui/admin/tests/acceptance/targets/create-test.js index cbe54c8d88..4e7233bc25 100644 --- a/ui/admin/tests/acceptance/targets/create-test.js +++ b/ui/admin/tests/acceptance/targets/create-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/delete-test.js b/ui/admin/tests/acceptance/targets/delete-test.js index ad0a632f12..9eea42901b 100644 --- a/ui/admin/tests/acceptance/targets/delete-test.js +++ b/ui/admin/tests/acceptance/targets/delete-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/enable-session-recording-test.js b/ui/admin/tests/acceptance/targets/enable-session-recording-test.js index 4aa4c5d080..0079fb84a8 100644 --- a/ui/admin/tests/acceptance/targets/enable-session-recording-test.js +++ b/ui/admin/tests/acceptance/targets/enable-session-recording-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/enable-session-recording/create-storage-bucket-test.js b/ui/admin/tests/acceptance/targets/enable-session-recording/create-storage-bucket-test.js index 03d9470f79..041da2de75 100644 --- a/ui/admin/tests/acceptance/targets/enable-session-recording/create-storage-bucket-test.js +++ b/ui/admin/tests/acceptance/targets/enable-session-recording/create-storage-bucket-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/enable-session-recording/index-test.js b/ui/admin/tests/acceptance/targets/enable-session-recording/index-test.js index 653bf57ffb..c42520dcc1 100644 --- a/ui/admin/tests/acceptance/targets/enable-session-recording/index-test.js +++ b/ui/admin/tests/acceptance/targets/enable-session-recording/index-test.js @@ -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) { diff --git a/ui/admin/tests/acceptance/targets/host-sources-test.js b/ui/admin/tests/acceptance/targets/host-sources-test.js index 6d57bedfb9..d6eb341420 100644 --- a/ui/admin/tests/acceptance/targets/host-sources-test.js +++ b/ui/admin/tests/acceptance/targets/host-sources-test.js @@ -41,7 +41,7 @@ module('Acceptance | targets | host-sources', function (hooks) { targetAddHostSources: 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 | targets | host-sources', function (hooks) { // Generate resource counter getTargetHostSetCount = () => this.server.schema.targets.first().hostSets.models.length; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting target host sources', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/injected-application-credential-sources-test.js b/ui/admin/tests/acceptance/targets/injected-application-credential-sources-test.js index 9e208bd5b7..0fc1be9624 100644 --- a/ui/admin/tests/acceptance/targets/injected-application-credential-sources-test.js +++ b/ui/admin/tests/acceptance/targets/injected-application-credential-sources-test.js @@ -49,7 +49,7 @@ module( injectedApplicationCredentialSources: 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', { @@ -116,7 +116,7 @@ module( credentialSourceCount = getCredentialLibraryCount() + getCredentialCount(); - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting target injected application credential sources', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/list-test.js b/ui/admin/tests/acceptance/targets/list-test.js index 74d86653b3..ee4d379f4c 100644 --- a/ui/admin/tests/acceptance/targets/list-test.js +++ b/ui/admin/tests/acceptance/targets/list-test.js @@ -53,7 +53,7 @@ module('Acceptance | targets | list', function (hooks) { sshTarget: 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', @@ -85,7 +85,7 @@ module('Acceptance | targets | list', function (hooks) { const featuresService = this.owner.lookup('service:features'); featuresService.enable('ssh-target'); - authenticateSession({}); + await authenticateSession({}); }); test('can navigate to targets with proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/manage-alias-test.js b/ui/admin/tests/acceptance/targets/manage-alias-test.js index 929c46c90a..81ee1648ad 100644 --- a/ui/admin/tests/acceptance/targets/manage-alias-test.js +++ b/ui/admin/tests/acceptance/targets/manage-alias-test.js @@ -45,7 +45,7 @@ module('Acceptance | targets | manage-alias', function (hooks) { aliases: 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', { @@ -90,7 +90,7 @@ module('Acceptance | targets | manage-alias', function (hooks) { getAliasCount = () => this.server.schema.aliases.all().models.length; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('clicking on manage should take you to manage page', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/read-test.js b/ui/admin/tests/acceptance/targets/read-test.js index 916a2a5c82..ab58bf8d80 100644 --- a/ui/admin/tests/acceptance/targets/read-test.js +++ b/ui/admin/tests/acceptance/targets/read-test.js @@ -47,7 +47,7 @@ module('Acceptance | targets | read', function (hooks) { aliases: 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' }); @@ -87,7 +87,7 @@ module('Acceptance | targets | read', function (hooks) { urls.alias = `${urls.tcpTarget}/${aliasResource.id}`; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting ssh target', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/update-test.js b/ui/admin/tests/acceptance/targets/update-test.js index 76ee6e5439..33aa868789 100644 --- a/ui/admin/tests/acceptance/targets/update-test.js +++ b/ui/admin/tests/acceptance/targets/update-test.js @@ -34,7 +34,7 @@ module('Acceptance | targets | update', function (hooks) { newTarget: 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' }); @@ -57,7 +57,7 @@ module('Acceptance | targets | update', function (hooks) { urls.unknownTarget = `${urls.targets}/foo`; urls.newTarget = `${urls.targets}/new`; - authenticateSession({}); + await authenticateSession({}); }); test('can save changes to existing target', async function (assert) { diff --git a/ui/admin/tests/acceptance/targets/workers-test.js b/ui/admin/tests/acceptance/targets/workers-test.js index ea7e12c428..c00d0e1196 100644 --- a/ui/admin/tests/acceptance/targets/workers-test.js +++ b/ui/admin/tests/acceptance/targets/workers-test.js @@ -49,7 +49,7 @@ module('Acceptance | targets | workers', function (hooks) { targetEditIngressFilter: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { featuresService = this.owner.lookup('service:features'); featureEdition = this.owner.lookup('service:featureEdition'); @@ -76,7 +76,7 @@ module('Acceptance | targets | workers', function (hooks) { urls.targetEditEgressFilter = `${urls.target}/edit-egress-worker-filter`; urls.targetEditIngressFilter = `${urls.target}/edit-ingress-worker-filter`; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting target workers', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/accounts-test.js b/ui/admin/tests/acceptance/users/accounts-test.js index 523b1c8831..7173ab6fdb 100644 --- a/ui/admin/tests/acceptance/users/accounts-test.js +++ b/ui/admin/tests/acceptance/users/accounts-test.js @@ -48,8 +48,8 @@ module('Acceptance | users | accounts', function (hooks) { addAccounts: 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', diff --git a/ui/admin/tests/acceptance/users/create-test.js b/ui/admin/tests/acceptance/users/create-test.js index dccb68491f..1d4b0a0e0f 100644 --- a/ui/admin/tests/acceptance/users/create-test.js +++ b/ui/admin/tests/acceptance/users/create-test.js @@ -33,7 +33,7 @@ module('Acceptance | users | create', function (hooks) { newUser: 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 | users | create', function (hooks) { getUsersCount = () => { return this.server.schema.users.all().models.length; }; - authenticateSession({}); + await authenticateSession({}); }); test('can create new users', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/delete-test.js b/ui/admin/tests/acceptance/users/delete-test.js index e833b13ef8..649380f6a6 100644 --- a/ui/admin/tests/acceptance/users/delete-test.js +++ b/ui/admin/tests/acceptance/users/delete-test.js @@ -33,7 +33,7 @@ module('Acceptance | users | delete', function (hooks) { user: 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 | users | delete', function (hooks) { urls.users = `${urls.orgScope}/users`; urls.user = `${urls.users}/${instances.user.id}`; - authenticateSession({}); + await authenticateSession({}); }); test('can delete a user', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/list-test.js b/ui/admin/tests/acceptance/users/list-test.js index ea786e4574..cc6430f1ec 100644 --- a/ui/admin/tests/acceptance/users/list-test.js +++ b/ui/admin/tests/acceptance/users/list-test.js @@ -36,7 +36,7 @@ module('Acceptance | users | list', function (hooks) { user2: 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', @@ -53,7 +53,7 @@ module('Acceptance | users | list', function (hooks) { urls.users = `${urls.orgScope}/users`; urls.user1 = `${urls.users}/${instances.user1.id}`; urls.user2 = `${urls.users}/${instances.user2.id}`; - authenticateSession({}); + await authenticateSession({}); }); test('users can navigate to users with proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/read-test.js b/ui/admin/tests/acceptance/users/read-test.js index 1c8b08f9a8..a9dc2f009a 100644 --- a/ui/admin/tests/acceptance/users/read-test.js +++ b/ui/admin/tests/acceptance/users/read-test.js @@ -31,7 +31,7 @@ module('Acceptance | users | read', function (hooks) { user: 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', @@ -43,7 +43,7 @@ module('Acceptance | users | read', function (hooks) { urls.orgScope = `/scopes/${instances.scopes.org.id}`; urls.users = `${urls.orgScope}/users`; urls.user = `${urls.users}/${instances.user.id}`; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting users', async function (assert) { diff --git a/ui/admin/tests/acceptance/users/update-test.js b/ui/admin/tests/acceptance/users/update-test.js index a20b687a3d..a63161a142 100644 --- a/ui/admin/tests/acceptance/users/update-test.js +++ b/ui/admin/tests/acceptance/users/update-test.js @@ -30,7 +30,7 @@ module('Acceptance | users | update', function (hooks) { user: 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', @@ -43,7 +43,7 @@ module('Acceptance | users | update', function (hooks) { urls.users = `${urls.orgScope}/users`; urls.user = `${urls.users}/${instances.user.id}`; - authenticateSession({}); + await authenticateSession({}); }); test('can save changes to an existing user', async function (assert) { diff --git a/ui/admin/tests/acceptance/workers/create-tags-test.js b/ui/admin/tests/acceptance/workers/create-tags-test.js index 17e64affa4..c0323e87e2 100644 --- a/ui/admin/tests/acceptance/workers/create-tags-test.js +++ b/ui/admin/tests/acceptance/workers/create-tags-test.js @@ -43,7 +43,7 @@ module('Acceptance | workers | worker | create-tags', function (hooks) { createTags: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { instances.scopes.global = this.server.create('scope', { id: 'global' }); instances.worker = this.server.create('worker', { scope: instances.scopes.global, @@ -53,7 +53,7 @@ module('Acceptance | workers | worker | create-tags', function (hooks) { urls.tags = `${urls.worker}/tags`; urls.createTags = `${urls.worker}/create-tags`; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting worker create tags', async function (assert) { diff --git a/ui/admin/tests/acceptance/workers/create-test.js b/ui/admin/tests/acceptance/workers/create-test.js index aa2190dc63..be006339d7 100644 --- a/ui/admin/tests/acceptance/workers/create-test.js +++ b/ui/admin/tests/acceptance/workers/create-test.js @@ -19,14 +19,14 @@ module('Acceptance | workers | create', function (hooks) { let newWorkerURL; let getWorkersCount; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { globalScope = this.server.create('scope', { id: 'global' }); workersURL = `/scopes/global/workers`; newWorkerURL = `${workersURL}/new`; getWorkersCount = () => this.server.schema.workers.all().length; - authenticateSession({}); + await authenticateSession({}); }); test('can create new workers', async function (assert) { diff --git a/ui/admin/tests/acceptance/workers/delete-test.js b/ui/admin/tests/acceptance/workers/delete-test.js index 4ebdcc6e56..73c0b94f69 100644 --- a/ui/admin/tests/acceptance/workers/delete-test.js +++ b/ui/admin/tests/acceptance/workers/delete-test.js @@ -34,7 +34,7 @@ module('Acceptance | workers | delete', function (hooks) { worker: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { // Generate resources instances.scopes.global = this.server.create('scope', { id: 'global' }); instances.worker = this.server.create('worker', { @@ -47,7 +47,7 @@ module('Acceptance | workers | delete', function (hooks) { getWorkerCount = () => this.server.schema.workers.all().models.length; - authenticateSession({}); + await authenticateSession({}); }); test('can delete a worker', async function (assert) { diff --git a/ui/admin/tests/acceptance/workers/list-test.js b/ui/admin/tests/acceptance/workers/list-test.js index 6202904f8b..960bd3bf79 100644 --- a/ui/admin/tests/acceptance/workers/list-test.js +++ b/ui/admin/tests/acceptance/workers/list-test.js @@ -44,7 +44,7 @@ module('Acceptance | workers | list', function (hooks) { workerTags: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { instances.scopes.global = this.server.create('scope', { id: 'global' }); instances.worker = this.server.create('worker', { scope: instances.scopes.global, @@ -56,7 +56,7 @@ module('Acceptance | workers | list', function (hooks) { urls.workers = `/scopes/global/workers`; urls.worker = `${urls.workers}/${instances.worker.id}`; urls.workerTags = `${urls.worker}/tags`; - authenticateSession({}); + await authenticateSession({}); featuresService = this.owner.lookup('service:features'); }); diff --git a/ui/admin/tests/acceptance/workers/read-test.js b/ui/admin/tests/acceptance/workers/read-test.js index 7a0879f665..f76dbdcb61 100644 --- a/ui/admin/tests/acceptance/workers/read-test.js +++ b/ui/admin/tests/acceptance/workers/read-test.js @@ -32,7 +32,7 @@ module('Acceptance | workers | read', function (hooks) { worker: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { //Generate the resources instances.scopes.global = this.server.create('scope', { id: 'global' }); instances.scopes.org = this.server.create('scope', { @@ -49,7 +49,7 @@ module('Acceptance | workers | read', function (hooks) { featuresService = this.owner.lookup('service:features'); featuresService.enable('byow'); - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting worker', async function (assert) { diff --git a/ui/admin/tests/acceptance/workers/tags-test.js b/ui/admin/tests/acceptance/workers/tags-test.js index 3ecde92973..fdd4653bb9 100644 --- a/ui/admin/tests/acceptance/workers/tags-test.js +++ b/ui/admin/tests/acceptance/workers/tags-test.js @@ -64,7 +64,7 @@ module('Acceptance | workers | worker | tags', function (hooks) { createTags: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { instances.scopes.global = this.server.create('scope', { id: 'global' }); instances.worker = this.server.create('worker', { scope: instances.scopes.global, @@ -73,7 +73,7 @@ module('Acceptance | workers | worker | tags', function (hooks) { urls.worker = `${urls.workers}/${instances.worker.id}`; urls.tags = `${urls.worker}/tags`; urls.createTags = `${urls.worker}/create-tags`; - authenticateSession({ username: 'admin' }); + await authenticateSession({ username: 'admin' }); }); test('visiting worker tags', async function (assert) { diff --git a/ui/admin/tests/acceptance/workers/update-test.js b/ui/admin/tests/acceptance/workers/update-test.js index 6754bcb430..26b40e2d13 100644 --- a/ui/admin/tests/acceptance/workers/update-test.js +++ b/ui/admin/tests/acceptance/workers/update-test.js @@ -26,7 +26,7 @@ module('Acceptance | workers | update', function (hooks) { worker: null, }; - hooks.beforeEach(function () { + hooks.beforeEach(async function () { //Generate the resources instances.scopes.global = this.server.create('scope', { id: 'global' }); instances.worker = this.server.create('worker', { @@ -36,7 +36,7 @@ module('Acceptance | workers | update', function (hooks) { urls.globalScope = '/scopes/global'; urls.workers = `${urls.globalScope}/workers`; (urls.worker = `${urls.workers}/${instances.worker.id}`), - authenticateSession({}); + await authenticateSession({}); }); test('can save changes to an existing worker', async function (assert) { diff --git a/ui/admin/tests/unit/controllers/account/change-password-test.js b/ui/admin/tests/unit/controllers/account/change-password-test.js index facd93f5d2..25a3ec5674 100644 --- a/ui/admin/tests/unit/controllers/account/change-password-test.js +++ b/ui/admin/tests/unit/controllers/account/change-password-test.js @@ -30,7 +30,7 @@ module('Unit | Controller | account/change-password', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup('controller:account/change-password'); store = this.owner.lookup('service:store'); diff --git a/ui/admin/tests/unit/controllers/application-test.js b/ui/admin/tests/unit/controllers/application-test.js index 705d584066..5b09d92bc5 100644 --- a/ui/admin/tests/unit/controllers/application-test.js +++ b/ui/admin/tests/unit/controllers/application-test.js @@ -16,7 +16,7 @@ module('Unit | Controller | application', function (hooks) { let session; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup('controller:application'); featureEdition = this.owner.lookup('service:featureEdition'); featuresService = this.owner.lookup('service:features'); diff --git a/ui/admin/tests/unit/controllers/onboarding/index-test.js b/ui/admin/tests/unit/controllers/onboarding/index-test.js index 39017aaed4..111ad076d4 100644 --- a/ui/admin/tests/unit/controllers/onboarding/index-test.js +++ b/ui/admin/tests/unit/controllers/onboarding/index-test.js @@ -36,7 +36,7 @@ module('Unit | Controller | onboarding/index', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:onboarding/index'); diff --git a/ui/admin/tests/unit/controllers/onboarding/success-test.js b/ui/admin/tests/unit/controllers/onboarding/success-test.js index 31df549e40..b27307222b 100644 --- a/ui/admin/tests/unit/controllers/onboarding/success-test.js +++ b/ui/admin/tests/unit/controllers/onboarding/success-test.js @@ -33,7 +33,7 @@ module('Unit | Controller | onboarding/success', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup('controller:onboarding/success'); store = this.owner.lookup('service:store'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/create-test.js b/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/create-test.js index 1eea4b62dd..a141f6bd6e 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/create-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/create-test.js @@ -31,7 +31,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/add-storage-policy/create', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/index-test.js index 5d90f91d8e..4e47c19c0f 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/add-storage-policy/index-test.js @@ -31,7 +31,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/add-storage-policy/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/aliases/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/aliases/index-test.js index 983776c50d..4f6ae18fd1 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/aliases/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/aliases/index-test.js @@ -33,8 +33,8 @@ module('Unit | Controller | scopes/scope/aliases/index', function (hooks) { aliases: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/aliases/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js index 158f2c6a07..1439db9dbb 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/account/set-password-test.js @@ -33,7 +33,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup( 'controller:scopes/scope/auth-methods/auth-method/accounts/account/set-password', ); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/index-test.js index c70fbe3b83..91045df751 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/accounts/index-test.js @@ -35,7 +35,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup( 'controller:scopes/scope/auth-methods/auth-method/accounts/index', ); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/index-test.js index e8d3171737..29eda2aa79 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/index-test.js @@ -35,7 +35,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup( 'controller:scopes/scope/auth-methods/auth-method/managed-groups/index', ); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/index-test.js index 19bcd7534b..cce361fe15 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/index-test.js @@ -35,7 +35,7 @@ module('Unit | Controller | scopes/scope/auth-methods/index', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/auth-methods/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/authenticate/method/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/authenticate/method/index-test.js index 6a9227f4a8..d2b849aa1e 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/authenticate/method/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/authenticate/method/index-test.js @@ -35,7 +35,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup( 'controller:scopes/scope/authenticate/method/index', ); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credential-libraries/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credential-libraries/index-test.js index 03561476a5..bc0239be34 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credential-libraries/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credential-libraries/index-test.js @@ -37,8 +37,8 @@ module( credentialLibraries: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/credential-stores/credential-store/credential-libraries/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credentials/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credentials/index-test.js index a4f326e1df..ae1481a7aa 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credentials/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/credential-store/credentials/index-test.js @@ -37,8 +37,8 @@ module( credentials: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/credential-stores/credential-store/credentials/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/index-test.js index 8e89d88f43..f42706c7ef 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/credential-stores/index-test.js @@ -40,8 +40,8 @@ module( credentialStores: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); controller = this.owner.lookup( 'controller:scopes/scope/credential-stores/index', ); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/groups/group/add-members-test.js b/ui/admin/tests/unit/controllers/scopes/scope/groups/group/add-members-test.js index c621b608f9..0784b5ec40 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/groups/group/add-members-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/groups/group/add-members-test.js @@ -32,8 +32,8 @@ module( addMembers: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/groups/group/add-members', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/groups/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/groups/index-test.js index 9b9de64979..f3124c6ab9 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/groups/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/groups/index-test.js @@ -33,8 +33,8 @@ module('Unit | Controller | scopes/scope/groups/index', function (hooks) { groups: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/groups/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js index b826eef37f..ad6891833f 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts-test.js @@ -33,8 +33,8 @@ module( addHosts: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/add-hosts', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js index 46aadf1710..abd36ff9c7 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host-test.js @@ -33,8 +33,8 @@ module( createAndAddHost: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/host-set/create-and-add-host', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js index 716afeaf01..37c99ac833 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/host-sets/index-test.js @@ -37,8 +37,8 @@ module( hostSets: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/host-catalogs/host-catalog/host-sets/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js index af5bc9db7e..a7db77ac6d 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/host-catalog/hosts/index-test.js @@ -34,8 +34,8 @@ module( hosts: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/host-catalogs/host-catalog/hosts/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/index-test.js index 100549c02f..d7d69e7fa0 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/host-catalogs/index-test.js @@ -36,8 +36,8 @@ module( hostCatalogs: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/host-catalogs/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/index-test.js index 996e27da95..e4edcd450c 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/index-test.js @@ -33,8 +33,8 @@ module('Unit | Controller | scopes/scope/index', function (hooks) { globalScope: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/policies/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/policies/index-test.js index fda6a713c8..c38075ab9e 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/policies/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/policies/index-test.js @@ -33,7 +33,7 @@ module('Unit | Controller | scopes/scope/policies/index', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/policies/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/index-test.js index 3ee4b8beee..efe1ee8dfa 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/index-test.js @@ -35,7 +35,7 @@ module('Unit | Controller | scopes/scope/roles/index', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/roles/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/add-principals-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/add-principals-test.js index 8573d9f4df..2e7c236193 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/add-principals-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/add-principals-test.js @@ -33,7 +33,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/roles/role/add-principals', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/grants-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/grants-test.js index 808b4b1c0d..b70767d371 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/grants-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/grants-test.js @@ -28,7 +28,7 @@ module('Unit | Controller | scopes/scope/roles/role/grants', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/roles/role/grants'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/index-test.js index 91b5b55ccf..ad75c104ba 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/index-test.js @@ -33,7 +33,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/roles/role/manage-scopes/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-custom-scopes-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-custom-scopes-test.js index 359c8215d4..5ff98ab61c 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-custom-scopes-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-custom-scopes-test.js @@ -35,7 +35,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/roles/role/manage-scopes/manage-custom-scopes', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-org-projects-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-org-projects-test.js index 5a923458d6..205b85a69f 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-org-projects-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/manage-scopes/manage-org-projects-test.js @@ -36,7 +36,7 @@ module( }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/roles/role/manage-scopes/manage-org-projects', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/scopes-test.js b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/scopes-test.js index 8e3ce4eaf1..4f4c0d590a 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/roles/role/scopes-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/roles/role/scopes-test.js @@ -37,7 +37,7 @@ module('Unit | Controller | scopes/scope/roles/role/scopes', function (hooks) { }; hooks.beforeEach(async function () { - authenticateSession({}); + await authenticateSession({}); controller = this.owner.lookup('controller:scopes/scope/roles/role/scopes'); instances.scopes.global = this.server.create('scope', { id: 'global' }); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index-test.js index 0f9632808b..e8a8909977 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/session-recordings/session-recording/channels-by-connection/index-test.js @@ -32,8 +32,8 @@ module( sessionRecording: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/session-recordings/session-recording/channels-by-connection/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/storage-buckets/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/storage-buckets/index-test.js index 3772353570..3efab4286d 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/storage-buckets/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/storage-buckets/index-test.js @@ -34,8 +34,8 @@ module( storageBuckets: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/storage-buckets/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/index-test.js index bafba80cfd..00405f6d87 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/index-test.js @@ -42,8 +42,8 @@ module('Unit | Controller | scopes/scope/targets/index', function (hooks) { alias: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/targets/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-brokered-credential-sources-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-brokered-credential-sources-test.js index ef1c0e57e9..2f2ef602b1 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-brokered-credential-sources-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-brokered-credential-sources-test.js @@ -34,8 +34,8 @@ module( credentialSources: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/targets/target/add-brokered-credential-sources', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-host-sources-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-host-sources-test.js index ee166228c9..4c43549c6a 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-host-sources-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-host-sources-test.js @@ -35,8 +35,8 @@ module( hostSources: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/targets/target/add-host-sources', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-injected-application-credential-sources-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-injected-application-credential-sources-test.js index 623f27c11a..efda0ae043 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-injected-application-credential-sources-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/add-injected-application-credential-sources-test.js @@ -34,8 +34,8 @@ module( credentialSources: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/targets/target/add-injected-application-credential-sources', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/create-storage-bucket-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/create-storage-bucket-test.js index 5786fcba3e..609e6b7665 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/create-storage-bucket-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/create-storage-bucket-test.js @@ -33,8 +33,8 @@ module( createStorageBucket: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/targets/target/enable-session-recording/create-storage-bucket', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/index-test.js index 4f34bc50fb..59b8e9f86c 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/targets/target/enable-session-recording/index-test.js @@ -32,8 +32,8 @@ module( enableSessionRecording: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/targets/target/enable-session-recording/index', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/users/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/users/index-test.js index d4228b47fb..507e186ad6 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/users/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/users/index-test.js @@ -33,8 +33,8 @@ module('Unit | Controller | scopes/scope/users/index', function (hooks) { users: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/users/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js b/ui/admin/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js index 17d917f5ba..f4b6a05acb 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/users/user/add-accounts-test.js @@ -31,8 +31,8 @@ module( addAccounts: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/users/user/add-accounts', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/workers/index-test.js b/ui/admin/tests/unit/controllers/scopes/scope/workers/index-test.js index c80f0a8e4c..c8d27d06b9 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/workers/index-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/workers/index-test.js @@ -31,8 +31,8 @@ module('Unit | Controller | scopes/scope/workers/index', function (hooks) { workers: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/workers/index'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/workers/new-test.js b/ui/admin/tests/unit/controllers/scopes/scope/workers/new-test.js index a033e6940b..3896a97fd7 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/workers/new-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/workers/new-test.js @@ -27,8 +27,8 @@ module('Unit | Controller | scopes/scope/workers/new', function (hooks) { workers: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup('controller:scopes/scope/workers/new'); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/create-tags-test.js b/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/create-tags-test.js index e65a32dae8..0e8cf7a898 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/create-tags-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/create-tags-test.js @@ -31,8 +31,8 @@ module( createTags: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/workers/worker/create-tags', diff --git a/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/tags-test.js b/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/tags-test.js index f75e28a438..1824c353a1 100644 --- a/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/tags-test.js +++ b/ui/admin/tests/unit/controllers/scopes/scope/workers/worker/tags-test.js @@ -34,8 +34,8 @@ module( tags: null, }; - hooks.beforeEach(function () { - authenticateSession({}); + hooks.beforeEach(async function () { + await authenticateSession({}); store = this.owner.lookup('service:store'); controller = this.owner.lookup( 'controller:scopes/scope/workers/worker/tags',