Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/test/ui/e2eTest/dashboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import config from 'config';

import { createCaseApiData, submitCaseApiData } from '../data/api-data';
import { dashboard } from '../data/page-data';
import { initializeExecutor, performAction, performValidation } from '../utils/controller';
import { contactUs } from '../data/section-data/contactUs.section.data';
import { initializeExecutor, performAction, performValidation, performValidations } from '../utils/controller';

const home_url = config.get('e2e.testUrl') as string;

Expand All @@ -28,5 +29,17 @@ test.describe('Dashboard - e2e Journey @nightly', async () => {
test('Validate address on the dashboard is same as property address @regression', async () => {
await performValidation('mainHeader', dashboard.mainHeader);
await performValidation('text', { elementType: 'paragraph', text: dashboard.caseNumberParagraph() });
await performAction('clickLink', contactUs.contactUsForHelpParagraph);
await performValidations(
'Validate contact us section',
['text', { elementType: 'subSectionHeader', text: contactUs.emailSubHeader }],
['text', { elementType: 'paragraphLink', text: contactUs.localCourtEmailAddrParagraph }],
['text', { elementType: 'link', text: contactUs.findACourtLink }],
['text', { elementType: 'paragraph', text: contactUs.ifYouDoNotKnowParagraph }],
['text', { elementType: 'subSectionHeader', text: contactUs.telephoneSubHeader }],
['text', { elementType: 'paragraph', text: contactUs.telephoneNumberParagraph }],
['text', { elementType: 'paragraph', text: contactUs.telephoneAvailabilityParagraph }],
['text', { elementType: 'link', text: contactUs.callChargesLink }]
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export class TextValidation implements IValidation {
case 'subHeader':
data.elementType = 'h2';
break;
case 'subSectionHeader':
data.elementType = 'h3';
break;
case 'paragraphLink':
data.elementType = 'p > a';
break;
Expand Down
Loading