diff --git a/src/pages/MyMove/Multi-Moves/MultiMovesMoveContainer/MultiMovesMoveContainer.jsx b/src/pages/MyMove/Multi-Moves/MultiMovesMoveContainer/MultiMovesMoveContainer.jsx index 7e10f669e7c..1cf2f62448e 100644 --- a/src/pages/MyMove/Multi-Moves/MultiMovesMoveContainer/MultiMovesMoveContainer.jsx +++ b/src/pages/MyMove/Multi-Moves/MultiMovesMoveContainer/MultiMovesMoveContainer.jsx @@ -77,7 +77,15 @@ const MultiMovesMoveContainer = ({ moves }) => {

#{m.moveCode}

- {m.status !== 'APPROVED' ? ( +
+ - ) : ( - - )} +
{ // The move details should be hidden again expect(screen.queryByText('Shipments')).not.toBeInTheDocument(); }); + + it('renders Go to Move & Download buttons for current move', () => { + render( + + + , + ); + + expect(screen.getByTestId('headerBtns')).toBeInTheDocument(); + expect(screen.getByRole('button', { name: 'Download' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: 'Go to Move' })).toBeInTheDocument(); + }); + + it('renders Go to Move & Download buttons for previous moves exceeding one', () => { + render( + + + , + ); + + // Check for the container that holds the buttons - there should be 2 + const headerBtnsElements = screen.getAllByTestId('headerBtns'); + expect(headerBtnsElements).toHaveLength(2); + + // Check for Download buttons - there should be 2 + const downloadButtons = screen.getAllByRole('button', { name: 'Download' }); + expect(downloadButtons).toHaveLength(2); + + // Check for Go to Move buttons - there should be 2 + const goToMoveButtons = screen.getAllByRole('button', { name: 'Go to Move' }); + expect(goToMoveButtons).toHaveLength(2); + }); });