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): use "tube" not "well" for x/y errors #8150

Merged
merged 1 commit into from
Jul 22, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ context('Reservoirs', () => {
cy.contains('close').click({ force: true })

// Brand info
cy.contains('Brand is required').should('exist')
cy.contains('Brand is a required field').should('exist')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDK why before brand's error was "___ is required" and every other field's required error was "___ is a required field" 🤷

cy.get("input[name='brand']").type('TestPro')
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')
cy.get("input[name='brandId']").type('001')

// File info
Expand All @@ -226,7 +226,7 @@ context('Reservoirs', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -236,7 +236,7 @@ context('Reservoirs', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ describe('Create a Tip Rack', () => {
// verify that fit is required
cy.get('#HandPlacedTipFit input').first().click()
cy.get('#HandPlacedTipFit p').first().click()
cy.get('#HandPlacedTipFit span').contains('Fit is required').should('exist')
cy.get('#HandPlacedTipFit span')
.contains('Fit is a required field')
.should('exist')

// verify that loose option is selected
cy.get('#HandPlacedTipFit input')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ context('Tubes and Block', () => {
cy.get("input[name='wellXDimension']").should('exist')
cy.get("input[name='wellYDimension']").should('exist')
cy.get("input[name='wellXDimension']").focus().blur()
cy.contains('Well X is a required field').should('exist')
cy.contains('Tube X is a required field').should('exist')
cy.get("input[name='wellXDimension']").type('10').blur()
cy.contains('Well X is a required field').should('not.exist')
cy.contains('Tube X is a required field').should('not.exist')
cy.get("input[name='wellYDimension']").focus().blur()
cy.contains('Well Y is a required field').should('exist')
cy.contains('Tube Y is a required field').should('exist')
cy.get("input[name='wellYDimension']").type('10').blur()
cy.contains('Well Y is a required field').should('not.exist')
cy.contains('Tube Y is a required field').should('not.exist')
})

it('tests well bottom shape and depth', () => {
Expand Down Expand Up @@ -158,9 +158,9 @@ context('Tubes and Block', () => {
cy.contains('close').click({ force: true })

// Brand info
cy.contains('Brand is required').should('exist')
cy.contains('Brand is a required field').should('exist')
cy.get("input[name='brand']").type('TestPro')
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')
cy.get("input[name='brandId']").type('001')

// File info
Expand All @@ -172,7 +172,7 @@ context('Tubes and Block', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -182,7 +182,7 @@ context('Tubes and Block', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down Expand Up @@ -298,13 +298,13 @@ context('Tubes and Block', () => {
cy.get("input[name='wellXDimension']").should('exist')
cy.get("input[name='wellYDimension']").should('exist')
cy.get("input[name='wellXDimension']").focus().blur()
cy.contains('Well X is a required field').should('exist')
cy.contains('Tube X is a required field').should('exist')
cy.get("input[name='wellXDimension']").type('10').blur()
cy.contains('Well X is a required field').should('not.exist')
cy.contains('Tube X is a required field').should('not.exist')
cy.get("input[name='wellYDimension']").focus().blur()
cy.contains('Well Y is a required field').should('exist')
cy.contains('Tube Y is a required field').should('exist')
cy.get("input[name='wellYDimension']").type('10').blur()
cy.contains('Well Y is a required field').should('not.exist')
cy.contains('Tube Y is a required field').should('not.exist')
})

it('tests well bottom shape and depth', () => {
Expand Down Expand Up @@ -347,9 +347,9 @@ context('Tubes and Block', () => {
cy.contains('close').click({ force: true })

// Brand info
cy.contains('Brand is required').should('exist')
cy.contains('Brand is a required field').should('exist')
cy.get("input[name='brand']").type('TestPro')
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')
cy.get("input[name='brandId']").type('001')

// File info
Expand All @@ -361,7 +361,7 @@ context('Tubes and Block', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -371,7 +371,7 @@ context('Tubes and Block', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down Expand Up @@ -536,9 +536,9 @@ context('Tubes and Block', () => {
cy.contains('close').click({ force: true })

// Brand info
cy.contains('Brand is required').should('exist')
cy.contains('Brand is a required field').should('exist')
cy.get("input[name='brand']").type('TestPro')
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')
cy.get("input[name='brandId']").type('001')

// File info
Expand All @@ -550,7 +550,7 @@ context('Tubes and Block', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -560,7 +560,7 @@ context('Tubes and Block', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down Expand Up @@ -721,9 +721,9 @@ context('Tubes and Block', () => {
cy.contains('close').click({ force: true })

// Brand info
cy.contains('Brand is required').should('exist')
cy.contains('Brand is a required field').should('exist')
cy.get("input[name='brand']").type('TestPro')
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')
cy.get("input[name='brandId']").type('001')

// File info
Expand All @@ -735,7 +735,7 @@ context('Tubes and Block', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -745,7 +745,7 @@ context('Tubes and Block', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ context('Tubes and Rack', () => {
cy.get("input[name='wellXDimension']").should('exist')
cy.get("input[name='wellYDimension']").should('exist')
cy.get("input[name='wellXDimension']").focus().blur()
cy.contains('Well X is a required field').should('exist')
cy.contains('Tube X is a required field').should('exist')
cy.get("input[name='wellXDimension']").type('10').blur()
cy.contains('Well X is a required field').should('not.exist')
cy.contains('Tube X is a required field').should('not.exist')
cy.get("input[name='wellYDimension']").focus().blur()
cy.contains('Well Y is a required field').should('exist')
cy.contains('Tube Y is a required field').should('exist')
cy.get("input[name='wellYDimension']").type('10').blur()
cy.contains('Well Y is a required field').should('not.exist')
cy.contains('Tube Y is a required field').should('not.exist')
})

it('tests well bottom shape and depth', () => {
Expand Down Expand Up @@ -146,7 +146,7 @@ context('Tubes and Rack', () => {
cy.contains('close').click({ force: true })

// Brand field should not be shown for Opentrons tube rack (aka non-custom)
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')

// File info
cy.get(
Expand All @@ -155,7 +155,7 @@ context('Tubes and Rack', () => {
cy.get("input[placeholder='opentrons_6_tuberack_10ul']").should('exist')

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -165,7 +165,7 @@ context('Tubes and Rack', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down Expand Up @@ -271,13 +271,13 @@ context('Tubes and Rack', () => {
cy.get("input[name='wellXDimension']").should('exist')
cy.get("input[name='wellYDimension']").should('exist')
cy.get("input[name='wellXDimension']").focus().blur()
cy.contains('Well X is a required field').should('exist')
cy.contains('Tube X is a required field').should('exist')
cy.get("input[name='wellXDimension']").type('10').blur()
cy.contains('Well X is a required field').should('not.exist')
cy.contains('Tube X is a required field').should('not.exist')
cy.get("input[name='wellYDimension']").focus().blur()
cy.contains('Well Y is a required field').should('exist')
cy.contains('Tube Y is a required field').should('exist')
cy.get("input[name='wellYDimension']").type('10').blur()
cy.contains('Well Y is a required field').should('not.exist')
cy.contains('Tube Y is a required field').should('not.exist')
})

it('tests well bottom shape and depth', () => {
Expand Down Expand Up @@ -320,7 +320,7 @@ context('Tubes and Rack', () => {
cy.contains('close').click({ force: true })

// Brand field should not be shown for Opentrons tube rack (aka non-custom)
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')

// File info
cy.get(
Expand All @@ -331,7 +331,7 @@ context('Tubes and Rack', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -341,7 +341,7 @@ context('Tubes and Rack', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down Expand Up @@ -447,13 +447,13 @@ context('Tubes and Rack', () => {
cy.get("input[name='wellXDimension']").should('exist')
cy.get("input[name='wellYDimension']").should('exist')
cy.get("input[name='wellXDimension']").focus().blur()
cy.contains('Well X is a required field').should('exist')
cy.contains('Tube X is a required field').should('exist')
cy.get("input[name='wellXDimension']").type('10').blur()
cy.contains('Well X is a required field').should('not.exist')
cy.contains('Tube X is a required field').should('not.exist')
cy.get("input[name='wellYDimension']").focus().blur()
cy.contains('Well Y is a required field').should('exist')
cy.contains('Tube Y is a required field').should('exist')
cy.get("input[name='wellYDimension']").type('10').blur()
cy.contains('Well Y is a required field').should('not.exist')
cy.contains('Tube Y is a required field').should('not.exist')
})

it('tests well bottom shape and depth', () => {
Expand Down Expand Up @@ -496,7 +496,7 @@ context('Tubes and Rack', () => {
cy.contains('close').click({ force: true })

// Brand field should not be shown for Opentrons tube rack (aka non-custom)
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')

// File info
cy.get(
Expand All @@ -507,7 +507,7 @@ context('Tubes and Rack', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -517,7 +517,7 @@ context('Tubes and Rack', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ context('Well Plates', () => {
cy.contains('close').click({ force: true })

// Brand info
cy.contains('Brand is required').should('exist')
cy.contains('Brand is a required field').should('exist')
cy.get("input[name='brand']").type('TestPro')
cy.contains('Brand is required').should('not.exist')
cy.contains('Brand is a required field').should('not.exist')
cy.get("input[name='brandId']").type('001')

// File info
Expand All @@ -245,7 +245,7 @@ context('Well Plates', () => {
)

// Test pipette
cy.contains('Test Pipette is required').should('exist')
cy.contains('Test Pipette is a required field').should('exist')
// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Test Pipette')
Expand All @@ -255,7 +255,7 @@ context('Well Plates', () => {
cy.get('*[class^="Dropdown__option_label"]')
.contains(/P10.*Single-Channel.*GEN1/)
.click()
cy.contains('Test Pipette is required').should('not.exist')
cy.contains('Test Pipette is a required field').should('not.exist')

// All fields present
cy.get('button[class*="_export_button_"]').click({ force: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const HeightGuidingText = (props: {
<p>
Reference{' '}
<strong>from the top of the tube to bottom of the rack.</strong>{' '}
Include any well lip. Exclude any cover or cap.
Include any tube lip. Exclude any cover or cap.
</p>
{footer}
</>
Expand Down
Loading