Skip to content

Commit 1795ef4

Browse files
committed
now have OT-2 testing
1 parent cedf49e commit 1795ef4

File tree

2 files changed

+134
-2
lines changed

2 files changed

+134
-2
lines changed

protocol-designer/cypress/e2e/GEN2P20SignleOT2.cy.ts

Lines changed: 128 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,106 @@ describe('P20 single-channel OT-2 Transfers', () => {
7878
}
7979
}
8080

81+
// Additional transfer command
82+
83+
const GenerateMultipleTransferStepsForP300SingleChannel = (
84+
steps: StepBuilder,
85+
sourceLabware1: string,
86+
sourceLabware2: string,
87+
destinationLabware1: string,
88+
destinationLabware2: string
89+
) => {
90+
const tip: string = '300' // Fixed tip for P20
91+
const volumes: string[] = ['20', '150', '300'] // Fixed volumes for P20
92+
93+
const row: string = 'A' // Fixed row for 8-channel operation
94+
const colsLength: number = 12 // Max columns in a row (A1-A12)
95+
96+
// Define the two labware pairs for alternation
97+
const labwarePairs = [
98+
{ source: sourceLabware1, dest: destinationLabware1 }, // Pair for odd-indexed transfers
99+
{ source: sourceLabware2, dest: destinationLabware2 }, // Pair for even-indexed transfers
100+
]
101+
102+
let transferCounter = 0 // This counter will go from 0 to 11 (for 12 total transfers)
103+
104+
for (const volume of volumes) {
105+
// Determine which labware pair to use for this specific transfer
106+
// (0 for the first pair, 1 for the second, then back to 0, etc.)
107+
const currentLabwarePair = labwarePairs[transferCounter % 2]
108+
109+
// Determine the current well within the 'A' row (A1, A2, ..., A12)
110+
const colIndex = (transferCounter % colsLength) + 1
111+
const currentWell = `${row}${colIndex}`
112+
113+
// Add the transfer step
114+
steps.add(
115+
CompositeSetupSteps.Test_LC_new_rectangleOT2(
116+
// Use Test_LC (assuming it's the updated version with shape params)
117+
currentLabwarePair.source,
118+
currentWell,
119+
currentLabwarePair.dest,
120+
currentWell,
121+
volume,
122+
tip,
123+
'circle', // Assuming source wells are circles for this test
124+
'rect' // Assuming destination wells are rectangles for this test
125+
)
126+
)
127+
transferCounter++ // Increment the counter for the next transfer
128+
}
129+
}
130+
131+
const GenerateMultipleTransferStepsForP1000SingleChannel = (
132+
steps: StepBuilder,
133+
sourceLabware1: string,
134+
sourceLabware2: string,
135+
destinationLabware1: string,
136+
destinationLabware2: string
137+
) => {
138+
const tip: string = '1000' // Fixed tip for P20
139+
const volumes: string[] = ['100', '500', '1000'] // Fixed volumes for P20
140+
141+
const row: string = 'A' // Fixed row for 8-channel operation
142+
const colsLength: number = 12 // Max columns in a row (A1-A12)
143+
144+
// Define the two labware pairs for alternation
145+
const labwarePairs = [
146+
{ source: sourceLabware1, dest: destinationLabware1 }, // Pair for odd-indexed transfers
147+
{ source: sourceLabware2, dest: destinationLabware2 }, // Pair for even-indexed transfers
148+
]
149+
150+
let transferCounter = 0 // This counter will go from 0 to 11 (for 12 total transfers)
151+
152+
for (const volume of volumes) {
153+
// Determine which labware pair to use for this specific transfer
154+
// (0 for the first pair, 1 for the second, then back to 0, etc.)
155+
const currentLabwarePair = labwarePairs[transferCounter % 2]
156+
157+
// Determine the current well within the 'A' row (A1, A2, ..., A12)
158+
const colIndex = (transferCounter % colsLength) + 1
159+
const currentWell = `${row}${colIndex}`
160+
161+
// Add the transfer step
162+
steps.add(
163+
CompositeSetupSteps.Test_LC_new_rectangleOT2(
164+
// Use Test_LC (assuming it's the updated version with shape params)
165+
currentLabwarePair.source,
166+
currentWell,
167+
currentLabwarePair.dest,
168+
currentWell,
169+
volume,
170+
tip,
171+
'circle', // Assuming source wells are circles for this test
172+
'rect' // Assuming destination wells are rectangles for this test
173+
)
174+
)
175+
transferCounter++ // Increment the counter for the next transfer
176+
}
177+
}
178+
81179
it('Goes through onboarding flow and then runs multiple transfer steps with sequential well changes', () => {
180+
/*
82181
const protocol = getTestFile(TestFilePath.GEN2P20SingleOT2)
83182
cy.importProtocol(protocol.path)
84183
cy.contains('Confirm').click()
@@ -87,15 +186,42 @@ describe('P20 single-channel OT-2 Transfers', () => {
87186
cy.openSettingsPage()
88187
cy.contains('Edit protocol').click()
89188
const steps = new StepBuilder()
189+
90190
GenerateMultipleTransferStepsForP20SingleChannel(
91191
steps,
92192
'Thermo Scientific Nunc 96 Well Plate 2000 µL',
93193
'Thermo Scientific Nunc 96 Well Plate 1300 µL',
94194
'USA Scientific 96 Deep Well Plate 2.4 mL',
95195
'NEST 96 Deep Well Plate 2mL'
96196
)
97-
steps.add(SetupSteps.AddStep())
98-
steps.add(SetupSteps.TransferPopOut())
197+
steps.add(SetupSteps.ExportProtocol())
198+
*/
199+
200+
const protocol = getTestFile(TestFilePath.GEN2P300SingleOT2)
201+
cy.importProtocol(protocol.path)
202+
cy.contains('Confirm').click()
203+
cy.openSettingsPage()
204+
cy.get('[aria-label="Settings_OT_PD_ENABLE_LIQUID_CLASSES"]').click()
205+
cy.openSettingsPage()
206+
cy.contains('Edit protocol').click()
207+
const steps = new StepBuilder()
208+
209+
GenerateMultipleTransferStepsForP300SingleChannel(
210+
steps,
211+
'Thermo Scientific Nunc 96 Well Plate 2000 µL',
212+
'Thermo Scientific Nunc 96 Well Plate 1300 µL',
213+
'USA Scientific 96 Deep Well Plate 2.4 mL',
214+
'NEST 96 Deep Well Plate 2mL'
215+
)
216+
/*
217+
TestFilePath.GEN2p1000SingleOT2
218+
219+
GenerateMultipleTransferStepsForP1000SingleChannel(steps,
220+
'Thermo Scientific Nunc 96 Well Plate 2000 µL',
221+
'Thermo Scientific Nunc 96 Well Plate 1300 µL',
222+
'USA Scientific 96 Deep Well Plate 2.4 mL',
223+
'NEST 96 Deep Well Plate 2mL')
224+
*/
99225

100226
// Add the multiple transfer steps using the custom function with sequential wells
101227

protocol-designer/cypress/support/SetupSteps.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ export const SetupSteps = {
255255
},
256256
}),
257257

258+
ExportProtocol: (): StepThunk => ({
259+
call: () => {
260+
cy.contains('Export')
261+
},
262+
}),
263+
258264
/**
259265
* Selects a specific tip rack by name.
260266
* @param tip The tip rack name or part of it (e.g., '50' for 'Tip Rack 50 µL').

0 commit comments

Comments
 (0)