Skip to content

Commit

Permalink
chore: adjustments to test id-related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emcelroy committed Sep 19, 2024
1 parent c38a5d3 commit d158b5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cypress/support/elements/common/SortedWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]');
Expand Down Expand Up @@ -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"]');
Expand Down
6 changes: 2 additions & 4 deletions src/components/document/sort-work-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d158b5c

Please sign in to comment.