Skip to content

Commit 5b4901f

Browse files
CCM-10442: Fix e2e tests
1 parent c45b962 commit 5b4901f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/test-team/template-mgmt-e2e-tests/template-mgmt-letter-full.e2e.spec.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,12 @@ function submit(
260260
});
261261
}
262262

263-
function checkEmail(templateId: string, testStart: Date, prefix: string) {
263+
function checkEmail(
264+
templateId: string,
265+
testStart: Date,
266+
prefix: string,
267+
emailTitle: string
268+
) {
264269
return test.step('check email', async () => {
265270
await expect(async () => {
266271
// check template-submitted email
@@ -272,7 +277,7 @@ function checkEmail(templateId: string, testStart: Date, prefix: string) {
272277

273278
expect(emailContents).toContain(templateId);
274279
expect(emailContents).toContain('Valid Letter Template'); // template name
275-
expect(emailContents).toContain('Template Submitted');
280+
expect(emailContents).toContain(emailTitle);
276281
}).toPass({ timeout: 60_000 });
277282
});
278283
}
@@ -317,15 +322,17 @@ test.describe('letter complete e2e journey', () => {
317322
await checkEmail(
318323
templateKey.id,
319324
testStart,
320-
process.env.TEST_PROOF_REQUESTED_EMAIL_PREFIX
325+
process.env.TEST_PROOF_REQUESTED_EMAIL_PREFIX,
326+
'Proof Requested'
321327
);
322328

323329
await submit(page, templateStorageHelper, templateKey);
324330

325331
await checkEmail(
326332
templateKey.id,
327333
testStart,
328-
process.env.TEST_TEMPLATE_SUBMITTED_EMAIL_PREFIX
334+
process.env.TEST_TEMPLATE_SUBMITTED_EMAIL_PREFIX,
335+
'Template Submitted'
329336
);
330337
});
331338

0 commit comments

Comments
 (0)