\ No newline at end of file
diff --git a/ui/lib/core/addon/components/confirmation-modal.hbs b/ui/lib/core/addon/components/confirmation-modal.hbs
index 2a32d91843..6f1eb4ea7d 100644
--- a/ui/lib/core/addon/components/confirmation-modal.hbs
+++ b/ui/lib/core/addon/components/confirmation-modal.hbs
@@ -3,40 +3,45 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
-
- {{yield}}
-
-
- Confirm
-
-
Type
- {{this.confirmText}}
- to confirm
- {{this.toConfirmMsg}}
-
-
-
-
-
\ No newline at end of file
+{{#if @isActive}}
+
+
+ {{@title}}
+
+
+ {{yield}}
+
+
+ Confirm
+
+
Type
+ {{this.confirmText}}
+ to confirm
+ {{@toConfirmMsg}}
+
+
+
+
+
+
+
+
+
+
+
+{{/if}}
\ No newline at end of file
diff --git a/ui/lib/core/addon/components/confirmation-modal.js b/ui/lib/core/addon/components/confirmation-modal.js
index 3e24fc928a..06878dfefd 100644
--- a/ui/lib/core/addon/components/confirmation-modal.js
+++ b/ui/lib/core/addon/components/confirmation-modal.js
@@ -2,11 +2,11 @@
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
-
import Component from '@glimmer/component';
/**
* @module ConfirmationModal
- * ConfirmationModal components are used to provide an alternative to ConfirmationButton that automatically prompts the user to fill in confirmation text before they can continue with a potentially destructive action. It is built off the Modal component
+ * ConfirmationModal components wrap the component to present a critical (red) type-to-confirm modal.
+ * They are used for extremely destructive actions that require extra consideration before confirming.
*
* @example
* ```js
@@ -15,6 +15,7 @@ import Component from '@glimmer/component';
* @title="Do Dangerous Thing?"
* @isActive={{isModalActive}}
* @onClose={{action (mut isModalActive) false}}
+ * @confirmText="yes"
* @onConfirmMsg="deleting this thing to delete."
* />
* ```
@@ -23,30 +24,12 @@ import Component from '@glimmer/component';
* @param {boolean} isActive - Controls whether the modal is "active" eg. visible or not.
* @param {string} title - Title of the modal
* @param {string} [confirmText=Yes] - The confirmation text that the user must type before continuing
- * @param {string} [toConfirmMsg=''] - Finishes the sentence "Type to confirm ", default is an empty string (ex. 'secret deletion')
+ * @param {string} [toConfirmMsg] - Finishes the sentence "Type to confirm ", default is an empty string (ex. 'secret deletion')
* @param {string} [buttonText=Confirm] - Button text on the confirm button
- * @param {string} [buttonClass=is-danger] - extra class to add to confirm button (eg. "is-danger")
- * @param {string} [type=warning] - The header styling based on type, passed into the message-types helper (in the Modal component).
*/
export default class ConfirmationModal extends Component {
- get buttonClass() {
- return this.args.buttonClass || 'is-danger';
- }
-
- get buttonText() {
- return this.args.buttonText || 'Confirm';
- }
-
get confirmText() {
return this.args.confirmText || 'Yes';
}
-
- get type() {
- return this.args.type || 'warning';
- }
-
- get toConfirmMsg() {
- return this.args.toConfirmMsg || '';
- }
}
diff --git a/ui/lib/core/addon/components/download-button.hbs b/ui/lib/core/addon/components/download-button.hbs
index 266c6af36d..52514b0262 100644
--- a/ui/lib/core/addon/components/download-button.hbs
+++ b/ui/lib/core/addon/components/download-button.hbs
@@ -3,6 +3,13 @@
SPDX-License-Identifier: BUSL-1.1
~}}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ui/lib/core/addon/components/download-button.js b/ui/lib/core/addon/components/download-button.js
index cbfb763ff0..bacd108c6d 100644
--- a/ui/lib/core/addon/components/download-button.js
+++ b/ui/lib/core/addon/components/download-button.js
@@ -12,22 +12,20 @@ import { tracked } from '@glimmer/tracking';
import { assert } from '@ember/debug';
/**
* @module DownloadButton
- * DownloadButton components are an action button used to download data. Both the action text and icon are yielded.
+ * DownloadButton wraps an to perform a download action.
* * NOTE: when using in an engine, remember to add the 'download' service to its dependencies (in /engine.js) and map to it in /app.js
* [ember-docs](https://ember-engines.com/docs/services)
* @example
* ```js
*
- *
- * Download
- *
+ * />
* ```
* @param {string} [filename] - name of file that prefixes the ISO timestamp generated at download
* @param {string} [data] - data to download
@@ -35,6 +33,12 @@ import { assert } from '@ember/debug';
* @param {string} [extension='txt'] - file extension, the download service uses this to determine the mimetype
* @param {boolean} [stringify=false] - argument to stringify the data before passing to the File constructor
* @param {callback} [onSuccess] - callback from parent to invoke if download is successful
+ * @param {boolean} [hideIcon=false] - renders the 'download' icon by default, pass true to hide (ex: when download button appears in a dropdown)
+ * * HDS ARGS https://helios.hashicorp.design/components/button?tab=code
+ * @param {string} [text="Download"] - button text, defaults to 'Download'
+ * @param {string} [color] - HDS default is primary, but there are four color options: primary, secondary, tertiary, and critical.
+ * @param {string} [iconPosition="leading"] - icon position, 'leading' (HDS default) or 'trailing'
+ * @param {boolean} [isIconOnly] - button only renders an icon, no text
*/
export default class DownloadButton extends Component {
diff --git a/ui/lib/core/addon/components/info-table-row.hbs b/ui/lib/core/addon/components/info-table-row.hbs
index 54a603a736..4a7d7c95b9 100644
--- a/ui/lib/core/addon/components/info-table-row.hbs
+++ b/ui/lib/core/addon/components/info-table-row.hbs
@@ -40,7 +40,7 @@
@text="Copy"
@isIconOnly={{true}}
@textToCopy={{@value}}
- class="transparent icon-only is-paddingless"
+ class="transparent has-padding-xxs"
data-test-copy-button
/>
{{/if}}
diff --git a/ui/lib/core/addon/components/masked-input.hbs b/ui/lib/core/addon/components/masked-input.hbs
index 3c606b8a96..e6a0eedbe9 100644
--- a/ui/lib/core/addon/components/masked-input.hbs
+++ b/ui/lib/core/addon/components/masked-input.hbs
@@ -39,14 +39,20 @@
@text="Copy"
@isIconOnly={{true}}
@textToCopy={{@value}}
- class="transparent icon-only is-paddingless"
+ class="transparent has-padding-xxs"
data-test-copy-button
/>
{{/if}}
{{#if @allowDownload}}
-
+
{{/if}}
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/core/addon/components/modal.hbs b/ui/lib/core/addon/components/modal.hbs
deleted file mode 100644
index 8309e21f35..0000000000
--- a/ui/lib/core/addon/components/modal.hbs
+++ /dev/null
@@ -1,37 +0,0 @@
-{{!
- Copyright (c) HashiCorp, Inc.
- SPDX-License-Identifier: BUSL-1.1
-~}}
-
-
-
-
\ No newline at end of file
diff --git a/ui/lib/core/addon/components/modal.js b/ui/lib/core/addon/components/modal.js
deleted file mode 100644
index 04a403a75a..0000000000
--- a/ui/lib/core/addon/components/modal.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) HashiCorp, Inc.
- * SPDX-License-Identifier: BUSL-1.1
- */
-
-import Component from '@glimmer/component';
-import { messageTypes } from 'core/helpers/message-types';
-/**
- * @module Modal
- * Modal components are used to overlay content on top of the page. Has a darkened background,
- * a title, and in order to close it you must pass an onClose function.
- *
- * @example
- * ```js
- *
- * Whatever content pops up when the modal isActive!
- *
- * ```
- * @callback onClose
- * @param {onClose} onClose - onClose is the action taken when someone clicks the modal background or close button (if shown).
- * @param {boolean} isActive=false - whether or not modal displays
- * @param {string} [title] - This text shows up in the header section of the modal. Only the first word should be capitalized.
- * @param {boolean} [showCloseButton=false] - controls whether the close button in the top right corner shows.
- * @param {string} [type=null] - The header styling based on type passed into the message-types helper.
- */
-
-export default class ModalComponent extends Component {
- get isActive() {
- return this.args.isActive || false;
- }
-
- get showCloseButton() {
- return this.args.showCloseButton || false;
- }
-
- get glyph() {
- if (!this.args.type) {
- return null;
- }
- return messageTypes([this.args.type]);
- }
-
- get modalClass() {
- if (!this.args.type) {
- return 'modal';
- }
- return 'modal ' + messageTypes([this.args.type]).class;
- }
-}
diff --git a/ui/lib/core/addon/components/policy-example.hbs b/ui/lib/core/addon/components/policy-example.hbs
index 89e5fed214..638089f752 100644
--- a/ui/lib/core/addon/components/policy-example.hbs
+++ b/ui/lib/core/addon/components/policy-example.hbs
@@ -42,7 +42,14 @@
{{/if}}
-
+
More information about
diff --git a/ui/lib/core/addon/components/policy-example.js b/ui/lib/core/addon/components/policy-example.js
index c4f324c196..0c6fdc3ecb 100644
--- a/ui/lib/core/addon/components/policy-example.js
+++ b/ui/lib/core/addon/components/policy-example.js
@@ -14,28 +14,11 @@ import Component from '@glimmer/component';
* @example
*
- *
- * @example (in modal)
- *
- *
- * {{! code-mirror modifier does not render value initially until focus event fires }}
- * {{! wait until the Modal is rendered and then show the PolicyExample (contains JsonEditor) }}
- * {{#if this.showTemplateModal}}
- *
- * {{/if}}
- *
- *
- *
- *
- *
* ```
* @param {string} policyType - policy type to decide which template to render; can either be "acl" or "rgp"
+ * @param {string} container - selector for the container the example renders inside, passed to the copy button in JsonEditor
*/
export default class PolicyExampleComponent extends Component {
diff --git a/ui/lib/core/addon/components/search-select-with-modal.hbs b/ui/lib/core/addon/components/search-select-with-modal.hbs
index e3fe952a6d..f42fb258d1 100644
--- a/ui/lib/core/addon/components/search-select-with-modal.hbs
+++ b/ui/lib/core/addon/components/search-select-with-modal.hbs
@@ -83,32 +83,24 @@
{{/each}}
-
{{/if}}
- {{! wait until user has selected 'create a new item' before rendering modal}}
- {{#if this.nameInput}}
-
-
+ {{#if this.showModal}}
+
+
+ Create new
+ {{singularize @id}}
+
+
{{#if @modalSubtext}}
{{@modalSubtext}}
{{/if}}
- {{#if (has-block)}}
- {{yield}}
- {{else}}
- {{! dynamically render template from modal-form/ folder}}
- {{! form must receive an @onSave and @onCancel arg that executes the callback}}
- {{component @modalFormTemplate nameInput=this.nameInput onSave=this.resetModal onCancel=this.resetModal}}
- {{/if}}
-
-
+ {{! dynamically render template from modal-form/ folder}}
+ {{! form must receive an @onSave and @onCancel arg that executes the callback}}
+ {{component @modalFormTemplate nameInput=this.nameInput onSave=this.resetModal onCancel=this.resetModal}}
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/core/addon/components/search-select.hbs b/ui/lib/core/addon/components/search-select.hbs
index 9859aa0e7a..de8799c354 100644
--- a/ui/lib/core/addon/components/search-select.hbs
+++ b/ui/lib/core/addon/components/search-select.hbs
@@ -43,6 +43,7 @@
@options={{this.dropdownOptions}}
@onChange={{this.selectOrCreate}}
@placeholderComponent={{component "search-select-placeholder"}}
+ @renderInPlace={{@renderInPlace}}
@verticalPosition="below"
@disabled={{@disabled}}
as |option|
diff --git a/ui/lib/core/addon/components/search-select.js b/ui/lib/core/addon/components/search-select.js
index 5371475c16..0ce39dc541 100644
--- a/ui/lib/core/addon/components/search-select.js
+++ b/ui/lib/core/addon/components/search-select.js
@@ -53,6 +53,7 @@ import { filterOptions, defaultMatcher } from 'ember-power-select/utils/group-ut
* @param {string} [wildcardLabel] - string (singular) for rendering label tag beside a wildcard selection (i.e. 'role*'), for the number of items it includes, e.g. @wildcardLabel="role" -> "includes 4 roles"
* @param {string} [placeholder] - text you wish to replace the default "search" with
* @param {boolean} [displayInherit=false] - if you need the search select component to display inherit instead of box.
+ * @param {boolean} [renderInPlace] - pass `true` when power select renders in a modal
* @param {function} [renderInfoTooltip] - receives each inputValue string and list of dropdownOptions as args, so parent can determine when to render a tooltip beside a selectedOption and the tooltip text. see 'oidc/provider-form.js'
* @param {boolean} [disabled] - if true sets the disabled property on the ember-power-select component and makes it unusable.
*
diff --git a/ui/lib/core/addon/components/shamir/dr-token-flow.hbs b/ui/lib/core/addon/components/shamir/dr-token-flow.hbs
index e5bf2b8faa..9365cd78d7 100644
--- a/ui/lib/core/addon/components/shamir/dr-token-flow.hbs
+++ b/ui/lib/core/addon/components/shamir/dr-token-flow.hbs
@@ -2,130 +2,131 @@
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
-
-
- {{#if this.encodedToken}}
-
- Below is the process and the values necessary to generate your operation token. Read the instructions carefully!
-
-
-
-
- Encoded operation token
-
-
- This is a one-time token that will be used to generate the operation token. Please save it.
-
-
-
- {{#if this.otp}}
-
-
- One time password (OTP)
-
-
- This OTP will be used to decode the generated operation token. Please save it.
-
-
-
- {{/if}}
-
-
- DR operation token command
-
-
- {{#if this.otp}}
- This command contains both the encoded token and the OTP. It should be executed on the secondary cluster in order
- to generate the operation token.
- {{else}}
- This command requires the OTP saved earlier. It should be executed on the secondary cluster in order to generate
- the operation token.
- {{/if}}
-
Generate an operation token by entering a portion of the
- primary's root key. Once all portions are entered, the generated token may be used to manage your
- secondary Disaster Recovery cluster.
+{{! THIS COMPONENT RENDERS INSIDE A MODAL (must pass @container to copy buttons) }}
+{{#if this.encodedToken}}
+
+ Below is the process and the values necessary to generate your operation token. Read the instructions carefully!
+
+
+
+
+ Encoded operation token
+
+
+ This is a one-time token that will be used to generate the operation token. Please save it.
-
- {{else if this.generateWithPGP}}
-
- {{else}}
- {{! Generate token flow not started }}
-
+{{/if}}
+
+
+
\ No newline at end of file
diff --git a/ui/lib/core/addon/components/shamir/form.hbs b/ui/lib/core/addon/components/shamir/form.hbs
index e79020da83..ec22c94407 100644
--- a/ui/lib/core/addon/components/shamir/form.hbs
+++ b/ui/lib/core/addon/components/shamir/form.hbs
@@ -21,7 +21,7 @@
-
- {{#if this.isModalActive}}
- {{! Wrapped in if statement so the Shamir constructor fires on modal open }}
-
+{{#if this.isModalActive}}
+
+
+ Generate operation token
+
+
+
+
{{! Section & Footer is in child component since the form must do side effects on cancel }}
- {{/if}}
-
\ No newline at end of file
+
+{{/if}}
\ No newline at end of file
diff --git a/ui/lib/core/addon/templates/components/replication-action-promote.hbs b/ui/lib/core/addon/templates/components/replication-action-promote.hbs
index 3ab7628e6d..004f8c78de 100644
--- a/ui/lib/core/addon/templates/components/replication-action-promote.hbs
+++ b/ui/lib/core/addon/templates/components/replication-action-promote.hbs
@@ -20,107 +20,106 @@
type="button"
class="button is-tertiary"
onclick={{action (mut this.isModalActive) true}}
- data-test-replication-action-trigger
+ data-test-replication-action-trigger="promote"
>
Promote
-
-
- {{#if (eq this.replicationMode "dr")}}
-
- To promote this DR Replication Secondary to a primary, enter the DR Operation token.
-
- {{/if}}
-
- Vault Replication is not designed for active-active usage. Enabling two primaries should never be done, as it can lead
- to data loss if they or their secondaries are ever reconnected. If the cluster has a primary, be sure to demote it
- before promoting a secondary.
-
- If replication is in an adverse state, we can begin recovery. This will attempt to recover to continue syncing.
-
-
-
-
\ No newline at end of file
+{{#if this.isModalActive}}
+
+
+ Begin recovery?
+
+
+
+ If replication is in an adverse state, we can begin recovery. This will attempt to recover to continue syncing.
+
+
+
+
+
+
+
+
+
+{{/if}}
\ No newline at end of file
diff --git a/ui/lib/core/addon/templates/components/replication-action-reindex.hbs b/ui/lib/core/addon/templates/components/replication-action-reindex.hbs
index c4d9a1149f..ae97d8c282 100644
--- a/ui/lib/core/addon/templates/components/replication-action-reindex.hbs
+++ b/ui/lib/core/addon/templates/components/replication-action-reindex.hbs
@@ -17,41 +17,33 @@
type="button"
class="button is-secondary"
onclick={{action (mut this.isModalActive) true}}
- data-test-replication-action-trigger
+ data-test-replication-action-trigger="reindex"
>
Reindex
-
-
-
- Reindexing can cause a very long delay depending on the number and size of objects in the data store.
- {{if this.model.replicationAttrs.isPrimary "You should always re-index your secondary first."}}
-
-
- Progress will be shown, and you will
- {{if this.model.replicationAttrs.isPrimary "not"}}
- be able to use Vault during this time.
-
-
-
-
\ No newline at end of file
+{{#if this.isModalActive}}
+
+
+ Begin reindex?
+
+
+
+ Reindexing can cause a very long delay depending on the number and size of objects in the data store.
+ {{if this.model.replicationAttrs.isPrimary "You should always re-index your secondary first."}}
+
+
+ Progress will be shown, and you will
+ {{if this.model.replicationAttrs.isPrimary "not"}}
+ be able to use Vault during this time.
+
+
+
+
+
+
+
+
+
+{{/if}}
\ No newline at end of file
diff --git a/ui/lib/core/addon/templates/components/replication-action-update-primary.hbs b/ui/lib/core/addon/templates/components/replication-action-update-primary.hbs
index eb096b1c08..6924e8681a 100644
--- a/ui/lib/core/addon/templates/components/replication-action-update-primary.hbs
+++ b/ui/lib/core/addon/templates/components/replication-action-update-primary.hbs
@@ -18,117 +18,111 @@
type="button"
class="button is-secondary"
onclick={{action (mut this.isModalActive) true}}
- data-test-update-primary-action-trigger
+ data-test-replication-action-trigger="update-primary"
>
Update
-
-
-
- Use a secondary activation token to change this secondary’s assigned primary. This does not wipe all data in the
- cluster.
-
Making changes to your configuration may affect how Vault will reach the Kubernetes API and authenticate with it. Are
you sure?
-
-
-
+
+
+
+
+
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/kv/addon/components/kv-delete-modal.hbs b/ui/lib/kv/addon/components/kv-delete-modal.hbs
index 3d0bef0a9e..9fee452682 100644
--- a/ui/lib/kv/addon/components/kv-delete-modal.hbs
+++ b/ui/lib/kv/addon/components/kv-delete-modal.hbs
@@ -1,16 +1,23 @@
-
+
+
{{#if this.modalOpen}}
-
-
+
+ {{this.modalDisplay.title}}
+
+
{{this.modalDisplay.intro}}
@@ -45,19 +52,19 @@
{{/each}}
{{/if}}
-
-
-
+
+
+
+
+
+
+
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/kv/addon/components/kv-delete-modal.js b/ui/lib/kv/addon/components/kv-delete-modal.js
index 75dd4168e0..3bc0ccae57 100644
--- a/ui/lib/kv/addon/components/kv-delete-modal.js
+++ b/ui/lib/kv/addon/components/kv-delete-modal.js
@@ -21,6 +21,7 @@ import { assert } from '@ember/debug';
* @param {string} mode - delete, delete-metadata, or destroy.
* @param {object} secret - The kv/data model.
* @param {object} [metadata] - The kv/metadata model. It is only required when mode is "delete" or "metadata-delete".
+ * @param {string} [text] - Button text that renders in KV v2 toolbar, defaults to capitalize @mode
* @param {callback} onDelete - callback function fired to handle delete event.
*/
@@ -34,20 +35,20 @@ export default class KvDeleteModal extends Component {
case 'delete':
return {
title: 'Delete version?',
- type: 'warning',
+ color: 'warning',
intro:
'There are two ways to delete a version of a secret. Both delete actions can be undeleted later. How would you like to proceed?',
};
case 'destroy':
return {
title: 'Destroy version?',
- type: 'danger',
+ color: 'critical',
intro: `This action will permanently destroy Version ${this.args.version} of the secret, and the secret data cannot be read or recovered later.`,
};
case 'delete-metadata':
return {
title: 'Delete metadata and secret data?',
- type: 'danger',
+ color: 'critical',
intro:
'This will permanently delete the metadata and versions of the secret. All version history will be removed. This cannot be undone.',
};
diff --git a/ui/lib/kv/addon/components/page/secret/details.hbs b/ui/lib/kv/addon/components/page/secret/details.hbs
index 82dd6b656f..5974f1072a 100644
--- a/ui/lib/kv/addon/components/page/secret/details.hbs
+++ b/ui/lib/kv/addon/components/page/secret/details.hbs
@@ -34,14 +34,10 @@
@metadata={{@metadata}}
@onDelete={{this.handleDestruction}}
@version={{this.version}}
- >
- Delete
-
+ />
{{/if}}
{{#if this.showDestroy}}
-
- Destroy
-
+
{{/if}}
{{#if (or @secret.canReadData @secret.canReadMetadata @secret.canEditData)}}
diff --git a/ui/lib/kv/addon/components/page/secret/metadata/details.hbs b/ui/lib/kv/addon/components/page/secret/metadata/details.hbs
index 94ae9a693e..ee6dc72114 100644
--- a/ui/lib/kv/addon/components/page/secret/metadata/details.hbs
+++ b/ui/lib/kv/addon/components/page/secret/metadata/details.hbs
@@ -10,9 +10,12 @@
<:toolbarActions>
{{#if @secret.canDeleteMetadata}}
-
- Permanently delete
-
+
{{/if}}
{{#if @secret.canUpdateMetadata}}
Edit metadata
diff --git a/ui/lib/ldap/addon/components/accounts-checked-out.hbs b/ui/lib/ldap/addon/components/accounts-checked-out.hbs
index a9b50eb055..aa1eb89e68 100644
--- a/ui/lib/ldap/addon/components/accounts-checked-out.hbs
+++ b/ui/lib/ldap/addon/components/accounts-checked-out.hbs
@@ -39,37 +39,35 @@
{{#if this.selectedStatus}}
-
-
+
+
+ Account Check-in
+
+
This action will check-in account
{{this.selectedStatus.account}}
back to the library. Do you want to proceed?
-
-
-
+
+
+
+
+
+
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/ldap/addon/components/page/configure.hbs b/ui/lib/ldap/addon/components/page/configure.hbs
index 088c69b440..4e1db67531 100644
--- a/ui/lib/ldap/addon/components/page/configure.hbs
+++ b/ui/lib/ldap/addon/components/page/configure.hbs
@@ -78,14 +78,11 @@
{{#if this.showRotatePrompt}}
-
-
+
+
+ Rotate your root password?
+
+
It’s best practice to rotate the administrator (root) password immediately after the initial configuration of the
LDAP engine. The rotation will update the password both in Vault and your directory server. Once rotated,
@@ -95,19 +92,17 @@
Would you like to rotate your new credentials? You can also do this later.
-
-
-
+
+
+
+
+
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/ldap/addon/components/page/library/details/accounts.hbs b/ui/lib/ldap/addon/components/page/library/details/accounts.hbs
index bf5366d29e..b3e54616da 100644
--- a/ui/lib/ldap/addon/components/page/library/details/accounts.hbs
+++ b/ui/lib/ldap/addon/components/page/library/details/accounts.hbs
@@ -54,32 +54,23 @@
{{#if this.showCheckOutPrompt}}
-
-
+
+
+ Account Check-out
+
+
Current generated credential’s time-to-live is set at
{{format-duration @library.ttl}}. You can set a different limit if you’d like:
-
-
-
+
+
+
+
+
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/pki/addon/components/page/pki-configuration-details.hbs b/ui/lib/pki/addon/components/page/pki-configuration-details.hbs
index 60ea1118a6..11485d3631 100644
--- a/ui/lib/pki/addon/components/page/pki-configuration-details.hbs
+++ b/ui/lib/pki/addon/components/page/pki-configuration-details.hbs
@@ -111,19 +111,18 @@
{{#if this.showDeleteAllIssuers}}
-
+
This endpoint deletes
all
issuers and keys within the mount. It is highly recommended to use the individual delete operations instead. This mount
will be unusable until new issuers and keys are provisioned.
-
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/pki/addon/components/page/pki-issuer-details.hbs b/ui/lib/pki/addon/components/page/pki-issuer-details.hbs
index f30a83e87a..4d1bf91ce4 100644
--- a/ui/lib/pki/addon/components/page/pki-issuer-details.hbs
+++ b/ui/lib/pki/addon/components/page/pki-issuer-details.hbs
@@ -48,9 +48,9 @@
@data={{@pem}}
@extension="pem"
data-test-issuer-download-type="pem"
- >
- PEM format
-
+ @text="PEM format"
+ @hideIcon={{true}}
+ />
{{/if}}
{{#if @der}}
@@ -62,9 +62,9 @@
@data={{@der}}
@extension="der"
data-test-issuer-download-type="der"
- >
- DER format
-
+ @text="DER format"
+ @hideIcon={{true}}
+ />
{{/if}}
@@ -148,45 +148,37 @@
{{/if}}
{{! ROOT ROTATION MODAL }}
-
-
-
Root rotation
-
- Root rotation is an impactful process. Please be ready to ensure that the new root is properly distributed to
- end-users’ trust stores. You can also do this manually by
-
- following our documentation.
-
-
-
How root rotation will work
-
-
-
The new root will be generated using defaults from the old one that you can customize.
-
You will identify intermediates, which Vault will then cross-sign.
-
- Then, you can begin re-issuing leaf certs and phase out the old root.
-
-
-
-
-
-
-
\ No newline at end of file
+{{#if this.showRotationModal}}
+
+
+ Rotate this root
+
+
+
Root rotation
+
+ Root rotation is an impactful process. Please be ready to ensure that the new root is properly distributed to
+ end-users’ trust stores. You can also do this manually by
+
+ following our documentation.
+
+
+
How root rotation will work
+
+
+
The new root will be generated using defaults from the old one that you can customize.
+
You will identify intermediates, which Vault will then cross-sign.
+
+ Then, you can begin re-issuing leaf certs and phase out the old root.
+
+
+
+
+
+
+
+
+
+
+
+
+{{/if}}
\ No newline at end of file
diff --git a/ui/lib/pki/addon/components/page/pki-issuer-rotate-root.hbs b/ui/lib/pki/addon/components/page/pki-issuer-rotate-root.hbs
index da11d64c4d..238b1637f8 100644
--- a/ui/lib/pki/addon/components/page/pki-issuer-rotate-root.hbs
+++ b/ui/lib/pki/addon/components/page/pki-issuer-rotate-root.hbs
@@ -53,9 +53,9 @@
@extension="pem"
@fetchData={{fn this.fetchDataForDownload "pem"}}
data-test-issuer-download-type="pem"
- >
- PEM format
-
+ @text="PEM format"
+ @hideIcon={{true}}
+ />
- DER format
-
+ @text="DER format"
+ @hideIcon={{true}}
+ />
diff --git a/ui/lib/pki/addon/components/page/pki-key-details.hbs b/ui/lib/pki/addon/components/page/pki-key-details.hbs
index e2d94e9aa6..80b13c26b9 100644
--- a/ui/lib/pki/addon/components/page/pki-key-details.hbs
+++ b/ui/lib/pki/addon/components/page/pki-key-details.hbs
@@ -19,14 +19,13 @@
{{/if}}
{{#if @key.privateKey}}
- Download private key
-
-
+ @text="Download private key"
+ />
{{/if}}
{{#if @canEdit}}
diff --git a/ui/lib/pki/addon/components/page/pki-key-list.hbs b/ui/lib/pki/addon/components/page/pki-key-list.hbs
index a650a2025a..3dbdcb8d40 100644
--- a/ui/lib/pki/addon/components/page/pki-key-list.hbs
+++ b/ui/lib/pki/addon/components/page/pki-key-list.hbs
@@ -6,7 +6,7 @@
<:actions>
{{#if @canImportKey}}
-
+
Import
{{/if}}
diff --git a/ui/lib/pki/addon/components/page/pki-tidy-status.hbs b/ui/lib/pki/addon/components/page/pki-tidy-status.hbs
index 3bf43cace6..c4b599a412 100644
--- a/ui/lib/pki/addon/components/page/pki-tidy-status.hbs
+++ b/ui/lib/pki/addon/components/page/pki-tidy-status.hbs
@@ -14,15 +14,15 @@
Perform manual tidy
{{else}}
-
+ @text="Tidy"
+ />
{{/if}}
@@ -101,104 +101,75 @@
@title="Tidy status unavailable"
@message="After the next tidy operation has been performed, information about the current or most recent tidy operation will display here."
>
-
+ @text="Tidy"
+ />
{{/if}}
{{! TIDY OPTIONS MODAL }}
-
-
-
How tidying will work
-
- Tidying cleans up the storage backend and/or CRL by removing certificates that have expired and are past a certain
- buffer period beyond their expiration time.
-
- Documentation.
-
-
-
-
-
Select a tidy operation:
-
-
Automatic tidy
- periodically runs a tidy operation with saved configuration settings after waiting the specified interval
- duration between tidies
-
-
Manual tidy runs a tidy operation once
-
-
Configure the parameters that determine how to tidy and run the operation.
-
-
-
-
-
-
-
-
+{{#if this.tidyOptionsModal}}
+
+
+ Tidy this mount
+
+
+
How tidying will work
+
+ Tidying cleans up the storage backend and/or CRL by removing certificates that have expired and are past a certain
+ buffer period beyond their expiration time.
+
+ Documentation.
+
+
+
+
+
Select a tidy operation:
+
+
Automatic tidy
+ periodically runs a tidy operation with saved configuration settings after waiting the specified interval
+ duration between tidies
+
+
Manual tidy runs a tidy operation once
+
+
Configure the parameters that determine how to tidy and run the operation.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{/if}}
{{! CANCEL TIDY CONFIRMATION MODAL }}
{{#if this.confirmCancelTidy}}
-
-
+
+
+ Cancel tidy?
+
+
This will cancel the tidy at the next available checkpoint, which may process additional certificates between when the
operation was marked as cancelled and when the operation stopped.
Click “Confirm” to cancel the running tidy operation.
-
-
-
+
+
+
+
+
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/lib/replication/addon/controllers/application.js b/ui/lib/replication/addon/controllers/application.js
index ad85becb83..ed72429dd1 100644
--- a/ui/lib/replication/addon/controllers/application.js
+++ b/ui/lib/replication/addon/controllers/application.js
@@ -26,11 +26,11 @@ const DEFAULTS = {
export default Controller.extend(copy(DEFAULTS, true), {
isModalActive: false,
+ isTokenCopied: false,
expirationDate: null,
store: service(),
rm: service('replication-mode'),
replicationMode: alias('rm.mode'),
- flashMessages: service(),
submitError(e) {
if (e.errors) {
@@ -121,25 +121,13 @@ export default Controller.extend(copy(DEFAULTS, true), {
onSubmit(/*action, mode, data, event*/) {
return this.submitHandler(...arguments);
},
- copyClose(successMessage) {
- // separate action for copy & close button so it does not try and use execCommand to copy token to clipboard
- if (!!successMessage && typeof successMessage === 'string') {
- this.flashMessages.success(successMessage);
- }
+ closeTokenModal() {
this.toggleProperty('isModalActive');
this.transitionToRoute('mode.secondaries');
+ this.set('isTokenCopied', false);
},
- toggleModal(successMessage) {
- if (!!successMessage && typeof successMessage === 'string') {
- this.flashMessages.success(successMessage);
- }
- // use copy browser extension to copy token if you close the modal by clicking outside of it.
- const htmlSelectedToken = document.querySelector('#token-textarea');
- htmlSelectedToken.select();
- document.execCommand('copy');
-
- this.toggleProperty('isModalActive');
- this.transitionToRoute('mode.secondaries');
+ onCopy() {
+ this.set('isTokenCopied', true);
},
clear() {
this.reset();
diff --git a/ui/lib/replication/addon/templates/mode/secondaries/add.hbs b/ui/lib/replication/addon/templates/mode/secondaries/add.hbs
index 77914bca76..838af13f44 100644
--- a/ui/lib/replication/addon/templates/mode/secondaries/add.hbs
+++ b/ui/lib/replication/addon/templates/mode/secondaries/add.hbs
@@ -60,8 +60,16 @@
{{#if this.isModalActive}}
-
-
+
+
+ Copy your token
+
+
This token can be used to enable
{{this.model.replicationModeForDisplay}}
@@ -79,14 +87,28 @@
-
-
-
+
+
+
+
+
+ {{#unless this.isTokenCopied}}
+
+ {{/unless}}
+
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/package.json b/ui/package.json
index b85b1a8553..f75bb8a7e5 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -65,7 +65,6 @@
"@ember/test-waiters": "^3.0.0",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
- "@hashicorp/ember-flight-icons": "^3.0.9",
"@hashicorp/structure-icons": "^1.3.0",
"@icholy/duration": "^5.1.0",
"@tsconfig/ember": "^1.0.1",
@@ -166,7 +165,6 @@
"ember-test-selectors": "6.0.0",
"ember-tether": "^2.0.1",
"ember-truth-helpers": "3.0.0",
- "ember-wormhole": "0.6.0",
"escape-string-regexp": "^2.0.0",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
@@ -248,7 +246,8 @@
]
},
"dependencies": {
- "@hashicorp/design-system-components": "^2.9.0",
+ "@hashicorp/design-system-components": "^2.12.2",
+ "@hashicorp/ember-flight-icons": "^3.1.3",
"handlebars": "4.7.7",
"highlight.js": "^10.4.1",
"node-notifier": "^8.0.1",
diff --git a/ui/tests/acceptance/client-dashboard-test.js b/ui/tests/acceptance/client-dashboard-test.js
index c4ab1a6118..722d9804f5 100644
--- a/ui/tests/acceptance/client-dashboard-test.js
+++ b/ui/tests/acceptance/client-dashboard-test.js
@@ -390,9 +390,9 @@ module('Acceptance | client counts dashboard tab', function (hooks) {
.dom(SELECTORS.emptyStateTitle)
.includesText('start date found', 'Empty state shows no billing start date');
await click(SELECTORS.monthDropdown);
- await click(this.element.querySelector('[data-test-month-list] button:not([disabled])'));
+ await click(this.element.querySelector('[data-test-dropdown-month]:not([disabled])'));
await click(SELECTORS.yearDropdown);
- await click(this.element.querySelector('[data-test-year-list] button:not([disabled])'));
+ await click(this.element.querySelector('[data-test-dropdown-year]:not([disabled])'));
await click(SELECTORS.dateDropdownSubmit);
assert
.dom(SELECTORS.emptyStateTitle)
diff --git a/ui/tests/acceptance/enterprise-replication-test.js b/ui/tests/acceptance/enterprise-replication-test.js
index abf2f826fb..295d249537 100644
--- a/ui/tests/acceptance/enterprise-replication-test.js
+++ b/ui/tests/acceptance/enterprise-replication-test.js
@@ -250,11 +250,16 @@ module('Acceptance | Enterprise | replication', function (hooks) {
await pollCluster(this.owner);
await settled();
const modalDefaultTtl = document.querySelector('[data-test-row-value="TTL"]').innerText;
+
// checks on secondary token modal
- assert.dom('#modal-wormhole').exists();
+ assert.dom('.hds-modal#replication-copy-token-modal').exists();
+ assert.dom('[data-test-inline-error-message]').hasText('Copy token to dismiss modal');
assert.strictEqual(modalDefaultTtl, '1800s', 'shows the correct TTL of 1800s');
// click off the modal to make sure you don't just have to click on the copy-close button to copy the token
- await click('[data-test-modal-background="Copy your token"]');
+ assert.dom('[data-test-modal-close]').isDisabled('cancel is disabled');
+ await click('[data-test-modal-copy]');
+ assert.dom('[data-test-modal-close]').isEnabled('cancel is enabled after token is copied');
+ await click('[data-test-modal-close]');
// add another secondary not using the default ttl
await click('[data-test-secondary-add]');
@@ -269,7 +274,8 @@ module('Acceptance | Enterprise | replication', function (hooks) {
await settled();
const modalTtl = document.querySelector('[data-test-row-value="TTL"]').innerText;
assert.strictEqual(modalTtl, '180s', 'shows the correct TTL of 180s');
- await click('[data-test-modal-background="Copy your token"]');
+ await click('[data-test-modal-copy]');
+ await click('[data-test-modal-close]');
// confirm you were redirected to the secondaries page
assert.strictEqual(
diff --git a/ui/tests/acceptance/pki/pki-engine-workflow-test.js b/ui/tests/acceptance/pki/pki-engine-workflow-test.js
index 17d363923a..ea0d163987 100644
--- a/ui/tests/acceptance/pki/pki-engine-workflow-test.js
+++ b/ui/tests/acceptance/pki/pki-engine-workflow-test.js
@@ -432,7 +432,7 @@ module('Acceptance | pki workflow', function (hooks) {
.dom(SELECTORS.issuerDetails.configure)
.hasAttribute('href', `/ui/vault/secrets/${this.mountPath}/pki/issuers/${issuerId}/edit`);
await click(SELECTORS.issuerDetails.rotateRoot);
- assert.dom(find(SELECTORS.issuerDetails.rotateModal).parentElement).hasClass('is-active');
+ assert.dom(SELECTORS.issuerDetails.rotateModal).exists('rotate root modal opens');
await click(SELECTORS.issuerDetails.rotateModalGenerate);
assert.strictEqual(
currentURL(),
diff --git a/ui/tests/acceptance/pki/pki-tidy-test.js b/ui/tests/acceptance/pki/pki-tidy-test.js
index dbeba1c5dd..973c359b3a 100644
--- a/ui/tests/acceptance/pki/pki-tidy-test.js
+++ b/ui/tests/acceptance/pki/pki-tidy-test.js
@@ -163,7 +163,6 @@ module('Acceptance | pki tidy', function (hooks) {
.exists('Configure tidy modal options button exists');
await click(SELECTORS.tidyConfigureModal.tidyOptionsModal);
assert.dom(SELECTORS.tidyConfigureModal.configureTidyModal).exists('Configure tidy modal exists');
- await click(SELECTORS.tidyConfigureModal.tidyOptionsModal);
await click(SELECTORS.tidyConfigureModal.tidyModalAutoButton);
await click(SELECTORS.tidyForm.toggleLabel('Automatic tidy disabled'));
await click(SELECTORS.tidyForm.inputByAttr('tidyCertStore'));
diff --git a/ui/tests/acceptance/secrets/backend/database/secret-test.js b/ui/tests/acceptance/secrets/backend/database/secret-test.js
index ccf018459c..57994b1af8 100644
--- a/ui/tests/acceptance/secrets/backend/database/secret-test.js
+++ b/ui/tests/acceptance/secrets/backend/database/secret-test.js
@@ -281,7 +281,7 @@ module('Acceptance | secrets/database/*', function (hooks) {
await connectionPage.save();
await settled();
assert
- .dom('.modal.is-active .title')
+ .dom('[data-test-db-connection-modal-title]')
.hasText('Rotate your root credentials?', 'Modal appears asking to rotate root credentials');
assert.dom('[data-test-enable-connection]').exists('Enable button exists');
await click('[data-test-enable-connection]');
@@ -397,7 +397,7 @@ module('Acceptance | secrets/database/*', function (hooks) {
await connectionPage.save();
await settled();
assert
- .dom('.modal.is-active .title')
+ .dom('[data-test-db-connection-modal-title]')
.hasText('Rotate your root credentials?', 'Modal appears asking to ');
await connectionPage.enable();
assert.strictEqual(
@@ -418,7 +418,7 @@ module('Acceptance | secrets/database/*', function (hooks) {
});
await connectionPage.delete();
assert
- .dom('.modal.is-active .title')
+ .dom('[data-test-confirmation-modal-title]')
.hasText('Delete connection?', 'Modal appears asking to confirm delete action');
await fillIn('[data-test-confirmation-modal-input="Delete connection?"]', connectionDetails.id);
await click('[data-test-confirm-button]');
diff --git a/ui/tests/acceptance/transit-test.js b/ui/tests/acceptance/transit-test.js
index 85d14d6ddf..a755531095 100644
--- a/ui/tests/acceptance/transit-test.js
+++ b/ui/tests/acceptance/transit-test.js
@@ -37,14 +37,14 @@ const testConvergentEncryption = async function (assert, keyName) {
encodePlaintext: false,
encodeContext: false,
assertAfterEncrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`);
+ assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`);
assert.ok(
/vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText),
`${key}: ciphertext shows a vault-prefixed ciphertext`
);
},
assertBeforeDecrypt: (key) => {
- assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`);
+ assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`);
assert
.dom('[data-test-transit-input="context"]')
.hasValue(
@@ -52,9 +52,8 @@ const testConvergentEncryption = async function (assert, keyName) {
`${key}: the ui shows the base64-encoded context`
);
},
-
assertAfterDecrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`);
+ assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`);
assert.strictEqual(
find('[data-test-encrypted-value="plaintext"]').innerText,
'NaXud2QW7KjyK6Me9ggh+zmnCeBGdG93LQED49PtoOI=',
@@ -69,20 +68,20 @@ const testConvergentEncryption = async function (assert, keyName) {
encodePlaintext: false,
encodeContext: false,
assertAfterEncrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`);
+ assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`);
assert.ok(
/vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText),
`${key}: ciphertext shows a vault-prefixed ciphertext`
);
},
assertBeforeDecrypt: (key) => {
- assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`);
+ assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`);
assert
.dom('[data-test-transit-input="context"]')
.hasValue(encodeString('context'), `${key}: the ui shows the input context`);
},
assertAfterDecrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`);
+ assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`);
assert.strictEqual(
find('[data-test-encrypted-value="plaintext"]').innerText,
'NaXud2QW7KjyK6Me9ggh+zmnCeBGdG93LQED49PtoOI=',
@@ -97,20 +96,20 @@ const testConvergentEncryption = async function (assert, keyName) {
encodePlaintext: false,
encodeContext: false,
assertAfterEncrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`);
+ assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`);
assert.ok(
/vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText),
`${key}: ciphertext shows a vault-prefixed ciphertext`
);
},
assertBeforeDecrypt: (key) => {
- assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`);
+ assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`);
assert
.dom('[data-test-transit-input="context"]')
.hasValue(encodeString('context'), `${key}: the ui shows the input context`);
},
assertAfterDecrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`);
+ assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`);
assert.strictEqual(
find('[data-test-encrypted-value="plaintext"]').innerText,
encodeString('This is the secret'),
@@ -125,20 +124,20 @@ const testConvergentEncryption = async function (assert, keyName) {
encodePlaintext: true,
encodeContext: true,
assertAfterEncrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after encrypt`);
+ assert.dom('[data-test-encrypt-modal]').exists(`${key}: Modal opens after encrypt`);
assert.ok(
/vault:/.test(find('[data-test-encrypted-value="ciphertext"]').innerText),
`${key}: ciphertext shows a vault-prefixed ciphertext`
);
},
assertBeforeDecrypt: (key) => {
- assert.dom('.modal.is-active').doesNotExist(`${key}: Modal not open before decrypt`);
+ assert.dom('[data-test-decrypt-modal]').doesNotExist(`${key}: Modal not open before decrypt`);
assert
.dom('[data-test-transit-input="context"]')
.hasValue(encodeString('secret 2'), `${key}: the ui shows the encoded context`);
},
assertAfterDecrypt: (key) => {
- assert.dom('.modal.is-active').exists(`${key}: Modal opens after decrypt`);
+ assert.dom('[data-test-decrypt-modal]').exists(`${key}: Modal opens after decrypt`);
assert.strictEqual(
find('[data-test-encrypted-value="plaintext"]').innerText,
encodeString('There are many secrets 🤐'),
@@ -161,7 +160,7 @@ const testConvergentEncryption = async function (assert, keyName) {
if (testCase.encodeContext) {
await click('[data-test-transit-b64-toggle="context"]');
}
- assert.dom('.modal.is-active').doesNotExist(`${name}: is not open before encrypt`);
+ assert.dom('[data-test-encrypt-modal]').doesNotExist(`${name}: is not open before encrypt`);
await click('[data-test-button-encrypt]');
if (testCase.assertAfterEncrypt) {
@@ -170,9 +169,9 @@ const testConvergentEncryption = async function (assert, keyName) {
}
// store ciphertext for decryption step
const copiedCiphertext = find('[data-test-encrypted-value="ciphertext"]').innerText;
- await click('.modal.is-active [data-test-modal-background]');
+ await click('dialog button');
- assert.dom('.modal.is-active').doesNotExist(`${name}: Modal closes after background clicked`);
+ assert.dom('dialog.hds-modal').doesNotExist(`${name}: Modal closes after background clicked`);
await click('[data-test-transit-action-link="decrypt"]');
if (testCase.assertBeforeDecrypt) {
@@ -187,9 +186,9 @@ const testConvergentEncryption = async function (assert, keyName) {
testCase.assertAfterDecrypt(keyName);
}
- await click('.modal.is-active [data-test-modal-background]');
+ await click('dialog button');
- assert.dom('.modal.is-active').doesNotExist(`${name}: Modal closes after background clicked`);
+ assert.dom('dialog.hds-modal').doesNotExist(`${name}: Modal closes after background clicked`);
}
};
diff --git a/ui/tests/helpers/clients.js b/ui/tests/helpers/clients.js
index 95abe43979..8eaca09671 100644
--- a/ui/tests/helpers/clients.js
+++ b/ui/tests/helpers/clients.js
@@ -29,8 +29,8 @@ export const SELECTORS = {
attributionBlock: '[data-test-clients-attribution]',
filterBar: '[data-test-clients-filter-bar]',
rangeDropdown: '[data-test-calendar-widget-trigger]',
- monthDropdown: '[data-test-popup-menu-trigger="month"]',
- yearDropdown: '[data-test-popup-menu-trigger="year"]',
+ monthDropdown: '[data-test-toggle-month]',
+ yearDropdown: '[data-test-toggle-year]',
dateDropdownSubmit: '[data-test-date-dropdown-submit]',
runningTotalMonthStats: '[data-test-running-total="single-month-stats"]',
runningTotalMonthlyCharts: '[data-test-running-total="monthly-charts"]',
diff --git a/ui/tests/helpers/kv/kv-selectors.js b/ui/tests/helpers/kv/kv-selectors.js
index 8728af7bf4..14546c0899 100644
--- a/ui/tests/helpers/kv/kv-selectors.js
+++ b/ui/tests/helpers/kv/kv-selectors.js
@@ -22,7 +22,7 @@ export const PAGE = {
message: '[data-test-page-error] p',
},
toolbar: 'nav.toolbar',
- toolbarAction: 'nav.toolbar-actions .toolbar-link',
+ toolbarAction: 'nav.toolbar-actions .toolbar-link, nav.toolbar-actions .toolbar-button',
secretRow: '[data-test-component="info-table-row"]', // replace with infoRow
// specific page selectors
backends: {
diff --git a/ui/tests/helpers/pki/page/pki-tidy.js b/ui/tests/helpers/pki/page/pki-tidy.js
index 8fefe7aa8f..dca5fca3fe 100644
--- a/ui/tests/helpers/pki/page/pki-tidy.js
+++ b/ui/tests/helpers/pki/page/pki-tidy.js
@@ -12,12 +12,12 @@ export const SELECTORS = {
hdsAlertButtonText: '[data-test-cancel-tidy-action] .hds-button__text',
timeStartedRow: '[data-test-value-div="Time started"]',
timeFinishedRow: '[data-test-value-div="Time finished"]',
- cancelTidyModalBackground: '[data-test-modal-background="Cancel tidy?"]',
+ cancelTidyModalBackground: '.hds-modal#pki-cancel-tidy-modal',
tidyEmptyStateConfigure: '[data-test-tidy-empty-state-configure]',
manualTidyToolbar: '[data-test-pki-manual-tidy-config]',
autoTidyToolbar: '[data-test-pki-auto-tidy-config]',
tidyConfigureModal: {
- configureTidyModal: '[data-test-modal-background="Tidy this mount"]',
+ configureTidyModal: '.hds-modal#pki-tidy-modal',
tidyModalAutoButton: '[data-test-tidy-modal-auto-button]',
tidyModalManualButton: '[data-test-tidy-modal-manual-button]',
tidyModalCancelButton: '[data-test-tidy-modal-cancel-button]',
diff --git a/ui/tests/helpers/pki/pki-delete-all-issuers.js b/ui/tests/helpers/pki/pki-delete-all-issuers.js
index 0083e3e565..fcbd0afdce 100644
--- a/ui/tests/helpers/pki/pki-delete-all-issuers.js
+++ b/ui/tests/helpers/pki/pki-delete-all-issuers.js
@@ -5,7 +5,7 @@
export const SELECTORS = {
issuerLink: '[data-test-delete-all-issuers-link]',
- deleteAllIssuerModal: '[data-test-modal-background="Delete All Issuers?"]',
- deleteAllIssuerInput: '[data-test-confirmation-modal-input="Delete All Issuers?"]',
- deleteAllIssuerButton: '[data-test-confirm-button="Delete All Issuers?"]',
+ deleteAllIssuerModal: '.hds-modal#confirmation-modal',
+ deleteAllIssuerInput: '[data-test-confirmation-modal-input="Delete all issuers?"]',
+ deleteAllIssuerButton: '[data-test-confirm-button="Delete all issuers?"]',
};
diff --git a/ui/tests/helpers/pki/pki-issuer-details.js b/ui/tests/helpers/pki/pki-issuer-details.js
index df7affd440..55c24ef37b 100644
--- a/ui/tests/helpers/pki/pki-issuer-details.js
+++ b/ui/tests/helpers/pki/pki-issuer-details.js
@@ -11,7 +11,7 @@ export const SELECTORS = {
download: '[data-test-issuer-download]',
groupTitle: '[data-test-group-title]',
parsingAlertBanner: '[data-test-parsing-error-alert-banner]',
- rotateModal: '[data-test-modal-background="Rotate this root"]',
+ rotateModal: '.hds-modal#pki-rotate-root-modal',
rotateModalGenerate: '[data-test-root-rotate-step-one]',
rotateRoot: '[data-test-pki-issuer-rotate-root]',
row: '[data-test-component="info-table-row"]',
diff --git a/ui/tests/index.html b/ui/tests/index.html
index fbed991d97..caf9b008ea 100644
--- a/ui/tests/index.html
+++ b/ui/tests/index.html
@@ -26,7 +26,6 @@
-
diff --git a/ui/tests/integration/components/clients/attribution-test.js b/ui/tests/integration/components/clients/attribution-test.js
index bd83a26e59..9f5587514e 100644
--- a/ui/tests/integration/components/clients/attribution-test.js
+++ b/ui/tests/integration/components/clients/attribution-test.js
@@ -46,7 +46,6 @@ module('Integration | Component | clients/attribution', function (hooks) {
test('it renders empty state with no data', async function (assert) {
await render(hbs`
-
`);
@@ -59,7 +58,6 @@ module('Integration | Component | clients/attribution', function (hooks) {
test('it renders with data for namespaces', async function (assert) {
await render(hbs`
-
`);
await click('[data-test-attribution-export-button]');
- assert.dom('.modal.is-active .title').hasText('Export attribution data', 'modal appears to export csv');
- assert.dom('.modal.is-active').includesText('June 2022 - December 2022');
+ assert
+ .dom('[data-test-export-modal-title]')
+ .hasText('Export attribution data', 'modal appears to export csv');
+ assert.dom('[ data-test-export-date-range]').includesText('June 2022 - December 2022');
});
});
diff --git a/ui/tests/integration/components/clients/config-test.js b/ui/tests/integration/components/clients/config-test.js
index 9d81bda34e..482ecbaf4e 100644
--- a/ui/tests/integration/components/clients/config-test.js
+++ b/ui/tests/integration/components/clients/config-test.js
@@ -52,7 +52,7 @@ module('Integration | Component | client count config', function (hooks) {
});
test('it should function in edit mode when reporting is disabled', async function (assert) {
- assert.expect(13);
+ assert.expect(12);
this.server.put('/sys/internal/counters/config', (schema, req) => {
const { enabled, retention_months } = JSON.parse(req.requestBody);
@@ -64,7 +64,6 @@ module('Integration | Component | client count config', function (hooks) {
this.createModel('disable');
await render(hbs`
-
`);
@@ -86,9 +85,8 @@ module('Integration | Component | client count config', function (hooks) {
await fillIn('[data-test-input="retentionMonths"]', 24);
await click('[data-test-clients-config-save]');
- assert.dom('.modal.is-active').exists('Modal renders');
assert
- .dom('[data-test-modal-title] span')
+ .dom('[data-test-clients-config-modal="title"]')
.hasText('Turn usage tracking on?', 'Correct modal title renders');
assert.dom('[data-test-clients-config-modal="on"]').exists('Correct modal description block renders');
@@ -100,14 +98,14 @@ module('Integration | Component | client count config', function (hooks) {
await click('[data-test-input="enabled"]');
await click('[data-test-clients-config-save]');
- assert.dom('.modal.is-active').exists('Modal renders');
+ assert.dom('[data-test-clients-config-modal]').exists('Modal renders');
assert
- .dom('[data-test-modal-title] span')
+ .dom('[data-test-clients-config-modal="title"]')
.hasText('Turn usage tracking off?', 'Correct modal title renders');
assert.dom('[data-test-clients-config-modal="off"]').exists('Correct modal description block renders');
await click('[data-test-clients-config-modal="cancel"]');
- assert.dom('.modal.is-active').doesNotExist('Modal is hidden on cancel');
+ assert.dom('[data-test-clients-config-modal]').doesNotExist('Modal is hidden on cancel');
});
test('it should function in edit mode when reporting is enabled', async function (assert) {
@@ -123,7 +121,6 @@ module('Integration | Component | client count config', function (hooks) {
this.createModel('enable', true, 24);
await render(hbs`
-
`);
@@ -162,7 +159,6 @@ module('Integration | Component | client count config', function (hooks) {
this.createModel();
await render(hbs`
-
`);
await fillIn('[data-test-input="retentionMonths"]', 24);
diff --git a/ui/tests/integration/components/clients/monthly-usage-test.js b/ui/tests/integration/components/clients/monthly-usage-test.js
index 8f77ee4ca8..6dc31979a0 100644
--- a/ui/tests/integration/components/clients/monthly-usage-test.js
+++ b/ui/tests/integration/components/clients/monthly-usage-test.js
@@ -1433,8 +1433,7 @@ module('Integration | Component | clients/monthly-usage', function (hooks) {
test('it renders empty state with no data', async function (assert) {
await render(hbs`
-
-
+
`);
assert.dom('[data-test-monthly-usage]').exists('monthly usage component renders');
assert.dom('[data-test-component="empty-state"]').exists();
@@ -1455,8 +1454,7 @@ module('Integration | Component | clients/monthly-usage', function (hooks) {
),
]);
await render(hbs`
-
-
-
-
-
- `[data-test-dropdown-month="${m}"]`,
- yearDropdown: '[data-test-popup-menu-trigger="year"]',
+ yearDropdown: '[data-test-toggle-year]',
specificYear: (y) => `[data-test-dropdown-year="${y}"]`,
-
submitButton: '[data-test-date-dropdown-submit]',
- cancelButton: '[data-test-date-dropdown-cancel]',
- monthOptions: '[data-test-month-list] button',
+ monthOptions: '[data-test-dropdown-month]',
};
module('Integration | Component | date-dropdown', function (hooks) {
@@ -34,27 +32,11 @@ module('Integration | Component | date-dropdown', function (hooks) {
test('it renders dropdown', async function (assert) {
await render(hbs`
-
+
`);
assert.dom(SELECTORS.submitButton).hasText('Submit', 'button renders default text');
- assert.dom(SELECTORS.cancelButton).doesNotExist('it does not render cancel button by default');
- });
-
- test('it fires off cancel callback', async function (assert) {
- assert.expect(2);
- const onCancel = () => {
- assert.ok('fires onCancel callback');
- };
- this.set('onCancel', onCancel);
- await render(hbs`
-
-
-
- `);
- assert.dom(SELECTORS.submitButton).hasText('Save', 'button renders passed in text');
- await click(SELECTORS.cancelButton);
});
test('it renders dropdown and selects month and year', async function (assert) {
@@ -74,7 +56,7 @@ module('Integration | Component | date-dropdown', function (hooks) {
this.set('parentAction', parentAction);
await render(hbs`
-
+
+
`);
@@ -129,7 +111,7 @@ module('Integration | Component | date-dropdown', function (hooks) {
test('selecting month first: it disables current year when future months selected', async function (assert) {
assert.expect(5);
await render(hbs`
-
+
`);
@@ -149,7 +131,7 @@ module('Integration | Component | date-dropdown', function (hooks) {
test('selecting year first: it disables future months when current year selected', async function (assert) {
assert.expect(12);
await render(hbs`
-
+
`);
@@ -170,7 +152,7 @@ module('Integration | Component | date-dropdown', function (hooks) {
test('selecting year first: it enables all months when past year is selected', async function (assert) {
assert.expect(12);
await render(hbs`
-