From a8680b3928e0b990a3464ea3b5bead9a59c6d864 Mon Sep 17 00:00:00 2001 From: Chris Hopkins <102232401+chopkinsmade@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:00:38 +0000 Subject: [PATCH] change back button to link (#6374) --- .../modules/Tasks/TaskDetails/TaskButtons.jsx | 13 +++++++------ .../specs/Tasks/TaskDetails/TaskButtons.cy.jsx | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/client/modules/Tasks/TaskDetails/TaskButtons.jsx b/src/client/modules/Tasks/TaskDetails/TaskButtons.jsx index 0a2925d9b08..b0ee1cac634 100644 --- a/src/client/modules/Tasks/TaskDetails/TaskButtons.jsx +++ b/src/client/modules/Tasks/TaskDetails/TaskButtons.jsx @@ -12,9 +12,13 @@ import { TASK_ARCHIVE_TASK, buttonState2props } from './state' import { GREY_3, TEXT_COLOUR } from '../../../utils/colours' const ButtonWrapper = styled.div` + min-height: 71px; * { margin-left: ${SPACING.SCALE_4}; } + * { + vertical-align: baseline; + } ` export const TaskButtons = ({ task, returnUrl }) => ( @@ -49,15 +53,12 @@ export const TaskButtons = ({ task, returnUrl }) => ( Edit )} - + diff --git a/test/component/cypress/specs/Tasks/TaskDetails/TaskButtons.cy.jsx b/test/component/cypress/specs/Tasks/TaskDetails/TaskButtons.cy.jsx index 4250822bb55..6bca88e1b83 100644 --- a/test/component/cypress/specs/Tasks/TaskDetails/TaskButtons.cy.jsx +++ b/test/component/cypress/specs/Tasks/TaskDetails/TaskButtons.cy.jsx @@ -32,7 +32,7 @@ describe('Task buttons', () => { }) it('should show the Back link to dashboard when no return url exists', () => { - assertLink('back-button', urls.dashboard.myTasks()) + assertLink('task-back-link', urls.dashboard.myTasks()) }) }) @@ -52,7 +52,7 @@ describe('Task buttons', () => { }) it('should show the Back link to dashboard when no return url exists', () => { - assertLink('back-button', urls.dashboard.myTasks()) + assertLink('task-back-link', urls.dashboard.myTasks()) }) }) @@ -64,7 +64,7 @@ describe('Task buttons', () => { }) it('should the back button with the returnUrl as the href', () => { - assertLink('back-button', 'a/b/c') + assertLink('task-back-link', 'a/b/c') }) }) })