diff --git a/ui/app/styles/components/empty-state.scss b/ui/app/styles/components/empty-state.scss index 24878c7ca..9f685794b 100644 --- a/ui/app/styles/components/empty-state.scss +++ b/ui/app/styles/components/empty-state.scss @@ -13,7 +13,6 @@ } .empty-state-title { - white-space: nowrap; color: $grey; font-size: $size-4; font-weight: $font-weight-semibold; diff --git a/ui/lib/core/addon/templates/components/info-table-item-array.hbs b/ui/lib/core/addon/templates/components/info-table-item-array.hbs index 9cc59e294..33d5ca975 100644 --- a/ui/lib/core/addon/templates/components/info-table-item-array.hbs +++ b/ui/lib/core/addon/templates/components/info-table-item-array.hbs @@ -14,7 +14,7 @@ {{/if}} {{/let}} {{else}} - {{#link-to "vault.cluster.secrets.backend.show" (if queryParam (concat queryParam "/" name) name)}} + {{#link-to "vault.cluster.secrets.backend.show" (if queryParam (concat queryParam "/" name) name) data-test-item="array"}} {{name}} {{/link-to}} {{/if}} diff --git a/ui/lib/core/addon/templates/components/info-table-row.hbs b/ui/lib/core/addon/templates/components/info-table-row.hbs index 5eb2496c5..a9724d007 100644 --- a/ui/lib/core/addon/templates/components/info-table-row.hbs +++ b/ui/lib/core/addon/templates/components/info-table-row.hbs @@ -42,8 +42,6 @@ @viewAll={{viewAll}} @wildcardLabel={{wildcardLabel}} /> - {{else if isLink}} - {{value}} {{else}} {{#if tooltipText}} `); + + assert.dom('[data-test-component="info-table-row"]').exists(); + let string = document.querySelector('code').textContent; + assert.equal(string, VALUE, 'renders value as passed through'); + }); + + test('it renders a string with no link if isLink is true and the item type is not an array.', async function(assert) { + // This could be changed in the component so that it adds a link for any item type, but right it should only add a link if item type is an array. + await render(hbs``); + let string = document.querySelector('code').textContent; + assert.equal(string, VALUE, 'renders value in code element and not in a tag'); + }); + + test('it renders links if isLink is true and type is array', async function(assert) { + this.set('valueArray', ['valueArray']); + await render(hbs``); + + assert.dom('[data-test-item="array"]').hasText('valueArray', 'Confirm link with item value exist'); + }); +});