Files
threshold-ui/ui/admin/tests/helpers/selectors.js
T
Lauren 422cff4547 [ICU-15647] Replace Rose::Dialog with Hds::Modal in admin ui only (#2623)
* sort list

* refactor: 💡 Replace Rose::Dialog with Hds::Modal

✅ Closes: ICU-15647

* refactor targets-host-sources-test

* refactor update-test

* update test selectors

* refactor delete test

* refactor org scope test

* refactor delete scope and auth-method tests

* refactor update host catalogs tests

* refactor credential-stores credential update tests

* refactor credential-stores credentials delete tests

* refactor scopes update tests

* refactor storage buckets delete test

* refactor storage buckets delete test

* refactor credential library update test

* refactor targest workers test

* refactor workers create tags test

* refactor global scope test

* refactor users update test

* refactor host catalogs delete test

* refactor credential-store update tests

* refactor host catalogs, hosts and sets update tests

* remove unused vars

* rename selectors, remove attrs

* add @onDismiss callback
2024-12-20 14:16:43 -05:00

44 lines
1.6 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
export const SAVE_BTN = '[type=submit]';
export const CANCEL_BTN = '.rose-form-actions [type=button]';
export const EDIT_BTN = '.rose-form-actions [type=button]';
export const FIELD_NAME = '[name=name]';
export const FIELD_NAME_VALUE = 'Random name';
export const FIELD_NAME_ERROR = '[data-test-error-message-name]';
export const FIELD_DESCRIPTION = '[name=description]';
export const FIELD_DESCRIPTION_VALUE = 'description';
export const TABLE_RESOURCE_LINK = (url) => `tbody [href="${url}"]`;
export const RESOURCE_NOT_FOUND_SUBTITLE =
'[data-test-error-application-state] .hds-application-state__error-code';
export const RESOURCE_NOT_FOUND_VALUE = 'ERROR 404';
export const PAGE_MESSAGE_DESCRIPTION = '.hds-application-state__body-text';
export const PAGE_MESSAGE_LINK =
'.hds-application-state__footer .hds-link-standalone';
export const HREF = (url) => `[href="${url}"]`;
export const SIDEBAR_NAV_LINK = (url) => `[title="General"] a[href="${url}"]`;
export const ALERT_TOAST = '[data-test-toast-notification]';
export const ALERT_TOAST_BODY =
'[data-test-toast-notification] .hds-alert__description';
export const ALERT_TOAST_DISMISS =
'[data-test-toast-notification] .hds-dismiss-button';
export const MODAL_WARNING = 'dialog';
export const MODAL_WARNING_CONFIRM_BTN =
'dialog .hds-modal__footer button:first-child';
export const MODAL_WARNING_CANCEL_BTN =
'dialog .hds-modal__footer button:last-child';
export const MODAL_WARNING_TITLE = '.hds-modal__header';
export const MODAL_WARNING_MESSAGE = '.hds-modal__body';