chore: 🤖 Create select field render for the Form::Field::ListWrapper (#2112)
* chore: 🤖 Create `select` field render for the `Form::Field::ListWrapper` component Create a `select` field render for the `Form::Field::ListWrapper` component. ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271 * refactor: 💡 Added additional test Added additional testing around removing and adding an option, and refactored for better usability ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271 * refactor: 💡 Refactored getter to check for option and model arg Refactore getter to check for options and model args. ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271 * refactor: 💡 Use select field with `signing_algorithms` Use select field with `signing_algorithms` ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271 * refactor: 💡 fix test fix test ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271 * refactor: 💡 fix failing test fix failing test ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271 * refactor: 💡 fix update auth-method test fix update auth-method test ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12271
This commit is contained in:
1 parent
d2d332b7d1
commit
c79a1fca79
7 files changed
+238
-113
No files matched your search
@@ -118,7 +118,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
|
||||
await fillIn('[name="client_id"]', 'client_id');
|
||||
await fillIn('[name="client_secret"]', 'client_secret');
|
||||
await select('form fieldset:nth-of-type(1) select', 'RS384');
|
||||
await click('form fieldset:nth-of-type(1) [title="Add"]');
|
||||
await click('[data-test-add-option-button]');
|
||||
await fillIn(ALLOWED_AUDIENCES_INPUT_SELECTOR, 'allowed_audiences');
|
||||
await click(ALLOWED_AUDIENCES_BTN_SELECTOR, 'allowed_audiences');
|
||||
await fillIn(CLAIMS_SCOPES_INPUT_SELECTOR, 'claims_scopes');
|
||||
|
||||
@@ -53,6 +53,12 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
const CLAIMS_SCOPES_INPUT_SELECTOR = '[name="claims_scopes"] input';
|
||||
const TOGGLE_SELECTOR = '[name="prompts"]';
|
||||
|
||||
const SIGNING_ALGORITHMS_REMOVE_BTN_SELECTOR =
|
||||
'[data-test-remove-option-button]';
|
||||
const SIGNING_ALGORITHMS_INPUT_SELECTOR =
|
||||
'.list-wrapper-field tbody tr:last-child select';
|
||||
const SIGNING_ALGORITHMS_ADD_BTN_SELECTOR = '[data-test-add-option-button]';
|
||||
|
||||
const instances = {
|
||||
scopes: {
|
||||
global: null,
|
||||
@@ -123,14 +129,16 @@ module('Acceptance | auth-methods | update', function (hooks) {
|
||||
await fillIn('[name="issuer"]', 'issuer');
|
||||
await fillIn('[name="client_id"]', 'client_id');
|
||||
await fillIn('[name="client_secret"]', 'client_secret');
|
||||
|
||||
// Remove all signing algorithms
|
||||
await Promise.all(
|
||||
findAll('form fieldset:nth-of-type(1) [title="Remove"]').map((element) =>
|
||||
click(element),
|
||||
),
|
||||
);
|
||||
await select('form fieldset:nth-of-type(1) select', 'RS384');
|
||||
await click('form fieldset:nth-of-type(1) [title="Add"]');
|
||||
let removeButtons = findAll(SIGNING_ALGORITHMS_REMOVE_BTN_SELECTOR);
|
||||
|
||||
for (const element of removeButtons) {
|
||||
await click(element);
|
||||
}
|
||||
await select(SIGNING_ALGORITHMS_INPUT_SELECTOR, 'RS384');
|
||||
await click(SIGNING_ALGORITHMS_ADD_BTN_SELECTOR);
|
||||
|
||||
// Remove all allowed audiences
|
||||
const allowedAudiencesList = findAll(ALLOWED_AUDIENCES_REMOVE_BTN_SELECTOR);
|
||||
|
||||
|
||||
Reference in new issue
Block a user