Skip to content

Commit 68263e5

Browse files
y3rshskowalski08
andauthored
test(pd): add e2e thermocycler module test (#17825)
Co-authored-by: Sara Kowalski <[email protected]>
1 parent a9c1a6d commit 68263e5

File tree

6 files changed

+824
-0
lines changed

6 files changed

+824
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
import {
2+
ThermocyclerEditor,
3+
ThermoProfile,
4+
ThermoProfileSteps,
5+
ThermoState,
6+
ThermoVerifications,
7+
} from '../support/Thermocycler'
8+
import { TestFilePath, getTestFile } from '../support/TestFiles'
9+
import { verifyImportProtocolPage } from '../support/Import'
10+
import { StepBuilder } from '../support/StepBuilder'
11+
import { TimelineSteps } from '../support/Timeline'
12+
13+
describe('Redesigned Thermocycler Set Up Steps - Happy Path', () => {
14+
beforeEach(() => {
15+
cy.visit('/')
16+
cy.closeAnalyticsModal()
17+
cy.closeReleaseNotesModal()
18+
const protocol = getTestFile(TestFilePath.DoItAllV8)
19+
cy.importProtocol(protocol.path)
20+
verifyImportProtocolPage(protocol)
21+
cy.contains('Edit protocol').click()
22+
cy.contains('Protocol steps').click()
23+
})
24+
25+
it('It should verify the working function of thermocycler set up', () => {
26+
const steps = new StepBuilder()
27+
steps.add(
28+
TimelineSteps.SelectItemMenuOption('1. Thermocycler', 'Edit step')
29+
)
30+
steps.add(ThermoVerifications.VerifyPartOne())
31+
steps.add(ThermocyclerEditor.SelectProfileOrState('state'))
32+
steps.add(ThermoVerifications.VerifyThermoState())
33+
steps.add(ThermocyclerEditor.BlockTempOnOff('active'))
34+
steps.add(ThermoState.BlockTempInput('99'))
35+
steps.add(ThermocyclerEditor.BlockTempOnOff('deactivate'))
36+
steps.add(ThermocyclerEditor.BlockTempOnOff('active'))
37+
steps.add(ThermoState.BlockTempInput('15'))
38+
steps.add(ThermocyclerEditor.LidTempOnOff('active'))
39+
steps.add(ThermoState.LidTempInput('37'))
40+
steps.add(ThermocyclerEditor.LidTempOnOff('deactivate'))
41+
steps.add(ThermocyclerEditor.LidTempOnOff('active'))
42+
steps.add(ThermoState.LidTempInput('110'))
43+
steps.add(ThermocyclerEditor.LidOpenClosed('closed'))
44+
steps.add(ThermocyclerEditor.LidOpenClosed('open'))
45+
steps.add(ThermocyclerEditor.LidOpenClosed('closed'))
46+
steps.add(ThermocyclerEditor.BackButton())
47+
steps.add(ThermocyclerEditor.SelectProfileOrState('state'))
48+
steps.add(ThermoVerifications.VerifyOptionsPersist('state'))
49+
steps.add(ThermocyclerEditor.BackButton())
50+
steps.add(ThermocyclerEditor.SelectProfileOrState('profile'))
51+
steps.add(ThermoVerifications.VerifyThermoProfile())
52+
steps.add(ThermoProfile.WellVolumeInput('99'))
53+
steps.add(ThermoProfile.LidTempInput('40'))
54+
steps.add(ThermocyclerEditor.BlockTempOnOff('active'))
55+
steps.add(ThermoProfile.BlockTempHoldInput('90'))
56+
steps.add(ThermocyclerEditor.LidTempOnOff('active'))
57+
steps.add(ThermoProfile.LidTempHoldInput('40'))
58+
steps.add(ThermocyclerEditor.LidOpenClosed('open'))
59+
steps.add(ThermocyclerEditor.BackButton())
60+
steps.add(ThermocyclerEditor.SelectProfileOrState('profile'))
61+
steps.add(ThermoVerifications.VerifyOptionsPersist('profile'))
62+
steps.add(ThermoVerifications.VerifyProfileSteps())
63+
steps.add(ThermoProfileSteps.AddCycle())
64+
steps.add(ThermoProfileSteps.DeleteCycle(0))
65+
steps.add(ThermoProfileSteps.AddCycle())
66+
steps.add(ThermoProfileSteps.SetCycleCount(0, '3'))
67+
steps.add(ThermoProfileSteps.AddCycleStep(0))
68+
steps.add(
69+
ThermoProfileSteps.FillCycleStep({
70+
cycle: 0,
71+
step: 0,
72+
stepName: 'cycle test 1',
73+
temp: '50',
74+
time: '05:00',
75+
})
76+
)
77+
steps.add(ThermoProfileSteps.AddCycleStep(0))
78+
steps.add(
79+
ThermoProfileSteps.FillCycleStep({
80+
cycle: 0,
81+
step: 1,
82+
stepName: 'cycle test 2',
83+
temp: '45',
84+
time: '05:55',
85+
})
86+
)
87+
steps.add(ThermoProfileSteps.AddCycleStep(0))
88+
steps.add(ThermoProfileSteps.DeleteCycleStep(0, 2))
89+
steps.add(ThermoProfileSteps.AddCycleStep(0))
90+
steps.add(
91+
ThermoProfileSteps.FillCycleStep({
92+
cycle: 0,
93+
step: 2,
94+
stepName: 'cycle test 3',
95+
temp: '35',
96+
time: '03:33',
97+
})
98+
)
99+
steps.add(ThermoProfileSteps.SaveCycle(0))
100+
steps.add(ThermoProfileSteps.AddStep())
101+
steps.add(
102+
ThermoProfileSteps.FillThermocyclerStep({
103+
step: 0,
104+
stepName: 'Thermocycler Step 1',
105+
temp: '30',
106+
time: '03:01',
107+
})
108+
)
109+
steps.add(ThermoProfileSteps.DeleteThermocyclerStep(0))
110+
steps.add(ThermoProfileSteps.AddStep())
111+
steps.add(
112+
ThermoProfileSteps.FillThermocyclerStep({
113+
step: 0,
114+
stepName: 'Thermocycler step 2',
115+
temp: '25',
116+
time: '02:02',
117+
})
118+
)
119+
steps.add(ThermoProfileSteps.SaveThermocyclerStep(0))
120+
steps.add(ThermoProfileSteps.AddStep())
121+
steps.add(
122+
ThermoProfileSteps.FillThermocyclerStep({
123+
step: 1,
124+
stepName: 'Thermocycler Step 3',
125+
temp: '49',
126+
time: '01:59',
127+
})
128+
)
129+
steps.add(ThermoProfileSteps.SaveThermocyclerStep(1))
130+
steps.add(ThermocyclerEditor.SaveProfileSteps())
131+
steps.add(ThermocyclerEditor.SaveButton())
132+
steps.execute()
133+
})
134+
})

0 commit comments

Comments
 (0)