Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADOP-2622 - Child DoB e2e tests #1632

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c9d369f
Local Authority testing journey added
AustenStevensMOJ Nov 1, 2024
bbcd7a3
Merge branch 'master' into ADOP-2548
GauravChawlaMOJ Nov 1, 2024
47f14d2
Birth certificate section removed
AustenStevensMOJ Nov 6, 2024
ae1fac7
Mother section refactored
AustenStevensMOJ Nov 6, 2024
4dce111
Merge branch 'ADOP-2548' of https://github.com/hmcts/adoption-web int…
AustenStevensMOJ Nov 6, 2024
f049070
Father section refactored
AustenStevensMOJ Nov 6, 2024
cbb2fdb
base page super class extended
AustenStevensMOJ Nov 6, 2024
35a24d7
create fixture functionality implemented
AustenStevensMOJ Nov 6, 2024
8fc1334
create fixtures funtionality implemented into fixtures
AustenStevensMOJ Nov 6, 2024
a74ed1a
laGettingStartedPag export amended
AustenStevensMOJ Nov 6, 2024
12be655
Child section refactored
AustenStevensMOJ Nov 6, 2024
c5b3478
Father section further refactoring
AustenStevensMOJ Nov 6, 2024
679e5fe
placement section refactored
AustenStevensMOJ Nov 6, 2024
5f70e2a
Other person section refactored
AustenStevensMOJ Nov 6, 2024
7fa846c
sign in implementing base page super class
AustenStevensMOJ Nov 6, 2024
4b4c197
Create fixture fixture additions
AustenStevensMOJ Nov 8, 2024
55d7349
Page Factory removed
AustenStevensMOJ Nov 8, 2024
c7a7fa2
sibligng court details refactored
AustenStevensMOJ Nov 8, 2024
89dc9cd
Upload document refactored
AustenStevensMOJ Nov 8, 2024
3a7a767
statement of truth refactored
AustenStevensMOJ Nov 8, 2024
3184008
check your answers refactored
AustenStevensMOJ Nov 8, 2024
0f15a7f
e2e tests refactored
AustenStevensMOJ Nov 8, 2024
6422cf0
navigateTo functionality implemented instead rather than constructor …
AustenStevensMOJ Nov 11, 2024
aff23fc
LA journey refactoring
AustenStevensMOJ Nov 11, 2024
2ca0f50
fixed es lint and formatting issues
AustenStevensMOJ Nov 11, 2024
216ddcd
redundant code removed
AustenStevensMOJ Nov 11, 2024
5e28b4d
citizen signin page fixture added
AustenStevensMOJ Nov 11, 2024
6c12869
es lint fixes
AustenStevensMOJ Nov 12, 2024
bb6049f
Removal of button references
AustenStevensMOJ Nov 14, 2024
b84505d
file and class name changes for fatherDocumentPage
AustenStevensMOJ Nov 15, 2024
f975d7d
removed redundant referecnes that are handled by the super class
AustenStevensMOJ Nov 15, 2024
08c3b1d
removed redundant code that is handled by the super class
AustenStevensMOJ Nov 15, 2024
7dc8082
es lint fixes
AustenStevensMOJ Nov 19, 2024
506d66f
Nationality super class added with small await corrections
AustenStevensMOJ Nov 20, 2024
52fae81
Moother typo comment corrected to Mother
AustenStevensMOJ Nov 21, 2024
8ae4561
MotherDocument reference renamed to MotherServeDocument
AustenStevensMOJ Nov 21, 2024
ee7cdde
missing await added
AustenStevensMOJ Nov 21, 2024
55938f7
refactored file
AustenStevensMOJ Nov 21, 2024
fc62771
Component redundancies removed
AustenStevensMOJ Nov 21, 2024
ad9ba8c
Bug fixes and citizen submitted page added for sign out functionality
AustenStevensMOJ Nov 22, 2024
d81c343
Confirmation page url check
AustenStevensMOJ Nov 28, 2024
3448720
file rename changes
AustenStevensMOJ Dec 3, 2024
c8d87a6
CZN renamed to CIT convention or citizen
AustenStevensMOJ Dec 3, 2024
e7459c0
base page nationality functions removed
AustenStevensMOJ Dec 3, 2024
62a0230
InOrder renamed to Summary
AustenStevensMOJ Dec 3, 2024
566ec8a
removed redundant function reference
AustenStevensMOJ Dec 3, 2024
e00b255
Moved laPlacementCourt to correct package
AustenStevensMOJ Dec 3, 2024
c40cdf7
Note added to laChildDetailsPage
AustenStevensMOJ Dec 3, 2024
b61741d
Aplly with page functionality added
AustenStevensMOJ Dec 6, 2024
8678bfe
Visibility test added
AustenStevensMOJ Dec 6, 2024
12eaa60
ApplyWith Citizen test coverage written
AustenStevensMOJ Dec 9, 2024
d81fe7d
Merge branch 'master' into ADOP-2601
AustenStevensMOJ Dec 9, 2024
127e2a1
base interface added for later configuration
AustenStevensMOJ Dec 9, 2024
b911905
task list page class field setup
AustenStevensMOJ Dec 9, 2024
f1fe5f8
further task list component implementation
AustenStevensMOJ Dec 11, 2024
46f5a0f
Bug fixes and task list tests added
AustenStevensMOJ Dec 20, 2024
10068f7
Date child moved in e2e tests written and operational
AustenStevensMOJ Dec 31, 2024
7b9e235
Child full name tests and supported object added
AustenStevensMOJ Jan 16, 2025
fc6e99b
child adoption full name object created
AustenStevensMOJ Jan 20, 2025
667039d
refactoring and test template written
AustenStevensMOJ Jan 28, 2025
f73ad23
test class fixes and test finalisation
AustenStevensMOJ Jan 28, 2025
cf25666
Child DoB testing objects added
AustenStevensMOJ Jan 31, 2025
f5f641e
fixture fix
AustenStevensMOJ Jan 31, 2025
395eb78
Further tests added for dob coverage
AustenStevensMOJ Feb 4, 2025
def4fe5
Test coverage completed
AustenStevensMOJ Feb 5, 2025
5f78384
draft data e2e test fixed
AustenStevensMOJ Feb 5, 2025
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
214 changes: 214 additions & 0 deletions playwright-e2e/fixtures/create-fixture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
import { test as base } from '@playwright/test';

