Skip to content

Commit 5c7aa97

Browse files
committed
CCM-7565: update component test steps
1 parent fbcb73a commit 5c7aa97

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

tests/test-team/template-mgmt-component-tests/email/template-mgmt-create-email-page.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TemplateFactory } from '../../helpers/template-factory';
55
import {
66
assertFooterLinks,
77
assertGoBackLink,
8+
assertGoBackLinkNotPresent,
89
assertLoginLink,
910
assertNotifyBannerLink,
1011
assertSkipToMainContent,
@@ -66,7 +67,6 @@ test.describe('Create Email message template Page', () => {
6667
test('common page tests', async ({ page, baseURL }) => {
6768
const props = {
6869
page: new TemplateMgmtCreateEmailPage(page),
69-
id: templates.empty.id,
7070
baseURL,
7171
};
7272

@@ -80,6 +80,16 @@ test.describe('Create Email message template Page', () => {
8080
});
8181
});
8282

83+
test('edit page has no go back link', async ({ page, baseURL }) => {
84+
const props = {
85+
page: new TemplateMgmtCreateEmailPage(page),
86+
id: templates.empty.id,
87+
baseURL,
88+
};
89+
90+
await assertGoBackLinkNotPresent(props);
91+
});
92+
8393
test('when user visits page with previous data, then form fields retain previous data', async ({
8494
page,
8595
}) => {

tests/test-team/template-mgmt-component-tests/nhs-app/template-mgmt-create-nhs-app-template-page.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TemplateStorageHelper } from '../../helpers/template-storage-helper';
55
import {
66
assertFooterLinks,
77
assertGoBackLink,
8+
assertGoBackLinkNotPresent,
89
assertLoginLink,
910
assertNotifyBannerLink,
1011
assertSkipToMainContent,
@@ -52,7 +53,6 @@ test.describe('Create NHS App Template Page', () => {
5253
test('common page tests', async ({ page, baseURL }) => {
5354
const props = {
5455
page: new TemplateMgmtCreateNhsAppPage(page),
55-
id: templates.emptyTemplateData.id,
5656
baseURL,
5757
};
5858

@@ -66,6 +66,16 @@ test.describe('Create NHS App Template Page', () => {
6666
});
6767
});
6868

69+
test('edit page has no go back link', async ({ page, baseURL }) => {
70+
const props = {
71+
page: new TemplateMgmtCreateNhsAppPage(page),
72+
id: templates.emptyTemplateData.id,
73+
baseURL,
74+
};
75+
76+
await assertGoBackLinkNotPresent(props);
77+
});
78+
6979
test('Validate error messages on the create NHS App message template page with no template name or body', async ({
7080
page,
7181
baseURL,

tests/test-team/template-mgmt-component-tests/sms/template-mgmt-create-sms-page.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TemplateFactory } from '../../helpers/template-factory';
55
import {
66
assertFooterLinks,
77
assertGoBackLink,
8+
assertGoBackLinkNotPresent,
89
assertLoginLink,
910
assertNotifyBannerLink,
1011
assertSkipToMainContent,
@@ -68,7 +69,6 @@ test.describe('Create SMS message template Page', () => {
6869
test('common page tests', async ({ page, baseURL }) => {
6970
const props = {
7071
page: new TemplateMgmtCreateSmsPage(page),
71-
id: templates.empty.id,
7272
baseURL,
7373
};
7474

@@ -82,6 +82,16 @@ test.describe('Create SMS message template Page', () => {
8282
});
8383
});
8484

85+
test('edit page has no go back link', async ({ page, baseURL }) => {
86+
const props = {
87+
page: new TemplateMgmtCreateSmsPage(page),
88+
id: templates.empty.id,
89+
baseURL,
90+
};
91+
92+
await assertGoBackLinkNotPresent(props);
93+
});
94+
8595
test('when user visits page with previous data, then form fields retain previous data', async ({
8696
page,
8797
}) => {

0 commit comments

Comments
 (0)