-
Notifications
You must be signed in to change notification settings - Fork 175
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(app): usb connection and moam modal functionality in module setup #8257
Changes from 34 commits
c6b2b14
eaf9892
fd5e406
1e2f00d
dc80ed7
090ce8d
6441bdb
296ba27
25c156a
472558b
b9b783d
88e4e9b
aa0a4ff
8875e36
522e112
c5e984a
866799b
1d9bfcb
fb91ff7
5daa14c
b8496f5
9e35078
2942f2f
377d8b3
e04e11d
eec117d
d0b08a8
d21e5cc
111e4af
9263ca3
a26d83c
a02cd01
133bde6
2c3581f
a52334c
dc64a67
52696fe
7109e2f
e8334fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"multiple_modules_help_link_title": "Multiple Modules Help", | ||
"multiple_modules_modal_title": "Multiple Modules Help", | ||
"labware_help_example": "<block>Alice is using a labware in Slot 6. During labware position check, she adjust the pipette position while checking the A1 of the labware to 0.2mm in X, and 1.2mm in Z. Later, Bob is preparing to run the same protocol on that robot. The labware offset that Alice created in Slot 6 will be applied for Bob’s protocol unless he changes or clears it.</block>", | ||
"multiple_modules_explanation": "<block>To use multiples of a module in one protocol, you need to plug in the module that's in the lowest numbered deck slot in the lowest numbered USB port on the OT-2.</block> <block>Currently, you can use multiple Magnetic Modules or multiple Temperature Modules. You won't be able to load multiple Thermocycler Modules. <a_how_to_multiple_modules>Learn more about how to use multiples of a module </a_how_to_best_practices> </block>", | ||
"multiple_modules_explanation": "<block>To use multiples of a module in one protocol, you need to plug in the module that’s in the lowest numbered deck slot in the lowest numbered USB port on the OT-2.</block> <block>Currently, you can use multiple Magnetic Modules or multiple Temperature Modules. You won’t be able to load multiple Thermocycler Modules.<a_how_to_multiple_modules>Learn more about how to use multiples of a module </a_how_to_best_practices> </block>", | ||
"multiple_modules_example": "Your protocol has 2 Temperature Modules. The Temperature Module attached to the first port starting from the left will be related to the first Temperature Module in your protocol while the second Temperature Module loaded would be related to the Temperature Module connected to the next port to the right. If using a hub, follow the same logic with the port ordered.", | ||
"offset_title": "Offset", | ||
"labware_position_check_text": "Labware Position Check is an optional workflow that guides you through checking the position of each labware on the deck. During this check, you can make an offset adjustment to the overall position of the labware.", | ||
|
@@ -25,8 +25,10 @@ | |
"calibrate_now_cta": "Calibrate Now", | ||
"deck_calibration_title": "Deck Calibration", | ||
"last_calibrated": "Last calibrated: {{date}}", | ||
"module_setup_step_description": "Plug in and power up the required module(s) via the OT-2 USB Port(s). Place the module(s) as shown in the deck map.", | ||
"module_setup_step_description": "Plug in and power up the required module via the OT-2 USB Port. Place the module as shown in the deck map.", | ||
"modules_setup_step_description": "Plug in and power up the required modules via the OT-2 USB Ports. Place the modules as shown in the deck map.", | ||
"module_setup_step_title": "Module Setup", | ||
"modules_setup_step_title": "Module Setup", | ||
"mount_title": "{{mount}} MOUNT:", | ||
"not_calibrated": "Not calibrated yet", | ||
"proceed_to_labware_setup_step": "Proceed to Labware Setup", | ||
|
@@ -39,5 +41,9 @@ | |
"setup_for_run": "Setup for Run", | ||
"step": "STEP {{index}}", | ||
"module_not_connected": "Not Connected", | ||
"no_usb_port_yet": "No USB Port Yet" | ||
"module_connected": "Connected", | ||
"no_usb_port_yet": "No USB Port Yet", | ||
"usb_port_connected": "USB Port", | ||
"hub_connected": "via hub", | ||
"usb_port_connected_old": "USB Port Connected" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If your robot server version is below 4.3, the usb and hub ports don't have a string (I double checked with my robot when it was version 4.0). So There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe making this title more descriptive, something like |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from 'react' | ||
import '@testing-library/jest-dom' | ||
import { ModuleModel, ModuleRealType } from '@opentrons/shared-data' | ||
import { ModuleInfo } from '../ModuleInfo' | ||
import { renderWithProviders } from '@opentrons/components/__utils__' | ||
import { i18n } from '../../../../../i18n' | ||
|
||
const render = (props: React.ComponentProps<typeof ModuleInfo>) => { | ||
return renderWithProviders(<ModuleInfo {...props} />, { | ||
i18nInstance: i18n, | ||
}) | ||
} | ||
const STUBBED_ORIENTATION_VALUE = 'left' | ||
const mockTCModule = { | ||
labwareOffset: { x: 3, y: 3, z: 3 }, | ||
moduleId: 'TCModuleId', | ||
model: 'thermocyclerModuleV1' as ModuleModel, | ||
type: 'thermocyclerModuleType' as ModuleRealType, | ||
} | ||
|
||
describe('ModuleInfo', () => { | ||
let props: React.ComponentProps<typeof ModuleInfo> | ||
beforeEach(() => { | ||
props = { | ||
x: mockTCModule.labwareOffset.x, | ||
y: mockTCModule.labwareOffset.y, | ||
orientation: STUBBED_ORIENTATION_VALUE, | ||
moduleModel: mockTCModule.model, | ||
isAttached: false, | ||
usbPort: null, | ||
hubPort: null, | ||
} | ||
}) | ||
|
||
it('should show module not connected', () => { | ||
const { getByText } = render(props) | ||
expect(getByText('Not Connected')).toBeTruthy() | ||
}) | ||
|
||
it('should show module connected and hub number', () => { | ||
props = { ...props, usbPort: '1', hubPort: '1', isAttached: true } | ||
const { getByText } = render(props) | ||
expect(getByText('Connected')).toBeTruthy() | ||
expect(getByText('USB Port 1 via hub')).toBeTruthy() | ||
}) | ||
|
||
it('should show module connected and no USB number', () => { | ||
props = { ...props, usbPort: null, hubPort: null, isAttached: true } | ||
const { getByText } = render(props) | ||
expect(getByText('Connected')).toBeTruthy() | ||
expect(getByText('USB Port Connected')).toBeTruthy() | ||
}) | ||
|
||
it('should show module connected and USB number', () => { | ||
props = { ...props, usbPort: '1', hubPort: null, isAttached: true } | ||
const { getByText } = render(props) | ||
expect(getByText('Connected')).toBeTruthy() | ||
expect(getByText('USB Port 1')).toBeTruthy() | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need both of these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the extra is needed to pluralize, i18n can handle that for us i think: https://www.i18next.com/translation-function/plurals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something that Emily wanted to implement. She mentioned it in a comment on my last PR #8224