From fe67d89d4175fbc318564e493646e9fa7623f480 Mon Sep 17 00:00:00 2001 From: Ashley McEntee <123661468+ashley-o0o@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:24:27 -0400 Subject: [PATCH] update arrow sorting --- .../tests/mocked/resources/resources.cy.ts | 16 ++++++++-------- .../learningCenter/LearningCenterListHeader.tsx | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/src/__tests__/cypress/cypress/tests/mocked/resources/resources.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/mocked/resources/resources.cy.ts index f7830a9e14..aa8fdafcbf 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/mocked/resources/resources.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/mocked/resources/resources.cy.ts @@ -269,33 +269,33 @@ describe('Resources page', () => { // sort by name listView.shouldListBeInFirstPosition('create-jupyter-notebook'); - listView.findSortDownButton('name').click(); - listView.shouldListBeInFirstPosition('jupyter-doc'); listView.findSortUpButton('name').click(); + listView.shouldListBeInFirstPosition('jupyter-doc'); + listView.findSortDownButton('name').click(); listView.shouldListBeInFirstPosition('create-jupyter-notebook'); // sort by Application listView.findSortButton('application').click(); listView.shouldListBeInFirstPosition('create-jupyter-notebook'); - listView.findSortDownButton('application').click(); - listView.shouldListBeInFirstPosition('jupyter-doc'); listView.findSortUpButton('application').click(); + listView.shouldListBeInFirstPosition('jupyter-doc'); + listView.findSortDownButton('application').click(); listView.shouldListBeInFirstPosition('create-jupyter-notebook'); // sort by Type listView.findSortButton('type').click(); listView.shouldListBeInFirstPosition('jupyter-doc'); - listView.findSortDownButton('type').click(); - listView.shouldListBeInFirstPosition('deploy-python-model'); listView.findSortUpButton('type').click(); + listView.shouldListBeInFirstPosition('deploy-python-model'); + listView.findSortDownButton('type').click(); listView.shouldListBeInFirstPosition('jupyter-doc'); // sort by duration listView.findSortButton('duration').click(); listView.shouldListBeInFirstPosition('jupyter-doc'); - listView.findSortDownButton('duration').click(); - listView.shouldListBeInFirstPosition('jupyterhub-view-installed-packages'); listView.findSortUpButton('duration').click(); + listView.shouldListBeInFirstPosition('jupyterhub-view-installed-packages'); + listView.findSortDownButton('duration').click(); listView.shouldListBeInFirstPosition('jupyter-doc'); }); diff --git a/frontend/src/pages/learningCenter/LearningCenterListHeader.tsx b/frontend/src/pages/learningCenter/LearningCenterListHeader.tsx index ed861f8c28..430e5e7285 100644 --- a/frontend/src/pages/learningCenter/LearningCenterListHeader.tsx +++ b/frontend/src/pages/learningCenter/LearningCenterListHeader.tsx @@ -40,16 +40,16 @@ const LearningCenterListHeaders: React.FC = () => { } if (sortOrder === SORT_ASC) { return ( - onSortSelect(field, false)} - data-testid={`sort-down-icon ${field}`} + data-testid={`sort-up-icon ${field}`} /> ); } return ( - onSortSelect(field, true)} - data-testid={`sort-up-icon ${field}`} + data-testid={`sort-down-icon ${field}`} /> ); };