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

feat(labware-creator): autofill homogenousWells for tipRacks #7806

Merged
merged 5 commits into from
May 19, 2021

Conversation

IanLondon
Copy link
Contributor

Overview

Pairing credit to @Kadee80

Addresses #7712 -- just regularity section

The regularity section is hidden.

Changelog

Review requests

  • Regularity section should be hidden when tipRack is selected
  • Should still show up for non-tipRack
  • Nothing weird happens when you switch to and from tipRack in the labware type dropdown

Risk assessment

Low

Copy link
Contributor

@Kadee80 Kadee80 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧑‍🔬 Great Scott! It works!

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know a lot of this is moving stuff around, but i think it's worth adding test coverage around CreateNewDefinition now that's its doing more than it used to. Would also be nice to have makeAutofillOnChange and _getIsAutofilled tested, but also understand this is legacy code that has not been touched in a while.

Partial<LabwareFields>
> = {
tipRack: {
homogeneousWells: 'true' as const,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just read about as const, pretty cool! the idea here is that labwareTypeAutofills is readonly and cannot be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup but I did it less completely than I could. Fixed in #7814

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh it also fixes as error where 'true' by itself got inferred as string instead of BooleanString = 'true' | 'false'

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ayyoooooooo

@@ -104,8 +104,15 @@ context('File Import', () => {
cy.get("input[placeholder='testpro_15_wellplate_5ul']").should('exist')

// Test pipette
cy.contains('Select...').click({ force: true })
cy.contains('P10 Single GEN1').click({ force: true })
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof ya we should def throw in selectors


expect(getByRole('heading')).toHaveTextContent(/create a new definition/i)
expect(getByText(/what type of labware are you creating\?/i)).toBeTruthy()
expect(getByRole('button')).toHaveTextContent(/start creating labware/i)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, i will def be referring to this test the next time i use testing library!

@IanLondon IanLondon merged commit 1594984 into edge May 19, 2021
@IanLondon IanLondon deleted the lc_autofill-and-hide-homogeneous-wells-tipracks branch May 19, 2021 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants