diff --git a/ui/admin/tests/acceptance/managed-groups/members-test.js b/ui/admin/tests/acceptance/managed-groups/members-test.js index 02fb79fb1..96a14f7a8 100644 --- a/ui/admin/tests/acceptance/managed-groups/members-test.js +++ b/ui/admin/tests/acceptance/managed-groups/members-test.js @@ -47,8 +47,8 @@ module('Acceptance | managed-groups | members', function (hooks) { }, 'withAccountsAndUsersAndManagedGroups', ); + instances.managedGroup = this.server.schema.managedGroups.first(); - instances.managedGroup = this.server.db.managedGroups[0]; // Generate route URLs for resources urls.authMethods = `/scopes/${instances.scopes.org.id}/auth-methods`; urls.authMethod = `${urls.authMethods}/${instances.authMethod.id}`; diff --git a/ui/admin/tests/acceptance/roles/delete-test.js b/ui/admin/tests/acceptance/roles/delete-test.js index fd233c113..18483f5e0 100644 --- a/ui/admin/tests/acceptance/roles/delete-test.js +++ b/ui/admin/tests/acceptance/roles/delete-test.js @@ -57,13 +57,16 @@ module('Acceptance | roles | delete', function (hooks) { }); test('can delete a role', async function (assert) { - const rolesCount = this.server.db.roles.length; + const rolesCount = this.server.schema.roles.all().models.length; await visit(urls.role); await click(selectors.MANAGE_DROPDOWN_ROLES); await click(selectors.MANAGE_DROPDOWN_ROLES_REMOVE); - assert.strictEqual(this.server.db.roles.length, rolesCount - 1); + assert.strictEqual( + this.server.schema.roles.all().models.length, + rolesCount - 1, + ); }); test('cannot delete a role without proper authorization', async function (assert) { diff --git a/ui/admin/tests/acceptance/roles/principals-test.js b/ui/admin/tests/acceptance/roles/principals-test.js index a7c199ab3..695afea97 100644 --- a/ui/admin/tests/acceptance/roles/principals-test.js +++ b/ui/admin/tests/acceptance/roles/principals-test.js @@ -48,10 +48,11 @@ module('Acceptance | roles | principals', function (hooks) { }, 'withPrincipals', ); + principalsCount = - this.server.db.roles[0].userIds.length + - this.server.db.roles[0].groupIds.length + - this.server.db.roles[0].managedGroupIds.length; + this.server.schema.roles.first().userIds.length + + this.server.schema.roles.first().groupIds.length + + this.server.schema.roles.first().managedGroupIds.length; urls.roles = `/scopes/${instances.scopes.org.id}/roles`; urls.role = `${urls.roles}/${instances.role.id}`; urls.rolePrincipals = `${urls.role}/principals`; diff --git a/ui/admin/tests/acceptance/users/accounts-test.js b/ui/admin/tests/acceptance/users/accounts-test.js index be3353bd7..5a3588a0d 100644 --- a/ui/admin/tests/acceptance/users/accounts-test.js +++ b/ui/admin/tests/acceptance/users/accounts-test.js @@ -326,9 +326,9 @@ module('Acceptance | users | accounts', function (hooks) { }); test('can navigate to account link for oidc account', async function (assert) { - this.server.db.authMethods.remove(); - this.server.db.users.remove(); - this.server.db.accounts.remove(); + this.server.schema.authMethods.all().destroy(); + this.server.schema.users.all().destroy(); + this.server.schema.accounts.all().destroy(); const authMethod = this.server.create( 'auth-method', @@ -355,9 +355,9 @@ module('Acceptance | users | accounts', function (hooks) { }); test('can navigate to account link for ldap account', async function (assert) { - this.server.db.authMethods.remove(); - this.server.db.users.remove(); - this.server.db.accounts.remove(); + this.server.schema.authMethods.all().destroy(); + this.server.schema.users.all().destroy(); + this.server.schema.accounts.all().destroy(); const authMethod = this.server.create( 'auth-method', diff --git a/ui/desktop/tests/acceptance/projects/sessions/index-test.js b/ui/desktop/tests/acceptance/projects/sessions/index-test.js index 4d9bb439c..e1dd3090e 100644 --- a/ui/desktop/tests/acceptance/projects/sessions/index-test.js +++ b/ui/desktop/tests/acceptance/projects/sessions/index-test.js @@ -188,7 +188,7 @@ module('Acceptance | projects | sessions | index', function (hooks) { }); test('visiting empty sessions', async function (assert) { - this.server.db.sessions.remove(); + this.server.schema.sessions.all().destroy(); this.stubCacheDaemonSearch('sessions', 'sessions'); await visit(urls.projects); diff --git a/ui/desktop/tests/acceptance/projects/targets/index-test.js b/ui/desktop/tests/acceptance/projects/targets/index-test.js index df68f8078..19c5df779 100644 --- a/ui/desktop/tests/acceptance/projects/targets/index-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/index-test.js @@ -205,8 +205,8 @@ module('Acceptance | projects | targets | index', function (hooks) { }); test('visiting targets list view with no targets', async function (assert) { - this.server.db.targets.remove(); - this.server.db.sessions.remove(); + this.server.schema.targets.all().destroy(); + this.server.schema.sessions.all().destroy(); this.stubCacheDaemonSearch('sessions', 'targets', 'aliases'); await visit(urls.projects); diff --git a/ui/desktop/tests/acceptance/scopes-test.js b/ui/desktop/tests/acceptance/scopes-test.js index e6c0a1c3b..40be6405c 100644 --- a/ui/desktop/tests/acceptance/scopes-test.js +++ b/ui/desktop/tests/acceptance/scopes-test.js @@ -265,9 +265,8 @@ module('Acceptance | scopes', function (hooks) { }); test('visiting empty targets', async function (assert) { - assert.expect(1); - this.server.db.targets.remove(); - this.server.db.sessions.remove(); + this.server.schema.targets.all().destroy(); + this.server.schema.sessions.all().destroy(); this.stubCacheDaemonSearch('sessions', 'targets', 'aliases'); await visit(urls.targets);