Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): update thumbnail image of robot #12724

Merged
merged 1 commit into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/src/assets/images/FLEX.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/assets/images/OT3.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { MiniCard } from '../../molecules/MiniCard'
import { getRobotModelByName, OPENTRONS_USB } from '../../redux/discovery'
import { appShellRequestor } from '../../redux/shell/remote'
import OT2_PNG from '../../assets/images/OT2-R_HERO.png'
import OT3_PNG from '../../assets/images/OT3.png'
import FLEX_PNG from '../../assets/images/FLEX.png'
import { RobotBusyStatusAction } from '.'

import type { Robot } from '../../redux/discovery/types'
Expand Down Expand Up @@ -81,7 +81,7 @@ export function AvailableRobotOption(
isError={(isError || isOnDifferentSoftwareVersion) && isSelected}
>
<img
src={robotModel === 'OT-2' ? OT2_PNG : OT3_PNG}
src={robotModel === 'OT-2' ? OT2_PNG : FLEX_PNG}
css={css`
width: 4rem;
height: 3.5625rem;
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/Devices/RobotCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from '@opentrons/shared-data'

import OT2_PNG from '../../assets/images/OT2-R_HERO.png'
import OT3_PNG from '../../assets/images/OT3.png'
import FLEX_PNG from '../../assets/images/FLEX.png'
import { InstrumentContainer } from '../../atoms/InstrumentContainer'
import { StyledText } from '../../atoms/text'
import { CONNECTABLE, getRobotModelByName } from '../../redux/discovery'
Expand Down Expand Up @@ -66,7 +66,7 @@ export function RobotCard(props: RobotCardProps): JSX.Element | null {
css={BORDERS.cardOutlineBorder}
>
<img
src={robotModel === 'OT-2' ? OT2_PNG : OT3_PNG}
src={robotModel === 'OT-2' ? OT2_PNG : FLEX_PNG}
style={{ width: '6rem' }}
id={`RobotCard_${String(robotName)}_robotImage`}
/>
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/Devices/RobotOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '@opentrons/components'

import OT2_PNG from '../../assets/images/OT2-R_HERO.png'
import OT3_PNG from '../../assets/images/OT3.png'
import FLEX_PNG from '../../assets/images/FLEX.png'
import { ToggleButton } from '../../atoms/buttons'
import { StyledText } from '../../atoms/text'
import { CONNECTABLE, getRobotModelByName } from '../../redux/discovery'
Expand Down Expand Up @@ -76,7 +76,7 @@ export function RobotOverview({
>
<Flex>
<img
src={robotModel === 'OT-2' ? OT2_PNG : OT3_PNG}
src={robotModel === 'OT-2' ? OT2_PNG : FLEX_PNG}
style={{
width: '6rem',
height: '5.4375rem',
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/Devices/__tests__/RobotCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jest.mock('../RobotOverflowMenu')
jest.mock('../RobotStatusHeader')

const OT2_PNG_FILE_NAME = 'OT2-R_HERO.png'
const OT3_PNG_FILE_NAME = 'OT3.png'
const FLEX_PNG_FILE_NAME = 'FLEX.png'
const MOCK_STATE: State = {
discovery: {
robot: { connection: { connectedTo: null } },
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('RobotCard', () => {
const [{ getByRole }] = render(props)
const image = getByRole('img')

expect(image.getAttribute('src')).toEqual(OT3_PNG_FILE_NAME)
expect(image.getAttribute('src')).toEqual(FLEX_PNG_FILE_NAME)
})

it('renders a UpdateRobotBanner component', () => {
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/Devices/__tests__/RobotOverview.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jest.mock('../../UpdateRobotBanner')
jest.mock('../RobotOverviewOverflowMenu')

const OT2_PNG_FILE_NAME = 'OT2-R_HERO.png'
const OT3_PNG_FILE_NAME = 'OT3.png'
const FLEX_PNG_FILE_NAME = 'FLEX.png'

const MOCK_STATE: State = {
discovery: {
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('RobotOverview', () => {
.mockReturnValue('Opentrons Flex')
const [{ getByRole }] = render(props)
const image = getByRole('img')
expect(image.getAttribute('src')).toEqual(OT3_PNG_FILE_NAME)
expect(image.getAttribute('src')).toEqual(FLEX_PNG_FILE_NAME)
})

it('renders a RobotStatusHeader component', () => {
Expand Down