import { CITApplyingWithPage } from '../page-objects/citizen/applying/citApplyingWithPage.page';
import { CITChildDoBPage } from '../page-objects/citizen/child-details/citChildDoBPage.page';
import { CITChildFullNameAfterAdoptionPage } from '../page-objects/citizen/child-details/citChildFullNameAfterAdoptionPage.page';
import { CITChildFullNamePage } from '../page-objects/citizen/child-details/citChildFullNamePage.page';
import { CITDateChildMovedInPage } from '../page-objects/citizen/date-child-moved-in/citDateChildMovedInPage.page';
import { CITSubmittedPage } from '../page-objects/citizen/payments/citSubmittedPage.page';
import { CITTaskListPage } from '../page-objects/citizen/task-list/citTaskListPage.page';
import { LAChildNationalityPage } from '../page-objects/local-authority/birth-certificate/laChildNationalityPage.page';
import { LAChildSexAtBirthPage } from '../page-objects/local-authority/birth-certificate/laChildSexAtBirthPage.page';
import { LABirthFatherLastDateConfirmedAddressPage } from '../page-objects/local-authority/birth-father/laBirthFatherLastDateConfirmedAddressPage.page';
import { LABirthFatherLastKnownAddressBranchPage } from '../page-objects/local-authority/birth-father/laBirthFatherLastKnownAddressBranchPage.page';
import { LABirthFatherNamePage } from '../page-objects/local-authority/birth-father/laBirthFatherNamePage.page';
import { LABirthFatherNationalityPage } from '../page-objects/local-authority/birth-father/laBirthFatherNationalityPage.page';
import { LABirthFatherOccupationPage } from '../page-objects/local-authority/birth-father/laBirthFatherOccupationPage.page';
import { LABirthFatherOnCertficatePage } from '../page-objects/local-authority/birth-father/laBirthFatherOnCertificatePage.page';
import { LABirthFatherParentalResponsibilityGrantedPage } from '../page-objects/local-authority/birth-father/laBirthFatherParentalResponsibilityGrantedPage.page';
import { LABirthFatherParentalResponsibilityPage } from '../page-objects/local-authority/birth-father/laBirthFatherParentalResponsibilityPage.page';
import { LABirthFatherServeDocumentsPage } from '../page-objects/local-authority/birth-father/laBirthFatherServeDocumentsPage.page';
import { LABirthFatherStillAliveStatusPage } from '../page-objects/local-authority/birth-father/laBirthFatherStillAliveStatusPage.page';
import { LABirthFatherLastKnownAddressPage } from '../page-objects/local-authority/birth-father/lsBirthFatherLastKnownAddressPage.page';
import { LABirthMotherAliveStatusPage } from '../page-objects/local-authority/birth-mother/laBirthMotherAliveStatusPage.page';
import { LABirthMotherLastDateConfirmedAddressPage } from '../page-objects/local-authority/birth-mother/laBirthMotherLastDateConfirmedAddressPage.page';
import { LABirthMotherLastKnownAddressBranchPage } from '../page-objects/local-authority/birth-mother/laBirthMotherLastKnownAddressBranchPage.page';
import { LABirthMotherLastKnownAddressPage } from '../page-objects/local-authority/birth-mother/laBirthMotherLastKnownAddressPage.page';
import { LABirthMotherNamePage } from '../page-objects/local-authority/birth-mother/laBirthMotherNamePage.page';
import { LABirthMotherNationalityPage } from '../page-objects/local-authority/birth-mother/laBirthMotherNationalityPage.page';
import { LABirthMotherOccupationPage } from '../page-objects/local-authority/birth-mother/laBirthMotherOccupationPage.page';
import { LABirthMotherServeDocumentsPage } from '../page-objects/local-authority/birth-mother/laBirthMotherServeDocumentsPage.page';
import { LAUploadDocumentsPage } from '../page-objects/local-authority/document-upload/laUploadDocuments.page';
import { LACheckYourAnswerPage } from '../page-objects/local-authority/laCheckYourAnswer.page';
import { LAChildDetailsPage } from '../page-objects/local-authority/laChildDetailsPage.page';
import { LAConfirmationPage } from '../page-objects/local-authority/laConfirmationPage.page';
import { LAGettingStartedPage } from '../page-objects/local-authority/laGettingStartedPage.page';
import { LASignInPage } from '../page-objects/local-authority/laSignInPage.page';
import { LAStatementOfTruthPage } from '../page-objects/local-authority/laStatementOfTruth.page';
import { LAOtherPersonResponsibilityPage } from '../page-objects/local-authority/other-person/laOtherPersonResponsibilityPage.page';
import { LAPlacementDateOfOrderPage } from '../page-objects/local-authority/placement/laPlacementDateOfOrderPage.page';
import { LAPlacementOrderNumberPage } from '../page-objects/local-authority/placement/laPlacementOrderNumberPage.page';
import { LAPlacementOrdersSummaryPage } from '../page-objects/local-authority/placement/laPlacementOrdersSummaryPage.page';
import { LAChildHasOtherSiblingsPage } from '../page-objects/local-authority/siblings/laSiblingCourtDetailsSection.page';
import SignIn from '../pages/signInPage.page';

