@ministryofjustice/hmpps-probation-integration-e2e-tests 1.130.0 → 1.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ministryofjustice/hmpps-probation-integration-e2e-tests",
|
|
3
3
|
"description": "Playwright end to end tests for hmpps-probation-integration-services.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.131.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -28,37 +28,37 @@ async function submitCAS3Referral(page, crn) {
|
|
|
28
28
|
}
|
|
29
29
|
async function startApplication(page) {
|
|
30
30
|
await page.getByRole("button", { name: "Start now" }).click();
|
|
31
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
31
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
32
32
|
await page.getByRole("button", { name: "Start now" }).click();
|
|
33
33
|
}
|
|
34
34
|
async function searchForPerson(page, crn) {
|
|
35
35
|
await page.getByLabel("Enter the person's CRN").fill(crn);
|
|
36
36
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
37
|
-
await expect(page).toHaveTitle("Confirm the person's details -
|
|
37
|
+
await expect(page).toHaveTitle("Confirm the person's details - CAS3");
|
|
38
38
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
39
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
39
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
40
40
|
}
|
|
41
41
|
async function addOffenceAndBehaviourSummary(page) {
|
|
42
42
|
await page.getByRole("link", { name: "Add offence and behaviour summary" }).click();
|
|
43
|
-
await expect(page).toHaveTitle("Has the person ever been convicted of a sexual offence? -
|
|
43
|
+
await expect(page).toHaveTitle("Has the person ever been convicted of a sexual offence? - CAS3");
|
|
44
44
|
await page.getByRole("radio", {
|
|
45
45
|
name: "No",
|
|
46
46
|
exact: true
|
|
47
47
|
}).check();
|
|
48
48
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
49
|
-
await expect(page).toHaveTitle("Are there concerns about the person's sexual behaviour? -
|
|
49
|
+
await expect(page).toHaveTitle("Are there concerns about the person's sexual behaviour? - CAS3");
|
|
50
50
|
await page.getByRole("radio", {
|
|
51
51
|
name: "No",
|
|
52
52
|
exact: true
|
|
53
53
|
}).check();
|
|
54
54
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
55
|
-
await expect(page).toHaveTitle("Has the person ever been convicted of arson? -
|
|
55
|
+
await expect(page).toHaveTitle("Has the person ever been convicted of arson? - CAS3");
|
|
56
56
|
await page.getByRole("radio", {
|
|
57
57
|
name: "No",
|
|
58
58
|
exact: true
|
|
59
59
|
}).check();
|
|
60
60
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
61
|
-
await expect(page).toHaveTitle("Are there concerns about arson for the person? -
|
|
61
|
+
await expect(page).toHaveTitle("Are there concerns about arson for the person? - CAS3");
|
|
62
62
|
await page.getByRole("radio", {
|
|
63
63
|
name: "No",
|
|
64
64
|
exact: true
|
|
@@ -68,28 +68,28 @@ async function addOffenceAndBehaviourSummary(page) {
|
|
|
68
68
|
}
|
|
69
69
|
async function addSentenceInformation(page) {
|
|
70
70
|
await page.getByRole("link", { name: "Add sentence information" }).click();
|
|
71
|
-
await expect(page).toHaveTitle("Provide a brief summary of the person's index offence(s) and offending history -
|
|
71
|
+
await expect(page).toHaveTitle("Provide a brief summary of the person's index offence(s) and offending history - CAS3");
|
|
72
72
|
await page.getByLabel("Provide details").fill("Test summary of person's index offence(s) and offending history any history of arson, violent offences, weapons etc");
|
|
73
73
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
74
|
-
await expect(page).toHaveTitle("Which of the following best describes the sentence type? -
|
|
74
|
+
await expect(page).toHaveTitle("Which of the following best describes the sentence type? - CAS3");
|
|
75
75
|
await page.getByRole("radio", {
|
|
76
76
|
name: "Standard determinate custody",
|
|
77
77
|
exact: true
|
|
78
78
|
}).check();
|
|
79
79
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
80
|
-
await expect(page).toHaveTitle("What is the sentence length? -
|
|
80
|
+
await expect(page).toHaveTitle("What is the sentence length? - CAS3");
|
|
81
81
|
await page.getByLabel("Years").fill("0");
|
|
82
82
|
await page.getByLabel("Months").fill("6");
|
|
83
83
|
await page.getByLabel("Weeks").fill("1");
|
|
84
84
|
await page.getByLabel("Days").fill("1");
|
|
85
85
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
86
|
-
await expect(page).toHaveTitle("Sentence expiry date -
|
|
86
|
+
await expect(page).toHaveTitle("Sentence expiry date - CAS3");
|
|
87
87
|
const expiryDate = DateTime.now().plus({ months: 6 });
|
|
88
88
|
await page.getByLabel("Day").fill(expiryDate.day.toString());
|
|
89
89
|
await page.getByLabel("Month").fill(expiryDate.month.toString());
|
|
90
90
|
await page.getByLabel("Year").fill(expiryDate.year.toString());
|
|
91
91
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
92
|
-
await expect(page).toHaveTitle("What is the release type? -
|
|
92
|
+
await expect(page).toHaveTitle("What is the release type? - CAS3");
|
|
93
93
|
await page.getByRole("checkbox", {
|
|
94
94
|
name: "Standard recall release licence",
|
|
95
95
|
exact: true
|
|
@@ -102,66 +102,66 @@ async function addSentenceInformation(page) {
|
|
|
102
102
|
await page.locator("#standardRecallEndDate-month").fill(expiryDate.month.toString());
|
|
103
103
|
await page.locator("#standardRecallEndDate-year").fill(expiryDate.year.toString());
|
|
104
104
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
105
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
105
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
106
106
|
await expect(page.locator("#sentence-information-status")).toHaveText("Completed");
|
|
107
107
|
}
|
|
108
108
|
async function enterContactDetails(page) {
|
|
109
109
|
await page.getByRole("link", { name: "Enter contact details" }).click();
|
|
110
|
-
await expect(page).toHaveTitle("Confirm probation practitioner details -
|
|
110
|
+
await expect(page).toHaveTitle("Confirm probation practitioner details - CAS3");
|
|
111
111
|
await page.getByRole("link", { name: "Enter a phone number" }).click();
|
|
112
|
-
await expect(page).toHaveTitle("What’s your phone number? -
|
|
112
|
+
await expect(page).toHaveTitle("What’s your phone number? - CAS3");
|
|
113
113
|
await page.getByLabel("What’s your phone number?").fill(faker.phone.number());
|
|
114
114
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
115
|
-
await expect(page).toHaveTitle("Confirm probation practitioner details -
|
|
115
|
+
await expect(page).toHaveTitle("Confirm probation practitioner details - CAS3");
|
|
116
116
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
117
|
-
await expect(page).toHaveTitle("Backup contact / senior probation officer details -
|
|
117
|
+
await expect(page).toHaveTitle("Backup contact / senior probation officer details - CAS3");
|
|
118
118
|
await page.getByLabel("Name").fill("AutomatedTestUser AutomatedTestUser");
|
|
119
119
|
await page.getByLabel("Phone number").fill(faker.phone.number());
|
|
120
120
|
await page.getByLabel("Email").fill(faker.internet.email());
|
|
121
121
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
122
|
-
await expect(page).toHaveTitle("What is the person's phone number? -
|
|
122
|
+
await expect(page).toHaveTitle("What is the person's phone number? - CAS3");
|
|
123
123
|
await page.getByLabel("Please provide an up to date contact number for the person on probation.").fill(faker.phone.number());
|
|
124
124
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
125
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
125
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
126
126
|
await expect(page.locator("#contact-details-status")).toHaveText("Completed");
|
|
127
127
|
}
|
|
128
128
|
async function confirmEligibility(page) {
|
|
129
129
|
await page.getByRole("link", { name: "Confirm eligibility" }).click();
|
|
130
|
-
await expect(page).toHaveTitle("How is the person eligible for
|
|
130
|
+
await expect(page).toHaveTitle("How is the person eligible for CAS3? - CAS3");
|
|
131
131
|
await page.getByRole("radio", {
|
|
132
132
|
name: "Moving on as homeless from an Approved Premises (CAS1)",
|
|
133
133
|
exact: true
|
|
134
134
|
}).check();
|
|
135
135
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
136
|
-
await expect(page).toHaveTitle("What is the person's release date? -
|
|
136
|
+
await expect(page).toHaveTitle("What is the person's release date? - CAS3");
|
|
137
137
|
const releaseDate = DateTime.now().plus({ months: 2 });
|
|
138
138
|
await page.getByLabel("Day").fill(releaseDate.day.toString());
|
|
139
139
|
await page.getByLabel("Month").fill(releaseDate.month.toString());
|
|
140
140
|
await page.getByLabel("Year").fill(releaseDate.year.toString());
|
|
141
141
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
142
|
-
await expect(page).toHaveTitle("What date is accommodation required from? -
|
|
142
|
+
await expect(page).toHaveTitle("What date is accommodation required from? - CAS3");
|
|
143
143
|
const accommodationDate = DateTime.now().plus({ days: 10 });
|
|
144
144
|
await page.getByLabel("Day").fill(accommodationDate.day.toString());
|
|
145
145
|
await page.getByLabel("Month").fill(accommodationDate.month.toString());
|
|
146
146
|
await page.getByLabel("Year").fill(accommodationDate.year.toString());
|
|
147
147
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
148
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
148
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
149
149
|
await expect(page.locator("#eligibility-status")).toHaveText("Completed");
|
|
150
150
|
}
|
|
151
151
|
async function confirmConsent(page) {
|
|
152
152
|
await page.getByRole("link", { name: "Confirm consent" }).click();
|
|
153
|
-
await expect(page).toHaveTitle("Has consent for
|
|
153
|
+
await expect(page).toHaveTitle("Has consent for CAS3 been given? - CAS3");
|
|
154
154
|
await page.getByRole("radio", {
|
|
155
155
|
name: "Yes",
|
|
156
156
|
exact: true
|
|
157
157
|
}).check();
|
|
158
158
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
159
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
159
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
160
160
|
await expect(page.locator("#consent-status")).toHaveText("Completed");
|
|
161
161
|
}
|
|
162
162
|
async function enterLicenceConditions(page) {
|
|
163
163
|
await page.getByRole("link", { name: "Enter licence conditions" }).click();
|
|
164
|
-
await expect(page).toHaveTitle("Additional licence conditions -
|
|
164
|
+
await expect(page).toHaveTitle("Additional licence conditions - CAS3");
|
|
165
165
|
await page.getByRole("checkbox", {
|
|
166
166
|
name: "Alcohol monitoring",
|
|
167
167
|
exact: true
|
|
@@ -173,77 +173,77 @@ async function enterLicenceConditions(page) {
|
|
|
173
173
|
}).check();
|
|
174
174
|
await page.locator("#engagementWithServicesDetail").fill("Test Engagement with services");
|
|
175
175
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
176
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
176
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
177
177
|
await expect(page.locator("#licence-conditions-status")).toHaveText("Completed");
|
|
178
178
|
}
|
|
179
179
|
async function reviewPrisonInformation(page) {
|
|
180
180
|
await page.getByRole("link", { name: "Review prison information" }).click();
|
|
181
|
-
await expect(page).toHaveTitle("Adjudications -
|
|
181
|
+
await expect(page).toHaveTitle("Adjudications - CAS3");
|
|
182
182
|
await page.getByRole("button", { name: "Next" }).click();
|
|
183
183
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
184
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
184
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
185
185
|
await expect(page.locator("#prison-information-status")).toHaveText("Completed");
|
|
186
186
|
}
|
|
187
187
|
async function enterPlacementConsiderations(page) {
|
|
188
188
|
await page.getByRole("link", { name: "Enter placement considerations" }).click();
|
|
189
|
-
await expect(page).toHaveTitle("Accommodation sharing -
|
|
189
|
+
await expect(page).toHaveTitle("Accommodation sharing - CAS3");
|
|
190
190
|
await page.getByRole("radio", {
|
|
191
191
|
name: "Yes",
|
|
192
192
|
exact: true
|
|
193
193
|
}).check();
|
|
194
194
|
await page.getByRole("textbox", { name: "How will you manage the person's risk if they are placed in shared accommodation?" }).fill("Test Risk is manageable");
|
|
195
195
|
await page.getByRole("button", { name: "Next" }).click();
|
|
196
|
-
await expect(page).toHaveTitle("Cooperation -
|
|
196
|
+
await expect(page).toHaveTitle("Cooperation - CAS3");
|
|
197
197
|
await page.locator("#support").fill("Test details of how you to support placement considering any risks to the support worker");
|
|
198
198
|
await page.getByRole("button", { name: "Next" }).click();
|
|
199
|
-
await expect(page).toHaveTitle("Anti-social behaviour -
|
|
199
|
+
await expect(page).toHaveTitle("Anti-social behaviour - CAS3");
|
|
200
200
|
await page.getByRole("radio", {
|
|
201
201
|
name: "No",
|
|
202
202
|
exact: true
|
|
203
203
|
}).check();
|
|
204
204
|
await page.getByRole("button", { name: "Next" }).click();
|
|
205
|
-
await expect(page).toHaveTitle("Substance misuse -
|
|
205
|
+
await expect(page).toHaveTitle("Substance misuse - CAS3");
|
|
206
206
|
await page.getByRole("radio", {
|
|
207
207
|
name: "No",
|
|
208
208
|
exact: true
|
|
209
209
|
}).check();
|
|
210
210
|
await page.getByRole("button", { name: "Next" }).click();
|
|
211
|
-
await expect(page).toHaveTitle("RoSH level -
|
|
211
|
+
await expect(page).toHaveTitle("RoSH level - CAS3");
|
|
212
212
|
await page.locator("#riskToChildren").fill("Risk to children details");
|
|
213
213
|
await page.locator("#riskToPublic").fill("Risk to public details");
|
|
214
214
|
await page.locator("#riskToKnownAdult").fill("Risk to known adult details");
|
|
215
215
|
await page.locator("#riskToStaff").fill("Risk to staff details");
|
|
216
216
|
await page.locator("#riskToSelf").fill("Risk to self details");
|
|
217
217
|
await page.getByRole("button", { name: "Next" }).click();
|
|
218
|
-
await expect(page).toHaveTitle("Risk management plan -
|
|
218
|
+
await expect(page).toHaveTitle("Risk management plan - CAS3");
|
|
219
219
|
await page.getByRole("textbox", { name: "Victim safety planning" }).fill("Victim safety planning details");
|
|
220
220
|
await page.getByRole("textbox", { name: "Interventions and treatment" }).fill("Interventions and treatment details");
|
|
221
221
|
await page.getByRole("textbox", { name: "Monitoring and control" }).fill("Monitoring and control details");
|
|
222
222
|
await page.getByRole("textbox", { name: "Supervision" }).fill("Supervision details");
|
|
223
223
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
224
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
224
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
225
225
|
await expect(page.locator("#placement-considerations-status")).toHaveText("Completed");
|
|
226
226
|
}
|
|
227
227
|
async function enterApprovalsForSpecificRisks(page) {
|
|
228
228
|
await page.getByRole("link", { name: "Enter approvals for specific risks" }).click();
|
|
229
|
-
await expect(page).toHaveTitle("Approvals for specific risks -
|
|
229
|
+
await expect(page).toHaveTitle("Approvals for specific risks - CAS3");
|
|
230
230
|
await page.getByRole("radio", {
|
|
231
231
|
name: "No, approvals are not required for this referral",
|
|
232
232
|
exact: true
|
|
233
233
|
}).check();
|
|
234
234
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
235
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
235
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
236
236
|
await expect(page.locator("#approvals-for-specific-risks-status")).toHaveText("Completed");
|
|
237
237
|
}
|
|
238
238
|
async function outlineBehaviourInCAS(page) {
|
|
239
239
|
await page.getByRole("link", { name: "Outline behaviour in CAS" }).click();
|
|
240
|
-
await expect(page).toHaveTitle("Behaviour in previous accommodation -
|
|
240
|
+
await expect(page).toHaveTitle("Behaviour in previous accommodation - CAS3");
|
|
241
241
|
await page.getByRole("radio", {
|
|
242
242
|
name: "No",
|
|
243
243
|
exact: true
|
|
244
244
|
}).check();
|
|
245
245
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
246
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
246
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
247
247
|
await expect(page.locator("#behaviour-in-cas-status")).toHaveText("Completed");
|
|
248
248
|
}
|
|
249
249
|
async function confirmPlacementLocation(page) {
|
|
@@ -254,103 +254,103 @@ async function confirmPlacementLocation(page) {
|
|
|
254
254
|
await expect(page).toHaveTitle(/Is placement required in a different PDU/);
|
|
255
255
|
await page.getByRole("radio", { name: "No" }).check();
|
|
256
256
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
257
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
257
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
258
258
|
await expect(page.locator("#placement-location-status")).toHaveText("Completed");
|
|
259
259
|
}
|
|
260
260
|
async function addDisabilityCulturalAndSpecificNeeds(page) {
|
|
261
261
|
await page.getByRole("link", { name: "Add health, disability and cultural needs" }).click();
|
|
262
|
-
await expect(page).toHaveTitle("Does the person have any of the following needs? -
|
|
262
|
+
await expect(page).toHaveTitle("Does the person have any of the following needs? - CAS3");
|
|
263
263
|
await page.getByRole("checkbox", {
|
|
264
264
|
name: "None of the above",
|
|
265
265
|
exact: true
|
|
266
266
|
}).check();
|
|
267
267
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
268
|
-
await expect(page).toHaveTitle("Will the person require a property with specific attributes or adaptations? -
|
|
268
|
+
await expect(page).toHaveTitle("Will the person require a property with specific attributes or adaptations? - CAS3");
|
|
269
269
|
await page.getByRole("radio", {
|
|
270
270
|
name: "No",
|
|
271
271
|
exact: true
|
|
272
272
|
}).check();
|
|
273
273
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
274
|
-
await expect(page).toHaveTitle("Does the person have any religious or cultural needs? -
|
|
274
|
+
await expect(page).toHaveTitle("Does the person have any religious or cultural needs? - CAS3");
|
|
275
275
|
await page.getByRole("radio", {
|
|
276
276
|
name: "No",
|
|
277
277
|
exact: true
|
|
278
278
|
}).check();
|
|
279
279
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
280
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
280
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
281
281
|
await expect(page.locator("#disability-cultural-and-specific-needs-status")).toHaveText("Completed");
|
|
282
282
|
}
|
|
283
283
|
async function addInformationOnSafeguardingAndSupport(page) {
|
|
284
284
|
await page.getByRole("link", { name: "Add information on safeguarding and support" }).click();
|
|
285
|
-
await expect(page).toHaveTitle("Safeguarding and vulnerability -
|
|
285
|
+
await expect(page).toHaveTitle("Safeguarding and vulnerability - CAS3");
|
|
286
286
|
await page.getByRole("radio", {
|
|
287
287
|
name: "No",
|
|
288
288
|
exact: true
|
|
289
289
|
}).check();
|
|
290
290
|
await page.getByRole("button", { name: "Next" }).click();
|
|
291
|
-
await expect(page).toHaveTitle("Support in the community -
|
|
291
|
+
await expect(page).toHaveTitle("Support in the community - CAS3");
|
|
292
292
|
await page.getByRole("textbox", { name: "Provide details" }).fill("Test support details");
|
|
293
293
|
await page.getByRole("button", { name: "Next" }).click();
|
|
294
|
-
await expect(page).toHaveTitle("Local connections -
|
|
294
|
+
await expect(page).toHaveTitle("Local connections - CAS3");
|
|
295
295
|
await page.getByRole("textbox", { name: "Provide details" }).fill("Test details of local connections");
|
|
296
296
|
await page.getByRole("button", { name: "Next" }).click();
|
|
297
|
-
await expect(page).toHaveTitle("Caring responsibilities -
|
|
297
|
+
await expect(page).toHaveTitle("Caring responsibilities - CAS3");
|
|
298
298
|
await page.getByRole("radio", {
|
|
299
299
|
name: "No",
|
|
300
300
|
exact: true
|
|
301
301
|
}).check();
|
|
302
302
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
303
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
303
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
304
304
|
await expect(page.locator("#safeguarding-and-support-status")).toHaveText("Completed");
|
|
305
305
|
}
|
|
306
306
|
async function provideFoodAllergies(page) {
|
|
307
307
|
await page.getByRole("link", { name: "Provide any food allergies" }).click();
|
|
308
|
-
await expect(page).toHaveTitle("Food allergies -
|
|
308
|
+
await expect(page).toHaveTitle("Food allergies - CAS3");
|
|
309
309
|
await page.getByRole("radio", {
|
|
310
310
|
name: "No",
|
|
311
311
|
exact: true
|
|
312
312
|
}).check();
|
|
313
313
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
314
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
314
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
315
315
|
await expect(page.locator("#food-allergies-status")).toHaveText("Completed");
|
|
316
316
|
}
|
|
317
317
|
async function outlineMoveOnPlan(page) {
|
|
318
318
|
await page.getByRole("link", { name: "Outline move on plan" }).click();
|
|
319
|
-
await expect(page).toHaveTitle("How will you prepare the person for move on after placement? -
|
|
319
|
+
await expect(page).toHaveTitle("How will you prepare the person for move on after placement? - CAS3");
|
|
320
320
|
await page.getByRole("textbox", { name: "Provide details" }).fill("Test preparation for move on after placement");
|
|
321
321
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
322
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
322
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
323
323
|
await expect(page.locator("#move-on-plan-status")).toHaveText("Completed");
|
|
324
324
|
}
|
|
325
325
|
async function enterAccommodationReferralDetails(page) {
|
|
326
326
|
await page.getByRole("link", { name: "Enter accommodation referral details" }).click();
|
|
327
|
-
await expect(page).toHaveTitle("Has the Duty to refer (England) or Application for Assistance (Wales) been submitted? -
|
|
327
|
+
await expect(page).toHaveTitle("Has the Duty to refer (England) or Application for Assistance (Wales) been submitted? - CAS3");
|
|
328
328
|
await page.getByRole("radio", {
|
|
329
329
|
name: "No",
|
|
330
330
|
exact: true
|
|
331
331
|
}).check();
|
|
332
332
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
333
|
-
await expect(page).toHaveTitle("Has a referral to Commissioned Rehabilitative Services (CRS) been submitted? -
|
|
333
|
+
await expect(page).toHaveTitle("Has a referral to Commissioned Rehabilitative Services (CRS) been submitted? - CAS3");
|
|
334
334
|
await page.getByRole("radio", {
|
|
335
335
|
name: "Yes",
|
|
336
336
|
exact: true
|
|
337
337
|
}).check();
|
|
338
338
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
339
|
-
await expect(page).toHaveTitle("Have other accommodation options been considered? -
|
|
339
|
+
await expect(page).toHaveTitle("Have other accommodation options been considered? - CAS3");
|
|
340
340
|
await page.getByRole("radio", {
|
|
341
341
|
name: "Yes",
|
|
342
342
|
exact: true
|
|
343
343
|
}).check();
|
|
344
344
|
await page.getByRole("textbox", { name: "Provide details" }).fill("Test accommodation options are considered");
|
|
345
345
|
await page.getByRole("button", { name: "Save and continue" }).click();
|
|
346
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
346
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
347
347
|
await expect(page.locator("#accommodation-referral-details-status")).toHaveText("Completed");
|
|
348
348
|
}
|
|
349
349
|
async function checkAnswers(page) {
|
|
350
350
|
await page.getByRole("link", { name: "Check your answers" }).click();
|
|
351
|
-
await expect(page).toHaveTitle("Check your answers -
|
|
351
|
+
await expect(page).toHaveTitle("Check your answers - CAS3");
|
|
352
352
|
await page.getByRole("button", { name: "Continue" }).click();
|
|
353
|
-
await expect(page).toHaveTitle("Make a referral for
|
|
353
|
+
await expect(page).toHaveTitle("Make a referral for CAS3 - CAS3");
|
|
354
354
|
await expect(page.locator("#check-your-answers-status")).toHaveText("Completed");
|
|
355
355
|
}
|
|
356
356
|
async function submitReferral(page) {
|
|
@@ -7,7 +7,7 @@ const login = async (page) => {
|
|
|
7
7
|
await page.fill("#username", process.env.DELIUS_USERNAME);
|
|
8
8
|
await page.fill("#password", process.env.DELIUS_PASSWORD);
|
|
9
9
|
await page.click("#submit");
|
|
10
|
-
await expect(page).toHaveTitle("
|
|
10
|
+
await expect(page).toHaveTitle("CAS3 referrals - CAS3");
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
@@ -7,7 +7,7 @@ const prepareCaseForSentenceLogin = async (page) => {
|
|
|
7
7
|
await page.fill("#username", process.env.DELIUS_USERNAME);
|
|
8
8
|
await page.fill("#password", process.env.DELIUS_PASSWORD);
|
|
9
9
|
await page.locator("#submit", { hasText: "Sign in" }).click();
|
|
10
|
-
await expect(page).toHaveTitle("
|
|
10
|
+
await expect(page).toHaveTitle("My courts - Prepare a case for sentence");
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
//#endregion
|