1
- import {
2
- SetupActions ,
3
- setupFunctions ,
4
- SetupVerifications ,
5
- } from '../support/SetupSteps'
1
+ import { SetupActions , SetupVerifications } from '../support/SetupSteps'
6
2
import { UniversalActions } from '../support/universalActions'
7
3
import { ModActions , ModVerifications } from '../support/SupportModules'
8
- import { runSteps } from '../support/StepExecution'
9
- import type { StepsList } from '../support/StepExecution'
4
+ // Updated import to bring in StepListBuilder instead of StepsList
5
+ import { runSteps , StepListBuilder } from '../support/StepExecution'
10
6
11
7
describe ( 'The Redesigned Create Protocol Landing Page' , ( ) => {
12
8
beforeEach ( ( ) => {
@@ -18,89 +14,103 @@ describe('The Redesigned Create Protocol Landing Page', () => {
18
14
it ( 'content and step 1 flow works' , ( ) => {
19
15
cy . clickCreateNew ( )
20
16
cy . verifyCreateNewHeader ( )
21
- const steps : StepsList = [
22
- { step : SetupVerifications . OnStep1 } ,
23
- { step : SetupVerifications . FlexSelected } ,
24
- { step : UniversalActions . Snapshot } ,
25
- { step : SetupActions . SelectOT2 } ,
26
- { step : SetupVerifications . OT2Selected } ,
27
- { step : UniversalActions . Snapshot } ,
28
- { step : SetupActions . SelectFlex } ,
29
- { step : SetupVerifications . FlexSelected } ,
30
- { step : UniversalActions . Snapshot } ,
31
- { step : SetupActions . Confirm } ,
32
- { step : SetupVerifications . OnStep2 } ,
33
- { step : SetupActions . SingleChannelPipette50 } ,
34
- { step : SetupVerifications . StepTwo50uL } ,
35
- { step : UniversalActions . Snapshot } ,
36
- { step : SetupActions . Confirm } ,
37
- { step : SetupVerifications . StepTwoPart3 } ,
38
- { step : UniversalActions . Snapshot } ,
39
- { step : SetupActions . Confirm } ,
40
- { step : SetupVerifications . OnStep3 } ,
41
- { step : SetupActions . YesGripper } ,
42
- { step : SetupActions . Confirm } ,
43
- { step : SetupVerifications . Step4Verification } ,
44
- { step : SetupActions . AddThermocycler } ,
45
- { step : SetupVerifications . ThermocyclerImg } ,
46
- { step : SetupActions . AddHeaterShaker } ,
47
- { step : SetupVerifications . HeaterShakerImg } ,
48
- { step : SetupActions . AddMagBlock } ,
49
- { step : SetupVerifications . MagBlockImg } ,
50
- { step : SetupActions . AddTempdeck2 } ,
51
- { step : SetupVerifications . Tempdeck2Img } ,
52
- { step : SetupActions . Confirm } ,
53
- { step : SetupActions . Confirm } ,
54
- { step : SetupActions . Confirm } ,
55
- { step : SetupActions . EditProtocolA } ,
56
- { step : SetupActions . ChoseDeckSlotC2 } ,
57
- { step : SetupActions . AddHardwareLabware } ,
58
- { step : SetupActions . ClickLabwareHeader } ,
59
- { step : SetupActions . ClickWellPlatesSection } ,
60
- {
61
- step : setupFunctions . selectLabwareByDisplayName ,
62
- params : 'Bio-Rad 96 Well Plate' ,
63
- } ,
64
- { step : SetupActions . ChoseDeckSlotC2Labware } ,
65
- { step : SetupActions . AddLiquid } ,
66
- { step : SetupActions . ClickLiquidButton } ,
67
- { step : SetupActions . DefineLiquid } ,
68
- { step : SetupActions . LiquidSaveWIP } ,
69
- { step : SetupActions . WellSelector } ,
70
- { step : SetupActions . LiquidDropdown } ,
71
- { step : SetupVerifications . LiquidPage } ,
72
- { step : UniversalActions . Snapshot } ,
73
- { step : SetupActions . SelectLiquidWells } ,
74
- { step : SetupActions . SetVolumeAndSaveforWells } ,
75
- { step : SetupActions . ChoseDeckSlotC1 } ,
76
- { step : SetupActions . EditHardwareLabwareOnDeck } ,
77
- { step : SetupActions . ClickLabwareHeader } ,
78
- { step : SetupActions . AddAdapters } ,
79
- { step : SetupActions . DeepWellTempModAdapter } ,
80
- { step : SetupActions . AddNest96DeepWellPlate } ,
81
- { step : SetupActions . Done } ,
82
- { step : SetupActions . ProtocolStepsH } ,
83
- { step : SetupActions . AddStep } ,
84
- { step : ModActions . AddTemperatureStep } ,
85
- { step : ModVerifications . TempeDeckInitialForm } ,
86
- { step : UniversalActions . Snapshot } ,
87
- { step : ModActions . ActivateTempdeck } ,
88
- { step : ModActions . InputTempDeck4 } ,
89
- { step : ModActions . SaveButtonTempdeck } ,
90
- { step : ModActions . PauseAfterSettingTempdeck } ,
91
- // ModVerifications.Temp4CPauseTextVerification }
92
- { step : UniversalActions . Snapshot } ,
93
- { step : SetupActions . AddStep } ,
94
- { step : ModActions . AddTemperatureStep } ,
95
- { step : ModActions . ActivateTempdeck } ,
96
- { step : ModActions . InputTempDeck95 } ,
97
- { step : ModActions . SaveButtonTempdeck } ,
98
- { step : ModActions . PauseAfterSettingTempdeck } ,
99
- { step : SetupActions . AddStep } ,
100
- { step : ModActions . AddTemperatureStep } ,
101
- { step : ModActions . ActivateTempdeck } ,
102
- { step : ModActions . InputTempDeck100 } ,
103
- ]
17
+
18
+ const steps = new StepListBuilder ( )
19
+ // Verification steps
20
+ . addStep ( SetupVerifications . OnStep1 )
21
+ . addStep ( SetupVerifications . FlexSelected )
22
+ . addStep ( UniversalActions . Snapshot )
23
+ // Switching between OT2 and Flex
24
+ . addStep ( SetupActions . SelectOT2 )
25
+ . addStep ( SetupVerifications . OT2Selected )
26
+ . addStep ( UniversalActions . Snapshot )
27
+ . addStep ( SetupActions . SelectFlex )
28
+ . addStep ( SetupVerifications . FlexSelected )
29
+ . addStep ( UniversalActions . Snapshot )
30
+ // Confirm moves to step2
31
+ . addStep ( SetupActions . Confirm )
32
+ . addStep ( SetupVerifications . OnStep2 )
33
+ // Choose pipette
34
+ . addStep ( SetupActions . SingleChannelPipette50 )
35
+ . addStep ( SetupVerifications . StepTwo50uL )
36
+ . addStep ( UniversalActions . Snapshot )
37
+ . addStep ( SetupActions . Confirm )
38
+ . addStep ( SetupVerifications . StepTwoPart3 )
39
+ . addStep ( UniversalActions . Snapshot )
40
+ . addStep ( SetupActions . Confirm )
41
+ // Move to step3
42
+ . addStep ( SetupVerifications . OnStep3 )
43
+ . addStep ( SetupActions . YesGripper )
44
+ . addStep ( SetupActions . Confirm )
45
+ // Step4: add modules
46
+ . addStep ( SetupVerifications . Step4Verification )
47
+ . addStep ( SetupActions . AddThermocycler )
48
+ . addStep ( SetupVerifications . ThermocyclerImg )
49
+ . addStep ( SetupActions . AddHeaterShaker )
50
+ . addStep ( SetupVerifications . HeaterShakerImg )
51
+ . addStep ( SetupActions . AddMagBlock )
52
+ . addStep ( SetupVerifications . MagBlockImg )
53
+ . addStep ( SetupActions . AddTempdeck2 )
54
+ . addStep ( SetupVerifications . Tempdeck2Img )
55
+ // Confirm a few times to proceed
56
+ . addStep ( SetupActions . Confirm )
57
+ . addStep ( SetupActions . Confirm )
58
+ . addStep ( SetupActions . Confirm )
59
+ // Edit protocol, add labware
60
+ . addStep ( SetupActions . EditProtocolA )
61
+ . addStep ( SetupActions . ChoseDeckSlotC2 )
62
+ . addStep ( SetupActions . AddHardwareLabware )
63
+ . addStep ( SetupActions . ClickLabwareHeader )
64
+ . addStep ( SetupActions . ClickWellPlatesSection )
65
+ // Example function-based step with a parameter
66
+ . addStep ( SetupActions . SelectLabwareByDisplayName , 'Bio-Rad 96 Well Plate' )
67
+ . addStep ( SetupActions . ChoseDeckSlotC2Labware )
68
+ // Liquid adding steps
69
+ . addStep ( SetupActions . AddLiquid )
70
+ . addStep ( SetupActions . ClickLiquidButton )
71
+ . addStep ( SetupActions . DefineLiquid )
72
+ . addStep ( SetupActions . LiquidSaveWIP )
73
+ . addStep ( SetupActions . WellSelector , [ 'A1' , 'A2' ] )
74
+ . addStep ( SetupActions . LiquidDropdown )
75
+ . addStep ( SetupVerifications . LiquidPage )
76
+ . addStep ( UniversalActions . Snapshot )
77
+ . addStep ( SetupActions . SelectLiquidWells )
78
+ . addStep ( SetupActions . SetVolumeAndSaveforWells )
79
+ // Additional deck edits
80
+ . addStep ( SetupActions . ChoseDeckSlotC1 )
81
+ . addStep ( SetupActions . EditHardwareLabwareOnDeck )
82
+ . addStep ( SetupActions . ClickLabwareHeader )
83
+ . addStep ( SetupActions . AddAdapters )
84
+ . addStep ( SetupActions . DeepWellTempModAdapter )
85
+ . addStep ( SetupActions . AddNest96DeepWellPlate )
86
+ . addStep ( SetupActions . SelectDone )
87
+ . addStep ( SetupActions . ProtocolStepsH )
88
+ . addStep ( SetupActions . AddStep )
89
+ // Modules (temp deck) steps
90
+ . addStep ( ModActions . AddTemperatureStep )
91
+ . addStep ( ModVerifications . TempeDeckInitialForm )
92
+ . addStep ( UniversalActions . Snapshot )
93
+ . addStep ( ModActions . ActivateTempdeck )
94
+ . addStep ( ModActions . InputTempDeck4 )
95
+ . addStep ( ModActions . SaveButtonTempdeck )
96
+ . addStep ( ModActions . PauseAfterSettingTempdeck )
97
+ // Possibly verifying
98
+ // .addStep(ModVerifications.Temp4CPauseTextVerification)
99
+ . addStep ( UniversalActions . Snapshot )
100
+ // Another temperature step
101
+ . addStep ( SetupActions . AddStep )
102
+ . addStep ( ModActions . AddTemperatureStep )
103
+ . addStep ( ModActions . ActivateTempdeck )
104
+ . addStep ( ModActions . InputTempDeck95 )
105
+ . addStep ( ModActions . SaveButtonTempdeck )
106
+ . addStep ( ModActions . PauseAfterSettingTempdeck )
107
+ // Another temperature step
108
+ . addStep ( SetupActions . AddStep )
109
+ . addStep ( ModActions . AddTemperatureStep )
110
+ . addStep ( ModActions . ActivateTempdeck )
111
+ . addStep ( ModActions . InputTempDeck100 )
112
+ . build ( )
113
+
104
114
runSteps ( steps )
105
115
} )
106
116
} )
0 commit comments