type CreateFixtures = {
signIn: SignIn;
citApplyingWithPage: CITApplyingWithPage;
citTaskListPage: CITTaskListPage;
citDateChildMovedInPage: CITDateChildMovedInPage;
citChildFullNamePage: CITChildFullNamePage;
citChildFullNameAfterAdoptionPage: CITChildFullNameAfterAdoptionPage;
citChildDoBPage: CITChildDoBPage;
citSubmittedPage: CITSubmittedPage;
laSignInPage: LASignInPage;
laGettingStartedPage: LAGettingStartedPage;
laChildSexAtBirthPage: LAChildSexAtBirthPage;
laChildDetailsPage: LAChildDetailsPage;
laChildNationalityPage: LAChildNationalityPage;
laBirthMotherNamePage: LABirthMotherNamePage;
laBirthMotherAliveStatusPage: LABirthMotherAliveStatusPage;
laBirthMotherNationalityPage: LABirthMotherNationalityPage;
laBirthMotherOccupationPage: LABirthMotherOccupationPage;
laBirthMotherLastKnownAddressBranchPage: LABirthMotherLastKnownAddressBranchPage;
laBirthMotherLastKnownAddressPage: LABirthMotherLastKnownAddressPage;
laBirthMotherLastDateConfirmedAddressPage: LABirthMotherLastDateConfirmedAddressPage;
laBirthMotherServeDocumentsPage: LABirthMotherServeDocumentsPage;
laBirthFatherOnCertificatePage: LABirthFatherOnCertficatePage;
laBirthFatherNamePage: LABirthFatherNamePage;
laBirthFatherStillAliveStatusPage: LABirthFatherStillAliveStatusPage;
laBirthFatherParentalResponsibilityPage: LABirthFatherParentalResponsibilityPage;
laBirthFatherParentalResponsibilityGrantedPage: LABirthFatherParentalResponsibilityGrantedPage;
laBirthFatherNationalityPage: LABirthFatherNationalityPage;
laBirthFatherOccupationPage: LABirthFatherOccupationPage;
laBirthFatherLastKnownAddressBranchPage: LABirthFatherLastKnownAddressBranchPage;
laBirthFatherLastKnownAddressPage: LABirthFatherLastKnownAddressPage;
laBirthFatherLastDateConfirmedAddressPage: LABirthFatherLastDateConfirmedAddressPage;
laBirthFatherServeDocumentsPage: LABirthFatherServeDocumentsPage;
laOtherPersonResponsibilityPage: LAOtherPersonResponsibilityPage;
laPlacementOrderNumberPage: LAPlacementOrderNumberPage;
laPlacementDateOfOrderPage: LAPlacementDateOfOrderPage;
laPlacementOrdersSummaryPage: LAPlacementOrdersSummaryPage;
laChildHasOtherSiblingsPage: LAChildHasOtherSiblingsPage;
laUploadDocumentsPage: LAUploadDocumentsPage;
laCheckYourAnswerPage: LACheckYourAnswerPage;
laStatementOfTruthPage: LAStatementOfTruthPage;
laConfirmationPage: LAConfirmationPage;
};

