From 078e36f9b87777327858532864150dac93db4b22 Mon Sep 17 00:00:00 2001 From: Cameron Perera Date: Tue, 10 Dec 2024 14:12:43 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20update=20@name=20attribut?= =?UTF-8?q?e=20for=20RadioCard=20Groups=20(#2617)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-15676 --- addons/core/translations/form/en-us.yaml | 2 ++ ui/admin/app/components/form/alias/index.hbs | 6 +++++- .../form/credential-library/vault-generic/index.hbs | 6 +++++- .../credential-library/vault-ssh-certificate/index.hbs | 6 +++++- .../components/form/credential-store/static/index.hbs | 7 +++++-- .../app/components/form/credential-store/vault/index.hbs | 7 +++++-- ui/admin/app/components/form/credential/json/index.hbs | 3 +-- .../components/form/credential/ssh_private_key/index.hbs | 3 +-- .../form/credential/username_password/index.hbs | 3 +-- ui/admin/app/components/form/host-catalog/aws/index.hbs | 8 ++++++-- .../app/components/form/host-catalog/azure/index.hbs | 8 ++++++-- .../app/components/form/host-catalog/static/index.hbs | 2 +- .../app/components/form/storage-bucket/aws/index.hbs | 9 ++++++--- .../app/components/form/storage-bucket/minio/index.hbs | 6 +++++- ui/admin/app/components/form/target/details/index.hbs | 6 +++++- ui/admin/tests/acceptance/host-catalogs/create-test.js | 2 +- ui/admin/tests/acceptance/storage-buckets/create-test.js | 8 ++------ ui/admin/tests/acceptance/storage-buckets/selectors.js | 2 +- ui/admin/tests/acceptance/targets/create-test.js | 2 +- 19 files changed, 64 insertions(+), 32 deletions(-) diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index 125d73e96..d3cfc20d0 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -18,6 +18,8 @@ description: type: label: Type help: The type of the resource, to help differentiate schemas +plugin_type: + label: plugin_type login_name: label: Login Name help: The account login name diff --git a/ui/admin/app/components/form/alias/index.hbs b/ui/admin/app/components/form/alias/index.hbs index 0caca3daf..a36ba0aa5 100644 --- a/ui/admin/app/components/form/alias/index.hbs +++ b/ui/admin/app/components/form/alias/index.hbs @@ -56,7 +56,11 @@ {{t 'resources.alias.description'}} - + {{t 'resources.target.form.type.label'}} {{t 'resources.alias.form.type.label'}} diff --git a/ui/admin/app/components/form/credential-library/vault-generic/index.hbs b/ui/admin/app/components/form/credential-library/vault-generic/index.hbs index cf6e8f5aa..a88e431c3 100644 --- a/ui/admin/app/components/form/credential-library/vault-generic/index.hbs +++ b/ui/admin/app/components/form/credential-library/vault-generic/index.hbs @@ -52,7 +52,11 @@ {{#if (and @model.isNew (feature-flag 'ssh-target'))}} - + {{t 'form.type.label'}} {{#each this.types as |type|}} {{#if @model.isNew}} - + {{t 'form.type.label'}} {{#each this.types as |type|}} + {{t 'form.type.label'}} {{#each-in this.mapResourceTypeWithIcon as |credentialStoreType icon|}} + {{t 'form.type.label'}} {{#each-in this.mapResourceTypeWithIcon as |credentialStoreType icon|}} {{#if @model.isNew}} - + {{t 'form.type.label'}} {{#each @types as |credentialType|}} {{#if @model.isNew}} - + {{t 'form.type.label'}} {{#each @types as |credentialType|}} {{#if @model.isNew}} - + {{t 'form.type.label'}} {{#each @types as |credentialType|}} {{#if @model.isNew}} - + {{t 'form.type.label'}} @@ -83,7 +83,11 @@ {{/each}} - + {{t 'titles.provider'}} diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 9e8fa239b..23c3ac923 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -50,7 +50,7 @@ {{#if @model.isNew}} - + {{t 'form.type.label'}} {{#each this.hostCatalogTypes as |hostCatalogType|}} {{/each}} - + {{t 'titles.provider'}} {{t 'titles.choose-a-provider'}} {{concat diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs index 4f28b4ae2..4c7b3b855 100644 --- a/ui/admin/app/components/form/host-catalog/static/index.hbs +++ b/ui/admin/app/components/form/host-catalog/static/index.hbs @@ -51,7 +51,7 @@ {{#if @model.isNew}} - + {{t 'form.type.label'}} {{#each this.hostCatalogTypes as |hostCatalogType|}} + {{t 'titles.provider'}} {{t 'descriptions.choose-a-provider'}} @@ -212,11 +216,10 @@ {{! credential_type }} - + {{t 'resources.storage-bucket.types.credential'}} {{#each this.credentials as |credentialType|}} + {{t 'titles.provider'}} {{t 'descriptions.choose-a-provider'}} diff --git a/ui/admin/app/components/form/target/details/index.hbs b/ui/admin/app/components/form/target/details/index.hbs index c9d934dc7..2b6764882 100644 --- a/ui/admin/app/components/form/target/details/index.hbs +++ b/ui/admin/app/components/form/target/details/index.hbs @@ -53,7 +53,11 @@ {{#if (and @model.isNew (feature-flag 'ssh-target'))}} - + {{t 'resources.target.form.type.label'}} {{t 'resources.target.form.type.help'}} {{#each this.typeMetas as |type|}} diff --git a/ui/admin/tests/acceptance/host-catalogs/create-test.js b/ui/admin/tests/acceptance/host-catalogs/create-test.js index 95aaaaa85..71fbd40db 100644 --- a/ui/admin/tests/acceptance/host-catalogs/create-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/create-test.js @@ -21,7 +21,7 @@ module('Acceptance | host-catalogs | create', function (hooks) { const NAME_INPUT_SELECTOR = '[name="name"]'; const DESCRIPTION_INPUT_SELECTOR = '[name="description"]'; - const TYPE_INPUT_SELECTOR = '[name="type"]'; + const TYPE_INPUT_SELECTOR = '[name="Type"]'; const SAVE_BUTTON_SELECTOR = '[type="submit"]'; const CANCEL_BUTTON_SELECTOR = '.rose-form-actions [type="button"]'; const ALERT_TEXT_SELECTOR = diff --git a/ui/admin/tests/acceptance/storage-buckets/create-test.js b/ui/admin/tests/acceptance/storage-buckets/create-test.js index bf2ea9ac4..9d10a4f46 100644 --- a/ui/admin/tests/acceptance/storage-buckets/create-test.js +++ b/ui/admin/tests/acceptance/storage-buckets/create-test.js @@ -148,9 +148,7 @@ module('Acceptance | storage-buckets | create', function (hooks) { await fillIn(commonSelectors.FIELD_NAME, commonSelectors.FIELD_NAME_VALUE); // There are 2 credential types - assert - .dom(`${selectors.GROUP_CREDENTIAL_TYPE} .hds-form-radio-card`) - .exists({ count: 2 }); + assert.dom(selectors.GROUP_CREDENTIAL_TYPE).exists({ count: 2 }); await click(selectors.FIELD_DYNAMIC_CREDENTIAL); await fillIn(selectors.FIELD_ROLE_ARN, selectors.FIELD_ROLE_ARN_VALUE); @@ -172,9 +170,7 @@ module('Acceptance | storage-buckets | create', function (hooks) { await click(`[href="${urls.newStorageBucket}"]`); await fillIn(commonSelectors.FIELD_NAME, commonSelectors.FIELD_NAME_VALUE); - assert - .dom(`${selectors.GROUP_CREDENTIAL_TYPE} .hds-form-radio-card`) - .exists({ count: 2 }); + assert.dom(selectors.GROUP_CREDENTIAL_TYPE).exists({ count: 2 }); await click(selectors.FIELD_STATIC_CREDENTIAL); await fillIn(selectors.FIELD_ACCESS_KEY, selectors.FIELD_ACCESS_KEY_VALUE); diff --git a/ui/admin/tests/acceptance/storage-buckets/selectors.js b/ui/admin/tests/acceptance/storage-buckets/selectors.js index 08eef815a..c86b91f70 100644 --- a/ui/admin/tests/acceptance/storage-buckets/selectors.js +++ b/ui/admin/tests/acceptance/storage-buckets/selectors.js @@ -14,7 +14,7 @@ export const FIELD_BUCKET_NAME_VALUE = 'Test Bucket name'; export const FIELD_BUCKET_NAME_ERROR = '[data-test-bucket-name-error]'; export const FIELD_BUCKET_PREFIX = '[name=bucket_prefix]'; export const FIELD_REGION = '[name=region]'; -export const GROUP_CREDENTIAL_TYPE = '[name=credential_type]'; +export const GROUP_CREDENTIAL_TYPE = '[name=Type]'; export const FIELD_STATIC_CREDENTIAL = '[value=static]'; export const FIELD_DYNAMIC_CREDENTIAL = '[value=dynamic]'; export const FIELD_ROLE_ARN = '[name=role_arn]'; diff --git a/ui/admin/tests/acceptance/targets/create-test.js b/ui/admin/tests/acceptance/targets/create-test.js index 4e7233bc2..0baf0fceb 100644 --- a/ui/admin/tests/acceptance/targets/create-test.js +++ b/ui/admin/tests/acceptance/targets/create-test.js @@ -85,7 +85,7 @@ module('Acceptance | targets | create', function (hooks) { test('defaults to type `ssh` when no query param provided', async function (assert) { featuresService.enable('ssh-target'); await visit(urls.newTarget); - assert.strictEqual(find('[name="type"]:checked').value, TYPE_TARGET_SSH); + assert.strictEqual(find('[name="Type"]:checked').value, TYPE_TARGET_SSH); }); test('can create a type `ssh` target', async function (assert) {