chore: 🤖 Migrate form.input to Hds::TextInput::Field (#2143)

* chore: 🤖 Migrate `form.input` to `Hds::TextInput::Field`

Migrate `form/credential` forms for for `json`, `ssh_private_key`,
`username_password`, and `form/credential-store` forms for `static` and
`vault` to use `Hds::TextInput::Field` instead of `form.input`.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 fix broken test

fix broken test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 fix broken test

fix broken test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 added `@hasVisibilityToggle` back and clean up test

Added `@hasVisibilityToggle` back and clean up test by use `data-test-*`
attributes for error messaging

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 set `@hasVisiblityToggle` to default

set `@hasVisiblityToggle` to default

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 field argument clean up

field argument cleanup

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 switch `disabled` argument to `readonly`

switch `disabled` argument to `readonly`

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461

* refactor: 💡 clean up attribute order

clean up field attribute order

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12461
This commit is contained in:
Devon Anderson authored and GitHub committed 2024-02-28 12:21:37 -05:00
1 parent f1c5c99664
commit 060f995f94
10 files changed
+266 -205

No files matched your search

@@ -134,7 +134,7 @@ module('Acceptance | credential-stores | create', function (hooks) {
'The request was invalid.',
);
assert.ok(
find('.rose-form-error-message').textContent.trim(),
find('[data-test-error-message-name]').textContent.trim(),
'Name is required.',
);
});
@@ -235,7 +235,7 @@ module(
.dom('.rose-notification-body')
.hasText('Error in provided request.');
assert
.dom('.rose-form-error-message')
.dom('[data-test-error-message-password]')
.hasText('Field required for creating a username-password credential.');
});
@@ -270,7 +270,7 @@ module(
.dom('.rose-notification-body')
.hasText('Error in provided request.');
assert
.dom('.hds-form-error__message')
.dom('[data-test-error-message-private-key]')
.hasText('Field required for creating a username-key-pair credential.');
});
@@ -232,7 +232,7 @@ module(
'Error in provided request.',
);
assert.ok(
find('.rose-form-error-message').textContent.trim(),
find('[data-test-error-message-name]').textContent.trim(),
'Name is required.',
);
});
@@ -267,7 +267,7 @@ module(
'Error in provided request.',
);
assert.ok(
find('.rose-form-error-message').textContent.trim(),
find('[data-test-error-message-name]').textContent.trim(),
'Name is required.',
);
});
@@ -302,7 +302,7 @@ module(
'Error in provided request.',
);
assert.ok(
find('.rose-form-error-message').textContent.trim(),
find('[data-test-error-message-name]').textContent.trim(),
'Name is required.',
);
});
@@ -159,7 +159,7 @@ module('Acceptance | credential-stores | update', function (hooks) {
'The request was invalid.',
);
assert.ok(
find('.rose-form-error-message').textContent.trim(),
find('[data-test-error-message-name]').textContent.trim(),
'Name is required.',
);
});
@@ -193,7 +193,7 @@ module('Acceptance | credential-stores | update', function (hooks) {
'The request was invalid.',
);
assert.ok(
find('.rose-form-error-message').textContent.trim(),
find('[data-test-error-message-name]').textContent.trim(),
'Name is required.',
);
});