export const test = base.extend<CreateFixtures>({
signIn: async ({ page }, use) => {
await use(new SignIn(page));
},
citApplyingWithPage: async ({ page }, use) => {
await use(new CITApplyingWithPage(page));
},
citTaskListPage: async ({ page }, use) => {
await use(new CITTaskListPage(page));
},
citDateChildMovedInPage: async ({ page }, use) => {
await use(new CITDateChildMovedInPage(page));
},
citChildFullNamePage: async ({ page }, use) => {
await use(new CITChildFullNamePage(page));
},
citChildFullNameAfterAdoptionPage: async ({ page }, use) => {
await use(new CITChildFullNameAfterAdoptionPage(page));
},
citChildDoBPage: async ({ page }, use) => {
await use(new CITChildDoBPage(page));
},
citSubmittedPage: async ({ page }, use) => {
await use(new CITSubmittedPage(page));
},
laSignInPage: async ({ page }, use) => {
await use(new LASignInPage(page));
},
laGettingStartedPage: async ({ page }, use) => {
await use(new LAGettingStartedPage(page));
},
laChildDetailsPage: async ({ page }, use) => {
await use(new LAChildDetailsPage(page));
},
laChildSexAtBirthPage: async ({ page }, use) => {
await use(new LAChildSexAtBirthPage(page));
},
laChildNationalityPage: async ({ page }, use) => {
await use(new LAChildNationalityPage(page));
},
laBirthMotherNamePage: async ({ page }, use) => {
await use(new LABirthMotherNamePage(page));
},
laBirthMotherAliveStatusPage: async ({ page }, use) => {
await use(new LABirthMotherAliveStatusPage(page));
},
laBirthMotherNationalityPage: async ({ page }, use) => {
await use(new LABirthMotherNationalityPage(page));
},
laBirthMotherOccupationPage: async ({ page }, use) => {
await use(new LABirthMotherOccupationPage(page));
},
laBirthMotherLastKnownAddressBranchPage: async ({ page }, use) => {
await use(new LABirthMotherLastKnownAddressBranchPage(page));
},
laBirthMotherLastKnownAddressPage: async ({ page }, use) => {
await use(new LABirthMotherLastKnownAddressPage(page));
},
laBirthMotherLastDateConfirmedAddressPage: async ({ page }, use) => {
await use(new LABirthMotherLastDateConfirmedAddressPage(page));
},
laBirthMotherServeDocumentsPage: async ({ page }, use) => {
await use(new LABirthMotherServeDocumentsPage(page));
},
laBirthFatherOnCertificatePage: async ({ page }, use) => {
await use(new LABirthFatherOnCertficatePage(page));
},
laBirthFatherNamePage: async ({ page }, use) => {
await use(new LABirthFatherNamePage(page));
},
laBirthFatherStillAliveStatusPage: async ({ page }, use) => {
await use(new LABirthFatherStillAliveStatusPage(page));
},
laBirthFatherParentalResponsibilityPage: async ({ page }, use) => {
await use(new LABirthFatherParentalResponsibilityPage(page));
},
laBirthFatherParentalResponsibilityGrantedPage: async ({ page }, use) => {
await use(new LABirthFatherParentalResponsibilityGrantedPage(page));
},
laBirthFatherNationalityPage: async ({ page }, use) => {
await use(new LABirthFatherNationalityPage(page));
},
laBirthFatherOccupationPage: async ({ page }, use) => {
await use(new LABirthFatherOccupationPage(page));
},
laBirthFatherLastKnownAddressBranchPage: async ({ page }, use) => {
await use(new LABirthFatherLastKnownAddressBranchPage(page));
},
laBirthFatherLastKnownAddressPage: async ({ page }, use) => {
await use(new LABirthFatherLastKnownAddressPage(page));
},
laBirthFatherLastDateConfirmedAddressPage: async ({ page }, use) => {
await use(new LABirthFatherLastDateConfirmedAddressPage(page));
},
laBirthFatherServeDocumentsPage: async ({ page }, use) => {
await use(new LABirthFatherServeDocumentsPage(page));
},
laOtherPersonResponsibilityPage: async ({ page }, use) => {
await use(new LAOtherPersonResponsibilityPage(page));
},
laPlacementOrderNumberPage: async ({ page }, use) => {
await use(new LAPlacementOrderNumberPage(page));
},
laPlacementDateOfOrderPage: async ({ page }, use) => {
await use(new LAPlacementDateOfOrderPage(page));
},
laPlacementOrdersSummaryPage: async ({ page }, use) => {
await use(new LAPlacementOrdersSummaryPage(page));
},
laChildHasOtherSiblingsPage: async ({ page }, use) => {
await use(new LAChildHasOtherSiblingsPage(page));
},
laUploadDocumentsPage: async ({ page }, use) => {
await use(new LAUploadDocumentsPage(page));
},
laCheckYourAnswerPage: async ({ page }, use) => {
await use(new LACheckYourAnswerPage(page));
},
laStatementOfTruthPage: async ({ page }, use) => {
await use(new LAStatementOfTruthPage(page));
},
// eslint-disable-next-line no-empty-pattern
laConfirmationPage: async ({}, use) => {
await use(new LAConfirmationPage());
},
});
4 changes: 3 additions & 1 deletion playwright-e2e/fixtures/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ import { mergeExpects, mergeTests } from '@playwright/test';

