From b64f1876dcb292ace70572ed74f878022b979a77 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 3 Dec 2024 10:27:27 -0800 Subject: [PATCH] Refactor icu 15872 await authenticatesession admin (#2603) * Add await for all authenticateSession within /tests/acceptance * Add await for all authenticateSession within /tests/unit --- .../tests/acceptance/accounts/change-password-test.js | 4 ++-- ui/admin/tests/acceptance/accounts/create-test.js | 4 ++-- ui/admin/tests/acceptance/accounts/delete-test.js | 4 ++-- ui/admin/tests/acceptance/accounts/list-test.js | 4 ++-- ui/admin/tests/acceptance/accounts/read-test.js | 4 ++-- ui/admin/tests/acceptance/accounts/set-password-test.js | 4 ++-- ui/admin/tests/acceptance/accounts/update-test.js | 4 ++-- ui/admin/tests/acceptance/aliases/create-test.js | 4 ++-- ui/admin/tests/acceptance/aliases/delete-test.js | 4 ++-- ui/admin/tests/acceptance/aliases/list-test.js | 4 ++-- ui/admin/tests/acceptance/aliases/read-test.js | 4 ++-- ui/admin/tests/acceptance/aliases/update-test.js | 4 ++-- ui/admin/tests/acceptance/auth-methods/create-test.js | 4 ++-- ui/admin/tests/acceptance/auth-methods/delete-test.js | 4 ++-- ui/admin/tests/acceptance/auth-methods/list-test.js | 4 ++-- ui/admin/tests/acceptance/auth-methods/oidc-test.js | 4 ++-- ui/admin/tests/acceptance/auth-methods/read-test.js | 4 ++-- ui/admin/tests/acceptance/auth-methods/update-test.js | 4 ++-- ui/admin/tests/acceptance/authentication-test.js | 8 ++++---- .../tests/acceptance/credential-library/create-test.js | 4 ++-- .../tests/acceptance/credential-library/delete-test.js | 4 ++-- ui/admin/tests/acceptance/credential-library/list-test.js | 4 ++-- ui/admin/tests/acceptance/credential-library/read-test.js | 4 ++-- .../tests/acceptance/credential-library/update-test.js | 4 ++-- ui/admin/tests/acceptance/credential-store/create-test.js | 4 ++-- .../credential-store/credentials/create-test.js | 4 ++-- .../credential-store/credentials/delete-test.js | 4 ++-- .../acceptance/credential-store/credentials/list-test.js | 4 ++-- .../acceptance/credential-store/credentials/read-test.js | 4 ++-- .../credential-store/credentials/update-test.js | 4 ++-- ui/admin/tests/acceptance/credential-store/delete-test.js | 4 ++-- ui/admin/tests/acceptance/credential-store/list-test.js | 4 ++-- ui/admin/tests/acceptance/credential-store/read-test.js | 4 ++-- ui/admin/tests/acceptance/credential-store/update-test.js | 4 ++-- ui/admin/tests/acceptance/groups/create-test.js | 4 ++-- ui/admin/tests/acceptance/groups/delete-test.js | 4 ++-- ui/admin/tests/acceptance/groups/list-test.js | 4 ++-- ui/admin/tests/acceptance/groups/members-test.js | 4 ++-- ui/admin/tests/acceptance/groups/read-test.js | 4 ++-- ui/admin/tests/acceptance/groups/update-test.js | 4 ++-- ui/admin/tests/acceptance/host-catalogs/create-test.js | 4 ++-- ui/admin/tests/acceptance/host-catalogs/delete-test.js | 4 ++-- .../acceptance/host-catalogs/host-sets/create-test.js | 4 ++-- .../acceptance/host-catalogs/host-sets/delete-test.js | 4 ++-- .../acceptance/host-catalogs/host-sets/hosts-test.js | 4 ++-- .../tests/acceptance/host-catalogs/host-sets/list-test.js | 4 ++-- .../tests/acceptance/host-catalogs/host-sets/read-test.js | 4 ++-- .../acceptance/host-catalogs/host-sets/update-test.js | 4 ++-- .../tests/acceptance/host-catalogs/hosts/create-test.js | 4 ++-- .../tests/acceptance/host-catalogs/hosts/delete-test.js | 4 ++-- .../tests/acceptance/host-catalogs/hosts/list-test.js | 4 ++-- .../tests/acceptance/host-catalogs/hosts/read-test.js | 4 ++-- .../tests/acceptance/host-catalogs/hosts/update-test.js | 4 ++-- ui/admin/tests/acceptance/host-catalogs/list-test.js | 4 ++-- ui/admin/tests/acceptance/host-catalogs/read-test.js | 4 ++-- ui/admin/tests/acceptance/host-catalogs/update-test.js | 4 ++-- ui/admin/tests/acceptance/managed-groups/create-test.js | 4 ++-- ui/admin/tests/acceptance/managed-groups/delete-test.js | 4 ++-- ui/admin/tests/acceptance/managed-groups/list-test.js | 4 ++-- ui/admin/tests/acceptance/managed-groups/members-test.js | 4 ++-- ui/admin/tests/acceptance/managed-groups/read-test.js | 4 ++-- ui/admin/tests/acceptance/onboarding/onboarding-test.js | 4 ++-- ui/admin/tests/acceptance/onboarding/success-test.js | 4 ++-- ui/admin/tests/acceptance/policy/create-test.js | 4 ++-- ui/admin/tests/acceptance/policy/delete-test.js | 4 ++-- ui/admin/tests/acceptance/policy/list-test.js | 4 ++-- ui/admin/tests/acceptance/policy/read-test.js | 4 ++-- ui/admin/tests/acceptance/policy/update-test.js | 4 ++-- ui/admin/tests/acceptance/roles/create-test.js | 4 ++-- ui/admin/tests/acceptance/roles/delete-test.js | 4 ++-- ui/admin/tests/acceptance/roles/global-scope-test.js | 4 ++-- ui/admin/tests/acceptance/roles/grants-test.js | 4 ++-- ui/admin/tests/acceptance/roles/list-test.js | 4 ++-- ui/admin/tests/acceptance/roles/org-scope-test.js | 4 ++-- ui/admin/tests/acceptance/roles/principals-test.js | 4 ++-- ui/admin/tests/acceptance/roles/project-scope-test.js | 4 ++-- ui/admin/tests/acceptance/roles/read-test.js | 4 ++-- ui/admin/tests/acceptance/roles/update-test.js | 4 ++-- ui/admin/tests/acceptance/scopes-test.js | 4 ++-- .../tests/acceptance/scopes/add-storage-policy-test.js | 4 ++-- ui/admin/tests/acceptance/scopes/delete-test.js | 4 ++-- ui/admin/tests/acceptance/scopes/list-test.js | 4 ++-- ui/admin/tests/acceptance/scopes/read-test.js | 4 ++-- ui/admin/tests/acceptance/scopes/update-test.js | 4 ++-- ui/admin/tests/acceptance/session-recordings/list-test.js | 4 ++-- ui/admin/tests/acceptance/session-recordings/read-test.js | 4 ++-- .../channels-by-connection/channel-test.js | 4 ++-- ui/admin/tests/acceptance/sessions/list-test.js | 4 ++-- ui/admin/tests/acceptance/storage-buckets/create-test.js | 4 ++-- ui/admin/tests/acceptance/storage-buckets/delete-test.js | 4 ++-- ui/admin/tests/acceptance/storage-buckets/list-test.js | 4 ++-- ui/admin/tests/acceptance/storage-buckets/read-test.js | 4 ++-- ui/admin/tests/acceptance/storage-buckets/update-test.js | 2 +- .../targets/brokered-credential-sources-test.js | 4 ++-- ui/admin/tests/acceptance/targets/create-alias-test.js | 4 ++-- ui/admin/tests/acceptance/targets/create-test.js | 4 ++-- ui/admin/tests/acceptance/targets/delete-test.js | 4 ++-- .../acceptance/targets/enable-session-recording-test.js | 4 ++-- .../create-storage-bucket-test.js | 4 ++-- .../targets/enable-session-recording/index-test.js | 4 ++-- ui/admin/tests/acceptance/targets/host-sources-test.js | 4 ++-- .../injected-application-credential-sources-test.js | 4 ++-- ui/admin/tests/acceptance/targets/list-test.js | 4 ++-- ui/admin/tests/acceptance/targets/manage-alias-test.js | 4 ++-- ui/admin/tests/acceptance/targets/read-test.js | 4 ++-- ui/admin/tests/acceptance/targets/update-test.js | 4 ++-- ui/admin/tests/acceptance/targets/workers-test.js | 4 ++-- ui/admin/tests/acceptance/users/accounts-test.js | 4 ++-- ui/admin/tests/acceptance/users/create-test.js | 4 ++-- ui/admin/tests/acceptance/users/delete-test.js | 4 ++-- ui/admin/tests/acceptance/users/list-test.js | 4 ++-- ui/admin/tests/acceptance/users/read-test.js | 4 ++-- ui/admin/tests/acceptance/users/update-test.js | 4 ++-- ui/admin/tests/acceptance/workers/create-tags-test.js | 4 ++-- ui/admin/tests/acceptance/workers/create-test.js | 4 ++-- ui/admin/tests/acceptance/workers/delete-test.js | 4 ++-- ui/admin/tests/acceptance/workers/list-test.js | 4 ++-- ui/admin/tests/acceptance/workers/read-test.js | 4 ++-- ui/admin/tests/acceptance/workers/tags-test.js | 4 ++-- ui/admin/tests/acceptance/workers/update-test.js | 4 ++-- .../unit/controllers/account/change-password-test.js | 2 +- ui/admin/tests/unit/controllers/application-test.js | 2 +- ui/admin/tests/unit/controllers/onboarding/index-test.js | 2 +- .../tests/unit/controllers/onboarding/success-test.js | 2 +- .../scopes/scope/add-storage-policy/create-test.js | 2 +- .../scopes/scope/add-storage-policy/index-test.js | 2 +- .../unit/controllers/scopes/scope/aliases/index-test.js | 4 ++-- .../auth-method/accounts/account/set-password-test.js | 2 +- .../scope/auth-methods/auth-method/accounts/index-test.js | 2 +- .../auth-methods/auth-method/managed-groups/index-test.js | 2 +- .../controllers/scopes/scope/auth-methods/index-test.js | 2 +- .../scopes/scope/authenticate/method/index-test.js | 2 +- .../credential-store/credential-libraries/index-test.js | 4 ++-- .../credential-store/credentials/index-test.js | 4 ++-- .../scopes/scope/credential-stores/index-test.js | 4 ++-- .../scopes/scope/groups/group/add-members-test.js | 4 ++-- .../unit/controllers/scopes/scope/groups/index-test.js | 4 ++-- .../host-catalog/host-sets/host-set/add-hosts-test.js | 4 ++-- .../host-sets/host-set/create-and-add-host-test.js | 4 ++-- .../host-catalogs/host-catalog/host-sets/index-test.js | 4 ++-- .../scope/host-catalogs/host-catalog/hosts/index-test.js | 4 ++-- .../controllers/scopes/scope/host-catalogs/index-test.js | 4 ++-- .../tests/unit/controllers/scopes/scope/index-test.js | 4 ++-- .../unit/controllers/scopes/scope/policies/index-test.js | 2 +- .../unit/controllers/scopes/scope/roles/index-test.js | 2 +- .../scopes/scope/roles/role/add-principals-test.js | 2 +- .../controllers/scopes/scope/roles/role/grants-test.js | 2 +- .../scopes/scope/roles/role/manage-scopes/index-test.js | 2 +- .../roles/role/manage-scopes/manage-custom-scopes-test.js | 2 +- .../roles/role/manage-scopes/manage-org-projects-test.js | 2 +- .../controllers/scopes/scope/roles/role/scopes-test.js | 2 +- .../channels-by-connection/index-test.js | 4 ++-- .../scopes/scope/storage-buckets/index-test.js | 4 ++-- .../unit/controllers/scopes/scope/targets/index-test.js | 4 ++-- .../target/add-brokered-credential-sources-test.js | 4 ++-- .../scopes/scope/targets/target/add-host-sources-test.js | 4 ++-- .../add-injected-application-credential-sources-test.js | 4 ++-- .../create-storage-bucket-test.js | 4 ++-- .../targets/target/enable-session-recording/index-test.js | 4 ++-- .../unit/controllers/scopes/scope/users/index-test.js | 4 ++-- .../scopes/scope/users/user/add-accounts-test.js | 4 ++-- .../unit/controllers/scopes/scope/workers/index-test.js | 4 ++-- .../unit/controllers/scopes/scope/workers/new-test.js | 4 ++-- .../scopes/scope/workers/worker/create-tags-test.js | 4 ++-- .../controllers/scopes/scope/workers/worker/tags-test.js | 4 ++-- 165 files changed, 312 insertions(+), 312 deletions(-) diff --git a/ui/admin/tests/acceptance/accounts/change-password-test.js b/ui/admin/tests/acceptance/accounts/change-password-test.js index 3d7a86829..478762017 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 55421fb92..0ce845a6f 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 963e0b285..c0cc9e950 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 2d4e9a172..57396a8c3 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 73ed838f9..e640f312f 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 a781f2963..7e6d6c40c 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 74bd33a03..af3195f33 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 16c28b432..f571bd9e5 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 81885c1bb..3c30d0296 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 0f1e549ec..39701da44 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 f40e955fa..483132d84 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 37e49392d..2820e0c52 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 88b07a1f5..25d83725f 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 b28c31e46..b63b529be 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 1a9817a01..77f9f1b2f 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 2c24d550a..43bf98e1d 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 88d1de969..0b3fd0738 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 fbe6eae5e..6458bb141 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 7b10d4950..949f9e415 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 4127772fc..c14fe8070 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 1a2c1b182..f5ee59dae 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 017b6d6a5..3b7dcc8b7 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 82bb2e4a9..2794a145e 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 19b24eba3..28b93d1f9 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 5eb3f3b51..3eb921997 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 1c004ce47..2dbfa320f 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 bf53e345a..13466e9b9 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 a73edcdc6..7154d4eb1 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 ecfafc63e..91324a860 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 86acc2a18..5230d0ab2 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 fc0481f8f..a4d234d84 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 3afbb6894..521c36d1b 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 0d471bdd1..c96a18831 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 a3ab4ba10..8123ab6dc 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 b6560071a..6d226d7b8 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 301e9ee12..ef28b75bd 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 d0ec248a9..07e49d60d 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 436b71d2a..8feda962e 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 56524d3f3..e74ee7468 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 bebe103a4..3fb55c970 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 067b3cbfd..95aaaaa85 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 ca2a6a23c..2a8cd6e8b 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 ef804f22f..a9906a445 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 83e5e3bed..82529926b 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 63122c079..19fbd677d 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 5753fca8e..54eda5971 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 73eae6ac2..a8a9b0536 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 d516040bb..13bfa4daf 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 f3bd2cabd..64cde54e4 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 a146b1fd6..1aeaf2405 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 8b5a0d216..d1660818f 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 16ee14445..9351fcb8e 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 7dd34192e..b93d87f82 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 e03917791..a1eecb0ba 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 401746bae..b2ab8ccfe 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 3df14a6dc..38151056f 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 8434ce7e8..c82c5fb37 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 d2157be05..343e656bd 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 c81c552a2..f906a9af7 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 0fc02a2e4..95f1ec123 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 0dff6da6b..ddeddf531 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 642fcab94..3d5da1636 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 904091d1d..2926935a1 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 e0658c4dc..ed7853477 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 1c8232c3a..4ad116247 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 20657ba20..55460be36 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 f012212c5..04195cabc 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 b5de7d865..398fdec03 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 321626b58..39e509c96 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 eed2f0923..c43e21c43 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 015f96470..163e1bebf 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 8ff1dc95f..1061d271c 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 7a2002bbd..131463aa9 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 1d26bb2bc..664bd6dbe 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 9d2abdab0..26b775514 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 aee2543b8..1bbb4699e 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 3e04cdeeb..085d55192 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 f2d17a2e0..2df9a4e65 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 dba906dc4..c22d0aba8 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 5c81118a4..8f7d83aed 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 1a9cbd9bb..59320599e 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 fae969a83..7f185dd7b 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 e72b754db..ce1a4be6c 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 bb8479f41..48ebb09ff 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 42e077c06..8cda56987 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 542ce77af..1613f69a7 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 b791ac31d..e49efd784 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 3469cd9e5..6f753fd48 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 ba1ae3c0e..bf2ea9ac4 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 7e0696129..d68c170f6 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 1bb669028..8bdad990d 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 0b1b7f081..1a9cfc9c4 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 8563a2e86..33182f536 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 01a4c49a1..fa8170dec 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 8ec2ce265..7d1b3b92b 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 cbe54c8d8..4e7233bc2 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 ad0a632f1..9eea42901 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 4aa4c5d08..0079fb84a 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 03d9470f7..041da2de7 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 653bf57ff..c42520dcc 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 6d57bedfb..d6eb34142 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 9e208bd5b..0fc1be962 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 74d86653b..ee4d379f4 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 929c46c90..81ee1648a 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 916a2a5c8..ab58bf8d8 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 76ee6e543..33aa86878 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 ea7e12c42..c00d0e119 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 523b1c883..7173ab6fd 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 dccb68491..1d4b0a0e0 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 e833b13ef..649380f6a 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 ea786e457..cc6430f1e 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 1c8b08f9a..a9dc2f009 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 a20b687a3..a63161a14 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 17e64affa..c0323e87e 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 aa2190dc6..be006339d 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 4ebdcc6e5..73c0b94f6 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 6202904f8..960bd3bf7 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 7a0879f66..f76dbdcb6 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 3ecde9297..fdd4653bb 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 6754bcb43..26b40e2d1 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 facd93f5d..25a3ec567 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 705d58406..5b09d92bc 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 39017aaed..111ad076d 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 31df549e4..b27307222 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 1eea4b62d..a141f6bd6 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 5d90f91d8..4e47c19c0 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 983776c50..4f6ae18fd 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 158f2c6a0..1439db9db 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 c70fbe3b8..91045df75 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 e8d317173..29eda2aa7 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 19bcd7534..cce361fe1 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 6a9227f4a..d2b849aa1 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 03561476a..bc0239be3 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 a4f326e1d..ae1481a7a 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 8e89d88f4..f42706c7e 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 c621b608f..0784b5ec4 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 9b9de6497..f3124c6ab 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 b826eef37..ad6891833 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 46aadf171..abd36ff9c 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 716afeaf0..37c99ac83 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 af5bc9db7..a7db77ac6 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 100549c02..d7d69e7fa 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 996e27da9..e4edcd450 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 fda6a713c..c38075ab9 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 3ee4b8bee..efe1ee8df 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 8573d9f4d..2e7c23619 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 808b4b1c0..b70767d37 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 91b5b55cc..ad75c104b 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 359c8215d..5ff98ab61 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 5a923458d..205b85a69 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 8e3ce4eaf..4f4c0d590 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 0f9632808..e8a890997 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 377235357..3efab4286 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 bafba80cf..00405f6d8 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 ef1c0e57e..2f2ef602b 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 ee166228c..4c43549c6 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 623f27c11..efda0ae04 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 5786fcba3..609e6b766 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 4f34bc50f..59b8e9f86 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 d4228b47f..507e186ad 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 17d917f5b..f4b6a05ac 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 c80f0a8e4..c8d27d06b 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 a033e6940..3896a97fd 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 e65a32dae..0e8cf7a89 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 f75e28a43..1824c353a 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',