diff --git a/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs b/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs index bc90916ef..0d03ee4b9 100644 --- a/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs +++ b/ui/admin/app/templates/scopes/scope/roles/role/principals.hbs @@ -37,67 +37,63 @@ {{#if @model.principals}} - - - - {{t 'form.name.label'}} - {{t 'form.id.label'}} - {{t 'form.type.label'}} - {{t 'resources.scope.title'}} - {{t 'titles.actions'}} - - - - {{#each @model.principals as |principal|}} - - - {{#if (can 'readPrincipal role' principal)}} - - {{else}} - {{principal.displayName}} - {{/if}} - {{#if principal.accountName}} -
- {{/if}} -
- - - {{principal.id}} - - - - - - - - - - {{#if (can 'removePrincipals role' @model.role)}} - + <:body as |B|> + + + {{#if (can 'readPrincipal role' B.data)}} + + {{else}} + {{B.data.displayName}} + {{/if}} + {{#if B.data.accountName}} +
+ {{/if}} +
+ + + {{B.data.id}} + + + + + + + + + + {{#if (can 'removePrincipals role' @model.role)}} + + - - {{t 'actions.remove'}} - -
- {{/if}} -
-
- {{/each}} -
-
+ @hasChevron={{false}} + /> + + + {{/if}} + + + + {{else}} diff --git a/ui/admin/tests/acceptance/roles/principals-test.js b/ui/admin/tests/acceptance/roles/principals-test.js index 4f8e2d8bd..e3e04fe52 100644 --- a/ui/admin/tests/acceptance/roles/principals-test.js +++ b/ui/admin/tests/acceptance/roles/principals-test.js @@ -71,7 +71,8 @@ module('Acceptance | roles | principals', function (hooks) { assert.expect(2); await visit(urls.rolePrincipals); assert.strictEqual(findAll('tbody tr').length, principalsCount); - await click('tbody tr .rose-dropdown-button-danger'); + await click('.hds-dropdown-toggle-icon'); + await click('tbody tr .hds-dropdown-list-item button'); assert.strictEqual(findAll('tbody tr').length, principalsCount - 1); }); @@ -82,7 +83,7 @@ module('Acceptance | roles | principals', function (hooks) { ); instances.role.update({ authorized_actions }); await visit(urls.rolePrincipals); - assert.notOk(find('tbody tr .rose-dropdown-button-danger')); + assert.notOk(find('tbody tr .hds-dropdown-list-item button')); }); test('shows error message on principal remove', async function (assert) { @@ -101,7 +102,8 @@ module('Acceptance | roles | principals', function (hooks) { }); await visit(urls.rolePrincipals); assert.strictEqual(findAll('tbody tr').length, principalsCount); - await click('tbody tr .rose-dropdown-button-danger'); + await click('.hds-dropdown-toggle-icon'); + await click('tbody tr .hds-dropdown-list-item button'); assert.ok(find('[role="alert"]')); }); @@ -136,7 +138,8 @@ module('Acceptance | roles | principals', function (hooks) { await visit(urls.rolePrincipals); assert.strictEqual(findAll('tbody tr').length, principalsCount); // Remove a principal to populate association view - await click('tbody tr .rose-dropdown-button-danger'); + await click('.hds-dropdown-toggle-icon'); + await click('tbody tr .hds-dropdown-list-item button'); assert.strictEqual(findAll('tbody tr').length, principalsCount - 1); await click('.rose-layout-page-actions a'); assert.strictEqual(currentURL(), urls.addPrincipals);