migrate ldap list wrapper fields (#3162)

This commit is contained in:
Dharini committed 2026-06-03 16:36:29 -07:00
1 parent 71ec7b465a
commit 4e2b779d96
12 files changed
+163 -136

No files matched your search

@@ -11,5 +11,8 @@
@removeItemByIndex={{@removeItemByIndex}} @removeItemByIndex={{@removeItemByIndex}}
@addStringItem={{@addStringItem}} @addStringItem={{@addStringItem}}
@addAccountMapItem={{@addAccountMapItem}} @addAccountMapItem={{@addAccountMapItem}}
@addRow={{this.addRow}}
@removeRow={{this.removeRow}}
@updateRow={{this.updateRow}}
/> />
{{/if}} {{/if}}
@@ -5,6 +5,7 @@
import Component from '@glimmer/component'; import Component from '@glimmer/component';
import { assert } from '@ember/debug'; import { assert } from '@ember/debug';
import { action } from '@ember/object';
import oidc from './oidc'; import oidc from './oidc';
import ldap from './ldap'; import ldap from './ldap';
import password from './password'; import password from './password';
@@ -24,4 +25,47 @@ export default class FormAuthMethodIndex extends Component {
); );
return component; return component;
} }
/**
* Adds a new empty row to the specified field
* @param {string} field - The field name to add a row to
* @param {Array<string>} properties - Array of property names for the empty row (e.g., ['value'] or ['key', 'value'])
*/
@action
addRow(field, properties) {
const emptyRow = Object.fromEntries(properties.map((prop) => [prop, '']));
this.args.model[field] = [...this.args.model[field], emptyRow];
}
/**
* Removes a row from the specified field
* @param {string} field - The field name to remove a row from
* @param {object} rowData - The row data to remove
*/
@action
removeRow(field, rowData) {
let rows = this.args.model[field].filter((item) => item !== rowData);
// Ensure at least one empty row exists for editing
if (rows.length === 0) {
const emptyRow = Object.fromEntries(
Object.keys(rowData).map((key) => [key, '']),
);
rows = [emptyRow];
}
this.args.model[field] = rows;
}
/**
* Updates a specific property in a row
* @param {string} field - The field name containing the row
* @param {object} rowData - The row object to update
* @param {string} property - The property name to update
* @param {object} event - The DOM event containing the new value
*/
@action
updateRow(field, rowData, property, { target: { value } }) {
rowData[property] = value;
this.args.model[field] = [...this.args.model[field]];
}
} }
@@ -82,37 +82,31 @@
{{/if}} {{/if}}
</Hds::Form::TextInput::Field> </Hds::Form::TextInput::Field>
<Form::Field::ListWrapper <Form::Field::KeyValue
@layout='horizontal' @name='certificates'
@isOptional={{true}} @data={{@model.certificates}}
@onAdd={{fn @addRow 'certificates' (array 'value')}}
@onRemove={{fn @removeRow 'certificates'}}
@onUpdate={{fn @updateRow 'certificates'}}
@legend={{t 'resources.auth-method.form.certificates.label'}}
@helperText={{t 'resources.auth-method.form.certificates.help'}}
@errors={{@model.errors.certificates}}
@disabled={{form.disabled}} @disabled={{form.disabled}}
@isOptional={{true}}
> >
<:fieldset as |F|> <:row as |R|>
<F.Legend> <R.Field as |F|>
{{t 'resources.auth-method.form.certificates.label'}} <F.Textarea
</F.Legend> data-test-value-input
<F.HelperText> @value={{R.rowData.value}}
{{t 'resources.auth-method.form.certificates.help'}} {{on 'input' (fn R.updateRow 'value')}}
</F.HelperText> />
</R.Field>
{{#if @model.errors.certificates}} {{#if R.canDelete}}
<F.Error as |E|> <R.DeleteRowButton data-test-delete-button @onClick={{R.removeRow}} />
{{#each @model.errors.certificates as |error|}}
<E.Message>{{error.message}}</E.Message>
{{/each}}
</F.Error>
{{/if}} {{/if}}
</:fieldset> </:row>
</Form::Field::KeyValue>
<:field as |F|>
<F.Textarea
@name='certificates'
@options={{@model.certificates}}
@model={{@model}}
/>
</:field>
</Form::Field::ListWrapper>
{{#if @model.isNew}} {{#if @model.isNew}}
<Hds::Form::TextInput::Field <Hds::Form::TextInput::Field
@@ -406,45 +400,48 @@
}}</F.HelperText> }}</F.HelperText>
</Hds::Form::TextInput::Field> </Hds::Form::TextInput::Field>
<Form::Field::ListWrapper <Form::field::KeyValue
@layout='horizontal' @name='account_attribute_maps'
@isOptional={{true}} @data={{@model.account_attribute_maps}}
@onAdd={{fn @addRow 'account_attribute_maps' (array 'key' 'value')}}
@onRemove={{fn @removeRow 'account_attribute_maps'}}
@onUpdate={{fn @updateRow 'account_attribute_maps'}}
@legend={{t 'resources.auth-method.form.account_attribute_maps.label'}}
@helperText={{t 'resources.auth-method.form.account_attribute_maps.help'}}
@errors={{@model.errors.account_attribute_maps}}
@disabled={{form.disabled}} @disabled={{form.disabled}}
@isOptional={{true}}
> >
<:fieldset as |F|> <:row as |R|>
<F.Legend> <R.Field as |F|>
{{t 'resources.auth-method.form.account_attribute_maps.label'}} <F.Label>{{t 'resources.auth-method.titles.from-attr'}}</F.Label>
</F.Legend> <F.TextInput
<F.HelperText> data-test-key-input
{{t 'resources.auth-method.form.account_attribute_maps.help'}} @value={{R.rowData.key}}
</F.HelperText> {{on 'input' (fn R.updateRow 'key')}}
/>
{{#if @model.errors.account_attribute_maps}} </R.Field>
<F.Error as |E|> <R.Field as |F|>
{{#each @model.errors.account_attribute_maps as |error|}} <F.Label>{{t 'resources.auth-method.titles.to-attr'}}</F.Label>
<E.Message>{{error.message}}</E.Message> <F.Select
data-test-value-select
{{on 'change' (fn R.updateRow 'value')}}
>
<option disabled hidden selected value=''>
{{t 'titles.choose-an-option'}}
</option>
{{#each this.toAttributes as |attr|}}
<option value={{attr}} selected={{eq R.rowData.value attr}}>
{{attr}}
</option>
{{/each}} {{/each}}
</F.Error> </F.Select>
</R.Field>
{{#if R.canDelete}}
<R.DeleteRowButton data-test-delete-button @onClick={{R.removeRow}} />
{{/if}} {{/if}}
</:fieldset> </:row>
<:field as |F|> </Form::field::KeyValue>
<F.KeyValue
@name='account_attribute_maps'
@options={{@model.account_attribute_maps}}
@model={{@model}}
@keyLabel={{t 'resources.auth-method.titles.from-attr'}}
@valueLabel={{t 'resources.auth-method.titles.to-attr'}}
@width='100%'
>
<:key as |K|>
<K.text />
</:key>
<:value as |V|>
<V.select @selectOptions={{this.toAttributes}} />
</:value>
</F.KeyValue>
</:field>
</Form::Field::ListWrapper>
<div class='ldap-section'> <div class='ldap-section'>
<Hds::Text::Display <Hds::Text::Display
@@ -150,9 +150,9 @@
<Form::Field::KeyValue <Form::Field::KeyValue
@name='signing_algorithms' @name='signing_algorithms'
@data={{@model.signing_algorithms}} @data={{@model.signing_algorithms}}
@onAdd={{fn this.addRow 'signing_algorithms' this.createEmptyValue}} @onAdd={{fn @addRow 'signing_algorithms' (array 'value')}}
@onRemove={{fn this.removeRow 'signing_algorithms' this.createEmptyValue}} @onRemove={{fn @removeRow 'signing_algorithms'}}
@onUpdate={{fn this.updateRow 'signing_algorithms'}} @onUpdate={{fn @updateRow 'signing_algorithms'}}
@legend={{t 'form.signing_algorithms.label'}} @legend={{t 'form.signing_algorithms.label'}}
@helperText={{t 'form.signing_algorithms.help'}} @helperText={{t 'form.signing_algorithms.help'}}
@errors={{@model.errors.signing_algorithms}} @errors={{@model.errors.signing_algorithms}}
@@ -162,7 +162,7 @@
<:row as |R|> <:row as |R|>
<R.Field as |F|> <R.Field as |F|>
<F.Select <F.Select
data-test-value-input data-test-value-select
{{on 'change' (fn R.updateRow 'value')}} {{on 'change' (fn R.updateRow 'value')}}
> >
<option disabled hidden selected value=''> <option disabled hidden selected value=''>
@@ -188,9 +188,9 @@
<Form::Field::KeyValue <Form::Field::KeyValue
@name='allowed_audiences' @name='allowed_audiences'
@data={{@model.allowed_audiences}} @data={{@model.allowed_audiences}}
@onAdd={{fn this.addRow 'allowed_audiences' this.createEmptyValue}} @onAdd={{fn @addRow 'allowed_audiences' (array 'value')}}
@onRemove={{fn this.removeRow 'allowed_audiences' this.createEmptyValue}} @onRemove={{fn @removeRow 'allowed_audiences'}}
@onUpdate={{fn this.updateRow 'allowed_audiences'}} @onUpdate={{fn @updateRow 'allowed_audiences'}}
@legend={{t 'form.allowed_audiences.label'}} @legend={{t 'form.allowed_audiences.label'}}
@helperText={{t 'form.allowed_audiences.help'}} @helperText={{t 'form.allowed_audiences.help'}}
@errors={{@model.errors.allowed_audiences}} @errors={{@model.errors.allowed_audiences}}
@@ -215,9 +215,9 @@
<Form::Field::KeyValue <Form::Field::KeyValue
@name='claims_scopes' @name='claims_scopes'
@data={{@model.claims_scopes}} @data={{@model.claims_scopes}}
@onAdd={{fn this.addRow 'claims_scopes' this.createEmptyValue}} @onAdd={{fn @addRow 'claims_scopes' (array 'value')}}
@onRemove={{fn this.removeRow 'claims_scopes' this.createEmptyValue}} @onRemove={{fn @removeRow 'claims_scopes'}}
@onUpdate={{fn this.updateRow 'claims_scopes'}} @onUpdate={{fn @updateRow 'claims_scopes'}}
@legend={{t 'form.claims_scopes.label'}} @legend={{t 'form.claims_scopes.label'}}
@helperText={{t 'form.claims_scopes.help'}} @helperText={{t 'form.claims_scopes.help'}}
@errors={{@model.errors.claims_scopes}} @errors={{@model.errors.claims_scopes}}
@@ -242,13 +242,9 @@
<Form::Field::KeyValue <Form::Field::KeyValue
@name='account_claim_maps' @name='account_claim_maps'
@data={{@model.account_claim_maps}} @data={{@model.account_claim_maps}}
@onAdd={{fn this.addRow 'account_claim_maps' this.createEmptyKeyValue}} @onAdd={{fn @addRow 'account_claim_maps' (array 'key' 'value')}}
@onRemove={{fn @onRemove={{fn @removeRow 'account_claim_maps'}}
this.removeRow @onUpdate={{fn @updateRow 'account_claim_maps'}}
'account_claim_maps'
this.createEmptyKeyValue
}}
@onUpdate={{fn this.updateRow 'account_claim_maps'}}
@legend={{t 'form.account_claim_maps.label'}} @legend={{t 'form.account_claim_maps.label'}}
@helperText={{t 'form.account_claim_maps.help'}} @helperText={{t 'form.account_claim_maps.help'}}
@errors={{@model.errors.account_claim_maps}} @errors={{@model.errors.account_claim_maps}}
@@ -268,7 +264,7 @@
<R.Field as |F|> <R.Field as |F|>
<F.Label>{{t 'form.to_claim.label'}}</F.Label> <F.Label>{{t 'form.to_claim.label'}}</F.Label>
<F.Select <F.Select
data-test-value-input data-test-value-select
{{on 'change' (fn R.updateRow 'value')}} {{on 'change' (fn R.updateRow 'value')}}
> >
<option disabled hidden selected value=''> <option disabled hidden selected value=''>
@@ -292,9 +288,9 @@
<Form::Field::KeyValue <Form::Field::KeyValue
@name='idp_ca_certs' @name='idp_ca_certs'
@data={{@model.idp_ca_certs}} @data={{@model.idp_ca_certs}}
@onAdd={{fn this.addRow 'idp_ca_certs' this.createEmptyValue}} @onAdd={{fn @addRow 'idp_ca_certs' (array 'value')}}
@onRemove={{fn this.removeRow 'idp_ca_certs' this.createEmptyValue}} @onRemove={{fn @removeRow 'idp_ca_certs'}}
@onUpdate={{fn this.updateRow 'idp_ca_certs'}} @onUpdate={{fn @updateRow 'idp_ca_certs'}}
@legend={{t 'form.idp_ca_certs.label'}} @legend={{t 'form.idp_ca_certs.label'}}
@helperText={{t 'form.idp_ca_certs.help'}} @helperText={{t 'form.idp_ca_certs.help'}}
@errors={{@model.errors.idp_ca_certs}} @errors={{@model.errors.idp_ca_certs}}
@@ -9,11 +9,6 @@ import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking'; import { tracked } from '@glimmer/tracking';
export default class FormAuthMethodOidcComponent extends Component { export default class FormAuthMethodOidcComponent extends Component {
// For fields with just a value property
createEmptyValue = () => ({ value: '' });
// For fields with key and value properties
createEmptyKeyValue = () => ({ key: '', value: '' });
// =attributes // =attributes
/** /**
@@ -59,7 +54,6 @@ export default class FormAuthMethodOidcComponent extends Component {
} }
//actions //actions
/** /**
* @param {string} value * @param {string} value
*/ */
@@ -94,34 +88,4 @@ export default class FormAuthMethodOidcComponent extends Component {
this.args.model.prompts = [...removeSelection]; this.args.model.prompts = [...removeSelection];
} }
} }
/**
* Adds a new empty row to account claim maps
*/
@action
addRow(field, emptyRow) {
this.args.model[field] = [...this.args.model[field], emptyRow()];
}
/**
* Removes a row from account claim maps
*/
@action
removeRow(field, emptyRow, rowData) {
let rows = this.args.model[field].filter((item) => item !== rowData);
// Ensure at least one empty row exists for editing
if (rows.length === 0) {
rows = [emptyRow()];
}
this.args.model[field] = rows;
}
/**
* Updates the account claim maps in the model
*/
@action
updateRow(field, rowData, property, { target: { value } }) {
rowData[property] = value;
this.args.model[field] = [...this.args.model[field]];
}
} }
@@ -1,5 +1,5 @@
/** /**
* Copyright (c) HashiCorp, Inc. * Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1 * SPDX-License-Identifier: BUSL-1.1
*/ */
@@ -173,6 +173,15 @@ export default class ScopesScopeAuthMethodsIndexController extends Controller {
item.value?.trim(), item.value?.trim(),
); );
} }
if (authMethod.certificates) {
authMethod.certificates = authMethod.certificates.filter((item) =>
item.value?.trim(),
);
}
if (authMethod.account_attribute_maps) {
authMethod.account_attribute_maps =
authMethod.account_attribute_maps.filter((item) => item.key?.trim());
}
await authMethod.save(); await authMethod.save();
if (this.abilities.can('read model', authMethod)) { if (this.abilities.can('read model', authMethod)) {
await this.router.transitionTo( await this.router.transitionTo(
@@ -354,11 +363,18 @@ export default class ScopesScopeAuthMethodsIndexController extends Controller {
} }
if (authMethod.certificates) { if (authMethod.certificates) {
authMethod.certificates = structuredClone(authMethod.certificates); authMethod.certificates = structuredClone(authMethod.certificates);
if (authMethod.certificates.length === 0) {
authMethod.certificates = [{ value: '' }];
}
} }
if (authMethod.account_attribute_maps) { if (authMethod.account_attribute_maps) {
authMethod.account_attribute_maps = structuredClone( authMethod.account_attribute_maps = structuredClone(
authMethod.account_attribute_maps, authMethod.account_attribute_maps,
); );
// Ensure at least one empty row exists for editing
if (authMethod.account_attribute_maps.length === 0) {
authMethod.account_attribute_maps = [{ key: '', value: '' }];
}
} }
} }
@@ -5,7 +5,10 @@
import Route from '@ember/routing/route'; import Route from '@ember/routing/route';
import { service } from '@ember/service'; import { service } from '@ember/service';
import { TYPE_AUTH_METHOD_OIDC } from 'api/models/auth-method'; import {
TYPE_AUTH_METHOD_OIDC,
TYPE_AUTH_METHOD_LDAP,
} from 'api/models/auth-method';
export default class ScopesScopeAuthMethodsNewRoute extends Route { export default class ScopesScopeAuthMethodsNewRoute extends Route {
// =services // =services
@@ -57,6 +60,11 @@ export default class ScopesScopeAuthMethodsNewRoute extends Route {
record.signing_algorithms = [{ value: '' }]; record.signing_algorithms = [{ value: '' }];
record.idp_ca_certs = [{ value: '' }]; record.idp_ca_certs = [{ value: '' }];
} }
// If the auth-method is of type LDAP, initialize the certificates field with an empty object.
if (params.type === TYPE_AUTH_METHOD_LDAP) {
record.certificates = [{ value: '' }];
record.account_attribute_maps = [{ key: '', value: '' }];
}
return record; return record;
} }
@@ -214,7 +214,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
selectors.FIELD_CERTIFICATES, selectors.FIELD_CERTIFICATES,
selectors.FIELD_CERTIFICATES_VALUE, selectors.FIELD_CERTIFICATES_VALUE,
); );
await click(selectors.FIELD_CERTIFICATES_ADD_BTN);
await fillIn( await fillIn(
selectors.FIELD_CLIENT_CERTIFICATE, selectors.FIELD_CLIENT_CERTIFICATE,
selectors.FIELD_CLIENT_CERTIFICATE_VALUE, selectors.FIELD_CLIENT_CERTIFICATE_VALUE,
@@ -247,7 +247,7 @@ module('Acceptance | auth-methods | create', function (hooks) {
selectors.FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO, selectors.FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO,
selectors.FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO_VALUE, selectors.FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO_VALUE,
); );
await click(selectors.FIELD_ACCOUNT_ATTRIBUTE_MAPS_ADD_BTN);
await fillIn(selectors.FIELD_GROUP_DN, selectors.FIELD_GROUP_DN_VALUE); await fillIn(selectors.FIELD_GROUP_DN, selectors.FIELD_GROUP_DN_VALUE);
await fillIn(selectors.FIELD_GROUP_ATTR, selectors.FIELD_GROUP_ATTR_VALUE); await fillIn(selectors.FIELD_GROUP_ATTR, selectors.FIELD_GROUP_ATTR_VALUE);
await fillIn( await fillIn(
@@ -10,7 +10,7 @@ export const FIELD_CLIENT_ID_VALUE = 'Client id value';
export const FIELD_CLIENT_SECRET = '[name=client_secret]'; export const FIELD_CLIENT_SECRET = '[name=client_secret]';
export const FIELD_CLIENT_SECRET_VALUE = 'Client secret value'; export const FIELD_CLIENT_SECRET_VALUE = 'Client secret value';
export const FIELD_SIGNING_ALGORITHMS = export const FIELD_SIGNING_ALGORITHMS =
'[name=signing_algorithms] [data-test-value-input]'; '[name=signing_algorithms] [data-test-value-select]';
export const FIELD_SIGNING_ALGORITHMS_VALUE = 'RS384'; export const FIELD_SIGNING_ALGORITHMS_VALUE = 'RS384';
export const FIELD_SIGNING_ALGORITHMS_ADD_BTN = export const FIELD_SIGNING_ALGORITHMS_ADD_BTN =
'[name=signing_algorithms] [data-test-add-button]'; '[name=signing_algorithms] [data-test-add-button]';
@@ -34,7 +34,7 @@ export const FIELD_ACCOUNT_CLAIM_MAPS_FROM_CLAIM =
'[name=account_claim_maps] [data-test-key-input]'; '[name=account_claim_maps] [data-test-key-input]';
export const FIELD_ACCOUNT_CLAIM_MAPS_FROM_CLAIM_VALUE = 'from_claim'; export const FIELD_ACCOUNT_CLAIM_MAPS_FROM_CLAIM_VALUE = 'from_claim';
export const FIELD_ACCOUNT_CLAIM_MAPS_TO_CLAIM = export const FIELD_ACCOUNT_CLAIM_MAPS_TO_CLAIM =
'[name=account_claim_maps] [data-test-value-input]'; '[name=account_claim_maps] [data-test-value-select]';
export const FIELD_ACCOUNT_CLAIM_MAPS_TO_CLAIM_VALUE = 'email'; export const FIELD_ACCOUNT_CLAIM_MAPS_TO_CLAIM_VALUE = 'email';
export const FIELD_ACCOUNT_CLAIM_MAPS_DELETE_BTN = export const FIELD_ACCOUNT_CLAIM_MAPS_DELETE_BTN =
'[name=account_claim_maps] [data-test-delete-button]'; '[name=account_claim_maps] [data-test-delete-button]';
@@ -54,11 +54,12 @@ export const FIELD_PROMPTS_SELECT_ACCOUNT = '[id=select_account]';
export const NEW_DROPDOWN = '[data-test-new-dropdown] button'; export const NEW_DROPDOWN = '[data-test-new-dropdown] button';
export const FIELD_URLS = '[name=urls]'; export const FIELD_URLS = '[name=urls]';
export const FIELD_URLS_VALUE = 'url1,url2'; export const FIELD_URLS_VALUE = 'url1,url2';
export const FIELD_CERTIFICATES = '[name=certificates] textarea'; export const FIELD_CERTIFICATES = '[name=certificates] [data-test-value-input]';
export const FIELD_CERTIFICATES_VALUE = 'certificate'; export const FIELD_CERTIFICATES_VALUE = 'certificate';
export const FIELD_CERTIFICATES_ADD_BTN = '[name=certificates] button'; export const FIELD_CERTIFICATES_ADD_BTN =
'[name=certificates] [data-test-add-button]';
export const FIELD_CERTIFICATES_DELETE_BTN = export const FIELD_CERTIFICATES_DELETE_BTN =
'[name="certificates"] button[aria-label=Remove]'; '[name="certificates"] [data-test-delete-button]';
export const FIELD_CLIENT_CERTIFICATE = '[name=client_certificate]'; export const FIELD_CLIENT_CERTIFICATE = '[name=client_certificate]';
export const FIELD_CLIENT_CERTIFICATE_VALUE = 'Client certificate value'; export const FIELD_CLIENT_CERTIFICATE_VALUE = 'Client certificate value';
export const FIELD_CLIENT_CERTIFICATE_KEY = '[name=client_certificate_key]'; export const FIELD_CLIENT_CERTIFICATE_KEY = '[name=client_certificate_key]';
@@ -81,15 +82,15 @@ export const FIELD_USER_ATTR_VALUE = 'User attribute value';
export const FIELD_USER_FILTER = '[name=user_filter]'; export const FIELD_USER_FILTER = '[name=user_filter]';
export const FIELD_USER_FILTER_VALUE = 'User filter value'; export const FIELD_USER_FILTER_VALUE = 'User filter value';
export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_FROM = export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_FROM =
'[name=account_attribute_maps] input'; '[name=account_attribute_maps] [data-test-key-input]';
export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_FROM_VALUE = 'attribute'; export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_FROM_VALUE = 'attribute';
export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO = export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO =
'[name=account_attribute_maps] select'; '[name=account_attribute_maps] [data-test-value-select]';
export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO_VALUE = 'email'; export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_TO_VALUE = 'email';
export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_ADD_BTN = export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_ADD_BTN =
'[name=account_attribute_maps] button'; '[name=account_attribute_maps] [data-test-add-button]';
export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_DELETE_BTN = export const FIELD_ACCOUNT_ATTRIBUTE_MAPS_DELETE_BTN =
'[name=account_attribute_maps] button[aria-label=Remove]'; '[name=account_attribute_maps] [data-test-delete-button]';
export const FIELD_GROUP_DN = '[name=group_dn]'; export const FIELD_GROUP_DN = '[name=group_dn]';
export const FIELD_GROUP_DN_VALUE = 'Group dn value'; export const FIELD_GROUP_DN_VALUE = 'Group dn value';
export const FIELD_GROUP_ATTR = '[name=group_attr]'; export const FIELD_GROUP_ATTR = '[name=group_attr]';
@@ -267,8 +267,6 @@ module('Acceptance | auth-methods | update', function (hooks) {
selectors.FIELD_CERTIFICATES, selectors.FIELD_CERTIFICATES,
selectors.FIELD_CERTIFICATES_VALUE, selectors.FIELD_CERTIFICATES_VALUE,
); );
await click(selectors.FIELD_CERTIFICATES_ADD_BTN);
await click(selectors.FIELD_START_TLS); await click(selectors.FIELD_START_TLS);
await click(selectors.FIELD_INSECURE_TLS); await click(selectors.FIELD_INSECURE_TLS);
await fillIn(selectors.FIELD_BIND_DN, selectors.FIELD_BIND_DN_VALUE); await fillIn(selectors.FIELD_BIND_DN, selectors.FIELD_BIND_DN_VALUE);
@@ -1,5 +1,5 @@
/** /**
* Copyright (c) HashiCorp, Inc. * Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1 * SPDX-License-Identifier: BUSL-1.1
*/ */