Icu 16786 implement sort for targets (#2830)

* feat: 🎸 add sorting for targets

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16786
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2025-05-21 12:20:48 -07:00
1 parent 8f3cccce32
commit 44bd5ee1c6
16 files changed
+264 -150

No files matched your search

+10 -1
View File
@@ -15,7 +15,8 @@ export const FIELD_DESCRIPTION = '[name=description]';
export const FIELD_DESCRIPTION_VALUE = 'description';
export const TABLE_RESOURCE_LINK = (url) => `tbody [href="${url}"]`;
export const TABLE_ROW = 'tbody tr';
export const TABLE_ROWS = 'tbody tr';
export const TABLE_ROW = (row) => `tbody tr:nth-child(${row})`;
export const TABLE_ROW_CHECKBOX = 'tbody tr input[type="checkbox"]';
export const TABLE_FIRST_ROW_ACTION_DROPDOWN =
'tbody tr:first-child td:last-child button';
@@ -66,3 +67,11 @@ export const FILTER_DROPDOWN_ITEM_APPLY_BTN = (filterName) =>
export const PAGINATION = '[data-test-pagination]';
export const LINK_LIST_ITEM_TEXT = '.link-list-item__text';
export const FORM = 'main form';
// Sorting selectors
export const TABLE_SORT_BTN = (column) =>
`thead tr th:nth-child(${column}) button`;
export const TABLE_SORT_BTN_ARROW_UP = (column) =>
`thead tr th:nth-child(${column}) button .hds-icon-arrow-up`;
export const TABLE_SORT_BTN_ARROW_DOWN = (column) =>
`thead tr th:nth-child(${column}) button .hds-icon-arrow-down`;