Skip to content

Commit

Permalink
feat(labware-creator): show Grid section for custom tube racks (#8068)
Browse files Browse the repository at this point in the history
Closes #7979
  • Loading branch information
IanLondon committed Jul 9, 2021
1 parent 283d926 commit 8c5bff3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,6 @@ describe('Grid', () => {
)
expect(container.firstChild).toBe(null)
})
it('should NOT render when the labware type is tubeRack', () => {
const { container } = render(
wrapInFormik(<Grid />, {
...formikConfig,
initialValues: {
...formikConfig.initialValues,
labwareType: 'tubeRack',
},
})
)
expect(container.firstChild).toBe(null)
})

it('should not render when all fields are hidden', () => {
when(isEveryFieldHiddenMock)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ export const Grid = (): JSX.Element | null => {
const { values, errors, touched } = useFormikContext<LabwareFields>()
if (
isEveryFieldHidden(fieldList, values) ||
(values.labwareType != null &&
['aluminumBlock', 'tubeRack'].includes(values.labwareType))
(values.labwareType != null && values.labwareType === 'aluminumBlock')
) {
return null
}
Expand Down

0 comments on commit 8c5bff3

Please sign in to comment.