Skip to content

Commit

Permalink
fix(protocol-designer): fix small DQA bugs (#17228)
Browse files Browse the repository at this point in the history
Fixes 3 small style bugs for 1) copy for importing a protocol on PD
landing page, 2) background color of selected off deck location, and 3)
height of divider in liquid overflow menu

Closes RQA-3646, Closes RQA-3672, Closes RQA-3683
  • Loading branch information
ncdiehl11 authored Jan 9, 2025
1 parent 784c622 commit 7f3376c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions protocol-designer/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const locators = {
import: 'Import',
createNew: 'Create new',
createProtocol: 'Create a protocol',
editProtocol: 'Edit existing protocol',
importProtocol: 'Import existing protocol',
settingsDataTestid: 'SettingsIconButton',
settings: 'Settings',
privacyPolicy: 'a[href="https://opentrons.com/privacy-policy"]',
Expand Down Expand Up @@ -103,7 +103,7 @@ Cypress.Commands.add('verifyCreateNewHeader', () => {
Cypress.Commands.add('verifyHomePage', () => {
cy.contains(content.welcome)
cy.contains('button', locators.createProtocol).should('be.visible')
cy.contains('label', locators.editProtocol).should('be.visible')
cy.contains('label', locators.importProtocol).should('be.visible')
cy.getByTestId(locators.settingsDataTestid).should('be.visible')
cy.get(locators.privacyPolicy).should('exist').and('be.visible')
cy.get(locators.eula).should('exist').and('be.visible')
Expand Down
1 change: 1 addition & 0 deletions protocol-designer/src/assets/localization/en/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"heatershakermoduletype": "Heater-shaker Module",
"hints": "Hints",
"import": "Import",
"import_existing_protocol": "Import existing protocol",
"incorrect_file_header": "Invalid file type",
"incorrect_file_type_body": "Protocol Designer only accepts JSON protocol files created with Protocol Designer. Upload a valid file to continue.",
"invalid_json_file_body": "This JSON file is either missing required information or contains sections that Protocol Designer cannot read. At this time we do not support JSON files created outside of Protocol Designer.",
Expand Down
4 changes: 2 additions & 2 deletions protocol-designer/src/pages/Designer/LiquidsOverflowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { useLocation } from 'react-router-dom'
import {
ALIGN_CENTER,
BORDERS,
Box,
COLORS,
CURSOR_POINTER,
DIRECTION_COLUMN,
Divider,
Flex,
Icon,
LiquidIcon,
Expand Down Expand Up @@ -92,7 +92,7 @@ export function LiquidsOverflowMenu(
)
})}
{liquids.length > 0 ? (
<Box width="100%" border={`1px solid ${COLORS.grey20}`} />
<Divider color={COLORS.grey20} marginY="0" />
) : null}
<MenuItem
data-testid="defineLiquid"
Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/src/pages/Designer/Offdeck/Offdeck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function OffDeck(props: DeckSetupTabType): JSX.Element {
justifyContent={JUSTIFY_CENTER}
alignItems={ALIGN_CENTER}
borderRadius={BORDERS.borderRadius8}
backgroundColor={COLORS.grey20}
backgroundColor={COLORS.white}
>
<Flex
padding={SPACING.spacing60}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Landing', () => {
)
fireEvent.click(screen.getByRole('button', { name: 'Create a protocol' }))
expect(vi.mocked(toggleNewProtocolModal)).toHaveBeenCalled()
screen.getByText('Edit existing protocol')
screen.getByText('Import existing protocol')
screen.getByRole('img', { name: 'welcome image' })
})

Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/src/pages/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function Landing(): JSX.Element {
<StyledLabel>
<Flex css={LINK_BUTTON_STYLE}>
<StyledText desktopStyle="bodyLargeRegular">
{t('edit_existing')}
{t('import_existing_protocol')}
</StyledText>
</Flex>
<input type="file" onChange={loadFile} />
Expand Down

0 comments on commit 7f3376c

Please sign in to comment.