diff --git a/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx b/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx index 4ef3942e413..6c49288b30e 100644 --- a/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx +++ b/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx @@ -119,12 +119,13 @@ describe('FirmwareUpdateModal', () => { vi.advanceTimersByTime(3000) }) screen.getByText('Firmware is up to date.') + screen.getByLabelText('check') act(() => { vi.advanceTimersByTime(3000) }) await waitFor(() => expect(props.proceed).toHaveBeenCalled()) }) - it('does not render text or a progress bar until instrument update status is known', () => { + it('does not render text until instrument update status is known', () => { vi.mocked(useSubsystemUpdateQuery).mockReturnValue({ data: { data: { @@ -159,6 +160,7 @@ describe('FirmwareUpdateModal', () => { vi.advanceTimersByTime(3000) }) screen.getByText('A firmware update is required, instrument is updating') + screen.getByLabelText('spinner') expect(updateSubsystem).toHaveBeenCalled() }) it('calls refetch instruments and then proceed once update is complete', async () => { diff --git a/app/src/organisms/FirmwareUpdateModal/index.tsx b/app/src/organisms/FirmwareUpdateModal/index.tsx index ceaf940ea90..f669b871445 100644 --- a/app/src/organisms/FirmwareUpdateModal/index.tsx +++ b/app/src/organisms/FirmwareUpdateModal/index.tsx @@ -9,7 +9,6 @@ import { Icon, RESPONSIVENESS, JUSTIFY_CENTER, - BORDERS, COLORS, } from '@opentrons/components' import { @@ -17,7 +16,6 @@ import { useSubsystemUpdateQuery, useUpdateSubsystemMutation, } from '@opentrons/react-api-client' -import { ProgressBar } from '../../atoms/ProgressBar' import { StyledText } from '../../atoms/text' import { BadGripper, BadPipette, Subsystem } from '@opentrons/api-client' @@ -55,11 +53,6 @@ const MODAL_STYLE = css` height: 31.5625rem; } ` -const OUTER_STYLES = css` - border-radius: ${BORDERS.borderRadius16}; - background: ${COLORS.grey30}; - width: 13.374rem; -` const SPINNER_STYLE = css` color: ${COLORS.grey50}; @@ -81,7 +74,7 @@ export const FirmwareUpdateModal = ( isOnDevice, } = props const [updateId, setUpdateId] = React.useState(null) - const [firmwareText, setFirmwareText] = React.useState('') + const [firmwareText, setFirmwareText] = React.useState(null) const { data: attachedInstruments, refetch: refetchInstruments, @@ -113,7 +106,6 @@ export const FirmwareUpdateModal = ( }, []) const { data: updateData } = useSubsystemUpdateQuery(updateId) const status = updateData?.data.updateStatus - const percentComplete = updateData?.data.updateProgress ?? 0 React.useEffect(() => { if ((status != null || updateNeeded) && firmwareText !== description) { @@ -140,24 +132,27 @@ export const FirmwareUpdateModal = ( return ( - - {firmwareText.length ? firmwareText : 'Checking for updates...'} - - {status != null || updateNeeded ? ( - - ) : null} - {firmwareText.length ? null : ( + {status != null || updateNeeded || !firmwareText ? ( + ) : ( + )} + + {firmwareText ?? 'Checking for updates...'} + ) }