Angel Garbarino a51c5ed362
Clean up button test selectors (#30694)
* clean up selectors file and then update testButton to buttonByAttr

* a lot but not really in the scheme of things

* fix component test failures

* fix acceptance test failures

* fix namespace selector

* clean up remaining tests

* another test

* last test

* small changes, but I have test failures

* a mess in custom messages, really hard to test because of test pollution.

* make data-test-submit vs data-test-save

* change other-methods to sign in with other methods

* clean up of failing test

* buttonByAttr to button

* clean up test pollution on config messages

* sweep of clean ups

* another round of small cleanups

* fix some message things, remaining oidc issue?

* use a runCmd to better delete things

* fix to amend for recent auth test changes

* remove skip
2025-06-10 16:25:34 -04:00

45 lines
1.8 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<form {{on "submit" (perform this.saveModel)}}>
<div class="box is-sideless is-fullwidth is-marginless">
<MessageError @model={{@model}} @errorMessage={{this.errorMessage}} />
<NamespaceReminder @mode="save" @noun="Auth Method" />
{{#each @model.tuneAttrs as |attr|}}
{{#if (not (includes attr.name @model.userLockoutConfig.modelAttrs))}}
<FormField data-test-field @attr={{attr}} @model={{@model}} />
{{#if (and (eq attr.name "config.listingVisibility") @model.directLoginLink)}}
<div class="has-top-margin-negative-s has-bottom-margin-l is-flex-center">
<Hds::Text::Body @tag="p" @color="faint">UI login link:</Hds::Text::Body>
<Hds::Copy::Snippet @textToCopy={{@model.directLoginLink}} />
</div>
{{/if}}
{{/if}}
{{/each}}
{{#if @model.supportsUserLockoutConfig}}
<hr class="has-top-margin-xl has-bottom-margin-l has-background-gray-200" />
<Hds::Text::Display @tag="h2" @size="400" @weight="bold" data-test-user-lockout-section>User lockout configuration</Hds::Text::Display>
<Hds::Text::Body @tag="p" @size="100" @color="faint" class="has-bottom-margin-m">
Specifies the user lockout settings for this auth mount.
</Hds::Text::Body>
{{#each @model.tuneAttrs as |attr|}}
{{#if (includes attr.name @model.userLockoutConfig.modelAttrs)}}
<FormField @attr={{attr}} @model={{@model}} />
{{/if}}
{{/each}}
{{/if}}
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">
<Hds::Button
@text="Update options"
@icon={{if this.saveModel.isRunning "loading"}}
type="submit"
disabled={{this.saveModel.isRunning}}
data-test-submit
/>
</div>
</form>