Skip to content

Commit

Permalink
Fixed temperature module and removed verifications exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjoel42 committed Jan 24, 2025
1 parent 5385e9d commit 7a5cda0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 98 deletions.
155 changes: 76 additions & 79 deletions protocol-designer/cypress/e2e/ProtocolDesignerModulesTest.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Actions, Verifications, runCreateTest } from '../support/SetupSteps'
import { SetupActions, SetupVerifications } from '../support/SetupSteps'
import { UniversalActions } from '../support/universalActions'

import {type Actions as ModActions, type ModVerifications as ModVerifications} from '../support/SupportModules'
import { ModActions, ModVerifications } from '../support/SupportModules'
import { runSteps, type StepsList } from '../support/StepExecution'

describe('The Redesigned Create Protocol Landing Page', () => {
beforeEach(() => {
Expand All @@ -13,92 +13,89 @@ describe('The Redesigned Create Protocol Landing Page', () => {
it('content and step 1 flow works', () => {
cy.clickCreateNew()
cy.verifyCreateNewHeader()
const steps: Array<
Actions | Verifications | UniversalActions | ModActions | ModVerifications> = [
Verifications.OnStep1,
Verifications.FlexSelected,
const steps: StepsList = [
SetupVerifications.OnStep1,
SetupVerifications.FlexSelected,
UniversalActions.Snapshot,
Actions.SelectOT2,
Verifications.OT2Selected,
SetupActions.SelectOT2,
SetupVerifications.OT2Selected,
UniversalActions.Snapshot,
Actions.SelectFlex,
Verifications.FlexSelected,
SetupActions.SelectFlex,
SetupVerifications.FlexSelected,
UniversalActions.Snapshot,
Actions.Confirm,
Verifications.OnStep2,
Actions.SingleChannelPipette50,
Verifications.StepTwo50uL,
SetupActions.Confirm,
SetupVerifications.OnStep2,
SetupActions.SingleChannelPipette50,
SetupVerifications.StepTwo50uL,
UniversalActions.Snapshot,
Actions.Confirm,
Verifications.StepTwoPart3,
SetupActions.Confirm,
SetupVerifications.StepTwoPart3,
UniversalActions.Snapshot,
Actions.Confirm,
Verifications.OnStep3,
Actions.YesGripper,
Actions.Confirm,
Verifications.Step4Verification,
Actions.AddThermocycler,
Verifications.ThermocyclerImg,
Actions.AddHeaterShaker,
Verifications.HeaterShakerImg,
Actions.AddMagBlock,
Verifications.MagBlockImg,
Actions.AddTempdeck2,
Verifications.Tempdeck2Img,
Actions.Confirm,
Actions.Confirm,
Actions.Confirm,
Actions.EditProtocolA,
Actions.ChoseDeckSlotC2,
Actions.AddHardwareLabware,
Actions.ClickLabwareHeader,
Actions.ClickWellPlatesSection,
Actions.SelectArmadillo96WellPlate,
Actions.ChoseDeckSlotC2Labware,
Actions.AddLiquid,
Actions.ClickLiquidButton,
Actions.DefineLiquid,
Actions.LiquidSaveWIP,
Actions.WellSelector,
Actions.LiquidDropdown,
Verifications.LiquidPage,
SetupActions.Confirm,
SetupVerifications.OnStep3,
SetupActions.YesGripper,
SetupActions.Confirm,
SetupVerifications.Step4Verification,
SetupActions.AddThermocycler,
SetupVerifications.ThermocyclerImg,
SetupActions.AddHeaterShaker,
SetupVerifications.HeaterShakerImg,
SetupActions.AddMagBlock,
SetupVerifications.MagBlockImg,
SetupActions.AddTempdeck2,
SetupVerifications.Tempdeck2Img,
SetupActions.Confirm,
SetupActions.Confirm,
SetupActions.Confirm,
SetupActions.EditProtocolA,
SetupActions.ChoseDeckSlotC2,
SetupActions.AddHardwareLabware,
SetupActions.ClickLabwareHeader,
SetupActions.ClickWellPlatesSection,
SetupActions.SelectArmadillo96WellPlate,
SetupActions.ChoseDeckSlotC2Labware,
SetupActions.AddLiquid,
SetupActions.ClickLiquidButton,
SetupActions.DefineLiquid,
SetupActions.LiquidSaveWIP,
SetupActions.WellSelector,
SetupActions.LiquidDropdown,
SetupVerifications.LiquidPage,
UniversalActions.Snapshot,
Actions.SelectLiquidWells,
Actions.SetVolumeAndSaveforWells,
Actions.ChoseDeckSlotC1,
Actions.EditHardwareLabwareOnDeck,
Actions.ClickLabwareHeader,
Actions.AddAdapters,
Actions.DeepWellTempModAdapter,
Actions.AddNest96DeepWellPlate,
Actions.Done,
Actions.ProtocolStepsH,
Actions.AddStep,
/*
SetupActions.SelectLiquidWells,
SetupActions.SetVolumeAndSaveforWells,
SetupActions.ChoseDeckSlotC1,
SetupActions.EditHardwareLabwareOnDeck,
SetupActions.ClickLabwareHeader,
SetupActions.AddAdapters,
SetupActions.DeepWellTempModAdapter,
SetupActions.AddNest96DeepWellPlate,
SetupActions.Done,
SetupActions.ProtocolStepsH,
SetupActions.AddStep,
ModActions.AddTemperatureStep,
ModVerifications.TempeDeckInitialForm,
UniversalActions.Snapshot,
Actions.ActivateTempdeck,
Actions.InputTempDeck4,
Actions.SaveButtonTempdeck,
Actions.PauseAfterSettingTempdeck,
Verifications.Temp4CPauseTextVerification,
ModActions.ActivateTempdeck,

ModActions.InputTempDeck4,
ModActions.SaveButtonTempdeck,
ModActions.PauseAfterSettingTempdeck,
// ModVerifications.Temp4CPauseTextVerification,
UniversalActions.Snapshot,
Actions.AddStep,
Actions.AddTemperatureStep,
Actions.ActivateTempdeck,
Actions.InputTempDeck95,
Actions.SaveButtonTempdeck,
Actions.PauseAfterSettingTempdeck,
Actions.AddStep,
Actions.AddTemperatureStep,
Actions.ActivateTempdeck,
Actions.InputTempDeck100,
*/
]
runCreateTest(steps)
})

SetupActions.AddStep,
ModActions.AddTemperatureStep,
ModActions.ActivateTempdeck,
ModActions.InputTempDeck95,
ModActions.SaveButtonTempdeck,
ModActions.PauseAfterSettingTempdeck,
SetupActions.AddStep,
ModActions.AddTemperatureStep,
ModActions.ActivateTempdeck,
ModActions.InputTempDeck100,


]
runSteps(steps)
})
})
6 changes: 1 addition & 5 deletions protocol-designer/cypress/support/SetupSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export enum SetupContent {
ProtocolSteps = 'Protocol steps',
AddStep = 'Add Step',
NestDeepWell = 'NEST 96 Deep Well Plate 2mL',
Save = 'Save',
}

export enum SetupLocators {
Expand Down Expand Up @@ -511,11 +512,6 @@ export const executeVerificationStep = (
cy.contains('Tip handling')
cy.contains('Tip drop location')
break

default:
throw new Error(
`Unrecognized verification: ${verification as SetupVerifications}`
)
}
}

Expand Down
10 changes: 1 addition & 9 deletions protocol-designer/cypress/support/StepExecution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@ export type StepsList = Array<
| ModVerifications
>

export const runSteps = (
steps: Array<
| SetupActions
| SetupVerifications
| ModActions
| ModVerifications
| UniversalActions
>
): void => {
export const runSteps = (steps: StepsList): void => {
const enumsToCheck = [
SetupActions,
ModActions,
Expand Down
5 changes: 0 additions & 5 deletions protocol-designer/cypress/support/SupportModules.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isEnumValue } from './utils'
import '../support/commands'
// ToDo Future planning should have Step 5, Step 6, and 7 verification
// Todo ProtocolOverview page. This might change from deck map revamp,
Expand Down Expand Up @@ -181,9 +180,5 @@ export const executeVerifyModStep = (verification: ModVerifications): void => {
.find('[data-testid="Tag_default"]')
.should('contain', '4°C')
break
default:
throw new Error(
`Unrecognized verification: ${verification as ModVerifications}`
)
}
}

0 comments on commit 7a5cda0

Please sign in to comment.