From d158b5ccd583b48573349eeae1f584c123072d69 Mon Sep 17 00:00:00 2001 From: Ethan McElroy Date: Thu, 19 Sep 2024 17:27:39 -0400 Subject: [PATCH] chore: adjustments to test id-related fixes --- cypress/support/elements/common/SortedWork.js | 4 ++-- src/components/document/sort-work-view.tsx | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cypress/support/elements/common/SortedWork.js b/cypress/support/elements/common/SortedWork.js index 7ae80702a..a95e6dabc 100644 --- a/cypress/support/elements/common/SortedWork.js +++ b/cypress/support/elements/common/SortedWork.js @@ -9,7 +9,7 @@ class SortedWork { return cy.get('.custom-select.sort-work-sort-menu.primary-sort-menu [data-test="list-item-group"]'); } getPrimarySortByTagOption(){ - return cy.get('.custom-select.sort-work-sort-menu.primary-sort-menu [data-test="list-item-identify-design approach"]'); + return cy.get('.custom-select.sort-work-sort-menu.primary-sort-menu [data-test="list-item-strategy"]'); } getPrimarySortByBookmarkedOption(){ return cy.get('.custom-select.sort-work-sort-menu.primary-sort-menu [data-test="list-item-bookmarked"]'); @@ -43,7 +43,7 @@ class SortedWork { return cy.get('.custom-select.sort-work-sort-menu.secondary-sort-menu [data-test="list-item-group"]'); } getSecondarySortByTagOption(){ - return cy.get('.custom-select.sort-work-sort-menu.secondary-sort-menu [data-test="list-item-identify-design approach"]'); + return cy.get('.custom-select.sort-work-sort-menu.secondary-sort-menu [data-test="list-item-strategy"]'); } getSecondarySortByBookmarkedOption(){ return cy.get('.custom-select.sort-work-sort-menu.secondary-sort-menu [data-test="list-item-bookmarked"]'); diff --git a/src/components/document/sort-work-view.tsx b/src/components/document/sort-work-view.tsx index 74962beb0..c433bc88f 100644 --- a/src/components/document/sort-work-view.tsx +++ b/src/components/document/sort-work-view.tsx @@ -43,18 +43,16 @@ export const SortWorkView: React.FC = observer(function SortWorkView() { }; const primarySortByOptions: ICustomDropdownItem[] = sortOptions.map((option) => ({ - dataTest: normalizeSortString(option).toLowerCase(), disabled: false, - id: normalizeSortString(option), + id: normalizeSortString(option).toLowerCase(), selected: normalizeSortString(option) === primarySortBy, text: option, onClick: () => handlePrimarySortBySelection(normalizeSortString(option)) })); const secondarySortOptions: ICustomDropdownItem[] = sortOptions.map((option) => ({ - dataTest: normalizeSortString(option).toLowerCase(), disabled: option === primarySortBy, - id: normalizeSortString(option), + id: normalizeSortString(option).toLowerCase(), selected: normalizeSortString(option) === secondarySortBy, text: option, onClick: () => persistentUI.setSecondarySortBy(normalizeSortString(option))