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

51 lines
1.6 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<Hds::Modal
@onClose={{fn (mut @showMessagePreviewModal) false}}
id="message-alert-preview"
class="is-calc-large-height two-thirds-width"
data-test-modal="preview image"
as |M|
>
<M.Body class="is-paddingless is-overflow-hidden">
<Hds::Alert
@type="page"
@color="highlight"
@onDismiss={{fn (mut @showMessagePreviewModal) false}}
class="has-bottom-margin-s"
data-test-custom-alert={{@message.title}}
as |A|
>
<A.Title data-test-custom-alert-title={{@message.title}}>{{@message.title}}</A.Title>
{{#each (new-line-split @message.message) as |msg|}}
<A.Description data-test-custom-alert-description={{@message.title}}>
{{msg}}
</A.Description>
{{/each}}
{{#unless (is-empty-value @message.link)}}
{{#each-in @message.link as |title href|}}
<A.LinkStandalone
@color="secondary"
@icon="external-link"
@isHrefExternal={{true}}
@iconPosition="trailing"
@text={{title}}
@href={{href}}
data-test-custom-alert-action="link"
/>
{{/each-in}}
{{/unless}}
</Hds::Alert>
<img
src={{img-path (if @message.authenticated "~/custom-messages-dashboard.png" "~/custom-messages-login.png")}}
alt={{if @message.authenticated "dashboard page preview" "login page preview"}}
/>
</M.Body>
<M.Footer as |F|>
<Hds::Button @text="Close preview" {{on "click" F.close}} data-test-button="Close preview" />
</M.Footer>
</Hds::Modal>