From c1a337269f757691dd64d7d09bb189cfd6d3df7d Mon Sep 17 00:00:00 2001 From: Kianna <30884335+kiannaquach@users.noreply.github.com> Date: Wed, 8 Feb 2023 09:38:30 -0800 Subject: [PATCH] UI: VAULT-13135 Add copyable issuer id row to issuer details (#19054) * VAULT-13135 Add copyable issuer id row to issuer details * Fix failing test --- ui/app/models/pki/issuer.js | 1 + ui/lib/pki/addon/components/page/pki-issuer-details.hbs | 1 + ui/tests/acceptance/pki/pki-engine-workflow-test.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app/models/pki/issuer.js b/ui/app/models/pki/issuer.js index 00ce4caae..1876d8722 100644 --- a/ui/app/models/pki/issuer.js +++ b/ui/app/models/pki/issuer.js @@ -13,6 +13,7 @@ const issuerUrls = ['issuingCertificates', 'crlDistributionPoints', 'ocspServers 'caChain', 'commonName', 'issuerName', + 'issuerId', 'serialNumber', 'keyId', 'uriSans', diff --git a/ui/lib/pki/addon/components/page/pki-issuer-details.hbs b/ui/lib/pki/addon/components/page/pki-issuer-details.hbs index 68d2bb7ee..73f15169a 100644 --- a/ui/lib/pki/addon/components/page/pki-issuer-details.hbs +++ b/ui/lib/pki/addon/components/page/pki-issuer-details.hbs @@ -117,6 +117,7 @@ @value={{get @issuer attr.name}} @formatDate={{if attr.options.formatDate "MMM d yyyy HH:mm:ss a zzzz"}} @alwaysRender={{true}} + @addCopyButton={{(eq attr.name "issuerId")}} /> {{/if}} {{/each}} diff --git a/ui/tests/acceptance/pki/pki-engine-workflow-test.js b/ui/tests/acceptance/pki/pki-engine-workflow-test.js index 4d44bd095..4fc737fb4 100644 --- a/ui/tests/acceptance/pki/pki-engine-workflow-test.js +++ b/ui/tests/acceptance/pki/pki-engine-workflow-test.js @@ -427,7 +427,7 @@ module('Acceptance | pki workflow', function (hooks) { assert.dom(SELECTORS.issuerDetails.title).hasText('View issuer certificate'); assert .dom(`${SELECTORS.issuerDetails.defaultGroup} ${SELECTORS.issuerDetails.row}`) - .exists({ count: 10 }, 'Renders 10 info table items under default group'); + .exists({ count: 11 }, 'Renders 10 info table items under default group'); assert .dom(`${SELECTORS.issuerDetails.urlsGroup} ${SELECTORS.issuerDetails.row}`) .exists({ count: 3 }, 'Renders 4 info table items under URLs group');