diff --git a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs index 7933e5d3c..381642bb1 100644 --- a/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs +++ b/ui/admin/app/templates/scopes/scope/host-catalogs/host-catalog/host-sets/host-set/hosts/index.hbs @@ -28,82 +28,101 @@ {{#if @model.hosts}} - - - - {{#if @model.hostSet.isStatic}} - {{t 'form.name.label'}} - {{else}} - {{t 'form.external_name.label'}} - {{/if}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - {{#if @model.hostSet.isStatic}} - {{t 'titles.actions'}} - {{/if}} - - - - - {{#each @model.hosts as |host|}} - - - {{#if host.isStatic}} - - {{host.displayName}} - - {{else}} - {{! Link to a different subroute for dynamic/plugin hosts }} - - {{host.displayName}} - - {{/if}} -

{{host.description}}

-
- - - - - + <:body as |B|> + + + - {{host.id}} - - - + {{B.data.displayName}} + + + {{B.data.description}} + + + + + + + + + + {{#if (can 'removeHosts hostSet' @model.hostSet)}} - - + + - {{t 'actions.remove'}} - - + /> + {{/if}} - -
- {{/each}} -
-
+ + + + + + {{else}} + + <:body as |B|> + + + + {{B.data.displayName}} + + + {{B.data.description}} + + + + + + + + + + + + {{/if}} {{/if}} {{#unless @model.hosts}} 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 e80375a9c..3212f3a4b 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 @@ -98,7 +98,9 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { const count = getHostSetHostCount(); await visit(urls.hostSetHosts); assert.strictEqual(findAll('tbody tr').length, count); - await click('tbody tr .rose-dropdown-button-danger'); + + await click('[data-test-host-set-hosts-dropdown-toggle]'); + await click('[data-test-host-set-hosts-dropdown-remove-host]'); assert.strictEqual(findAll('tbody tr').length, count - 1); }); @@ -126,7 +128,8 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { }); await visit(urls.hostSetHosts); assert.strictEqual(findAll('tbody tr').length, getHostSetHostCount()); - await click('tbody tr .rose-dropdown-button-danger'); + await click('[data-test-host-set-hosts-dropdown-toggle]'); + await click('[data-test-host-set-hosts-dropdown-remove-host]'); assert.ok(find('[role="alert"]')); }); @@ -169,11 +172,12 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { const count = getHostSetHostCount(); await visit(urls.hostSetHosts); assert.strictEqual(findAll('tbody tr').length, count); - await click('tbody tr .rose-dropdown-button-danger'); + await click('[data-test-host-set-hosts-dropdown-toggle]'); + await click('[data-test-host-set-hosts-dropdown-remove-host]'); assert.strictEqual(findAll('tbody tr').length, count - 1); await click('.rose-layout-page-actions a:nth-child(2)'); assert.strictEqual(currentURL(), urls.addHosts); - await click('tbody label'); + await click('tbody .hds-table__tr .hds-form-label'); await click('form [type="button"]'); await visit(urls.hostSetHosts); assert.strictEqual(findAll('tbody tr').length, count - 1); @@ -194,7 +198,7 @@ module('Acceptance | host-catalogs | host-sets | hosts', function (hooks) { }); instances.hostSet.update({ hostIds: [] }); await visit(urls.addHosts); - await click('tbody label'); + await click('tbody .hds-table__tr .hds-form-label'); await click('form [type="submit"]'); assert.ok(find('[role="alert"]')); });