import { expect as a11yExpect, test as a11yTest } from '../utils/axe-test';

export const test = mergeTests(a11yTest);
import { test as create } from './create-fixture';

export const test = mergeTests(create, a11yTest);
export const expect = mergeExpects(a11yExpect);
2 changes: 2 additions & 0 deletions playwright-e2e/helpers/e2eJourneyHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function citizenAdoptionSignInWithNoPartner(
userPassword: string,
locator: string
): Promise<void> {
await app.signIn.navigateTo();
await app.signIn.signIn(userEmail, userPassword);
await app.numberOfApplicants.numberOfApplication(locator);
await app.numberOfApplicants.fillNotSpouseOrCivilPartnerDetails('Text to be randomly generated');
Expand All @@ -19,6 +20,7 @@ export async function citizenAdoptionSignInWithPartner(
userPassword: string,
locator: string
): Promise<void> {
await app.signIn.navigateTo();
await app.signIn.signIn(userEmail, userPassword);
await app.numberOfApplicants.numberOfApplication(locator);
await app.basePage.clickSaveAndContinue();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Locator, Page } from '@playwright/test';

import BasePage from '../../../pages/basePage.page';

export class CITApplyingWithPage extends BasePage {
readonly applicationDetailsTitle: Locator;
readonly applicationWithHeading: Locator;

readonly applyingWithGroup: Locator;

readonly applyingOnMyOwnRadioButton: Locator;
readonly applyingWithSpouseRadioButton: Locator;
readonly applyingWithPartnerNotSpouseRadioButton: Locator;

readonly contactUsForHelpDropdownLink: Locator;
readonly contactACourtHeading: Locator;

readonly errorSummary: Locator;

constructor(page: Page) {
super(page);
this.applicationDetailsTitle = page.getByText('Application details');
this.applicationWithHeading = page.getByRole('heading', { name: 'Are you applying on your own' });

this.applyingWithGroup = page.getByRole('group', { name: 'Are you applying on your own, or with someone else?' });

this.applyingOnMyOwnRadioButton = this.applyingWithGroup.getByLabel("I'm applying on my own");
this.applyingWithSpouseRadioButton = this.applyingWithGroup.getByLabel("I'm applying with my spouse");
this.applyingWithPartnerNotSpouseRadioButton = this.applyingWithGroup.getByLabel("I'm applying with someone who");

this.contactUsForHelpDropdownLink = page.locator('summary') || page.getByText('Contact us for help');
this.contactACourtHeading = page.getByRole('heading', { name: 'Contact a court that deals' });

this.errorSummary = page.locator('div.govuk-error-summar');
}

async checkApplyingOnMyOwnRadioButton(): Promise<void> {
await this.applyingOnMyOwnRadioButton.check();
}

async checkApplyingWithSpouseRadioButton(): Promise<void> {
await this.applyingWithSpouseRadioButton.check();
}

async checkApplyingWithPartnerNotSpouseRadioButton(): Promise<void> {
await this.applyingWithPartnerNotSpouseRadioButton.check();
}

async clickContactUsForHelpDropDownLink(): Promise<void> {
await this.contactACourtHeading.click();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { Locator, Page } from '@playwright/test';

import BasePage from '../../../pages/basePage.page';

export class CITChildDoBPage extends BasePage {
readonly childDetailsTitle: Locator;
readonly childDoBHeading: Locator;

readonly dayText: Locator;
readonly monthText: Locator;
readonly yearText: Locator;

readonly dayLabel: Locator;
readonly monthLabel: Locator;
readonly yearLabel: Locator;

readonly contactUsForHelpDropdownLink: Locator;
readonly contactACourtHeading: Locator;
readonly findACourtLink: Locator;

readonly errorDateSummary: Locator;
readonly errorDaySummary: Locator;
readonly errorMonthSummary: Locator;
readonly errorYearSummary: Locator;
readonly errorDayMonthSummary: Locator;
readonly errorDayYearSummary: Locator;
readonly errorMonthYearSummary: Locator;
readonly realDateSummary: Locator;
readonly errorOver18Summary: Locator;
readonly errorDateInPastSummary: Locator;

constructor(page: Page) {
super(page);
this.childDetailsTitle = page.getByText("The child's details");
this.childDoBHeading = page.getByRole('heading', { name: "What is the child's date of" });

this.dayText = page.getByText('Day');
this.monthText = page.getByText('Month', { exact: true });
this.yearText = page.getByText('Year', { exact: true });

this.dayLabel = page.getByRole('textbox', { name: 'Day' });
this.monthLabel = page.getByRole('textbox', { name: 'Month' });
this.yearLabel = page.getByRole('textbox', { name: 'Year' });

this.contactUsForHelpDropdownLink = page.getByText('Contact us for help');
this.contactACourtHeading = page.getByRole('heading', { name: 'Contact a court that deals' });
this.findACourtLink = page.getByRole('link', { name: 'Find a Court or Tribunal' });

this.errorDateSummary = page.getByRole('link', { name: 'Enter their date of birth' });
this.errorDaySummary = page.getByRole('link', { name: 'Date of birth must include a day' });
this.errorMonthSummary = page.getByRole('link', { name: 'Date of birth must include a month' });
this.errorYearSummary = page.getByRole('link', { name: 'Date of birth must include a year' });
this.errorDayMonthSummary = page.getByRole('link', { name: 'Date of birth must include a day and month' });
this.errorDayYearSummary = page.getByRole('link', { name: 'Date of birth must include a day and year' });
this.errorMonthYearSummary = page.getByRole('link', { name: 'Date of birth must include a month and year' });
this.realDateSummary = page.getByRole('link', { name: 'Date of birth must be a real date' });
this.errorOver18Summary = page.getByRole('link', { name: 'Child is 18 or over and cannot be adopted' });
this.errorDateInPastSummary = page.getByRole('link', { name: 'Date of birth must be in the past' });
}

async fillDayLabel(day: string): Promise<void> {
await this.dayLabel.fill(day);
}

async fillMonthLabel(month: string): Promise<void> {
await this.monthLabel.fill(month);
}

async fillYearLabel(year: string): Promise<void> {
await this.yearLabel.fill(year);
}
}
Loading