Skip to content

Commit

Permalink
fix(app): fix background color on magnetic module slideout data (#15140)
Browse files Browse the repository at this point in the history
Closes RQA-2515
  • Loading branch information
ncdiehl11 authored May 9, 2024
1 parent 7c410bf commit de2ada8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/organisms/ModuleCard/MagneticModuleSlideout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ export const MagneticModuleSlideout = (
{t('height_ranges', { gen: info.version })}
</StyledText>
<Flex
backgroundColor={COLORS.grey10}
backgroundColor={COLORS.grey20}
flexDirection={DIRECTION_ROW}
justifyContent={JUSTIFY_SPACE_BETWEEN}
fontWeight={TYPOGRAPHY.fontWeightRegular}
fontSize={TYPOGRAPHY.fontSizeP}
padding={SPACING.spacing16}
borderRadius={BORDERS.borderRadius4}
data-testid={`MagneticModuleSlideout_body_data_${module.serialNumber}`}
>
<Flex
flexDirection={DIRECTION_COLUMN}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react'
import { fireEvent, screen } from '@testing-library/react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { COLORS } from '@opentrons/components'

import { renderWithProviders } from '../../../__testing-utils__'
import { i18n } from '../../../i18n'
Expand Down Expand Up @@ -97,4 +98,12 @@ describe('MagneticModuleSlideout', () => {
})
expect(button).not.toBeEnabled()
})

it('renders the correct background color in magnetic module data', () => {
render(props)
const magneticModuleInfo = screen.getByTestId(
'MagneticModuleSlideout_body_data_def456'
)
expect(magneticModuleInfo).toHaveStyle(`background-color: ${COLORS.grey20}`)
})
})

0 comments on commit de2ada8

Please sign in to comment.