From 77d14514e816f9e0d077718e2f1abd36c8fd328a Mon Sep 17 00:00:00 2001 From: AustenStevensMOJ Date: Mon, 16 Dec 2024 11:56:45 +0000 Subject: [PATCH 1/2] Sign in navigateTo function added --- playwright-e2e/helpers/e2eJourneyHelper.ts | 2 ++ playwright-e2e/tests/smoke.spec.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/playwright-e2e/helpers/e2eJourneyHelper.ts b/playwright-e2e/helpers/e2eJourneyHelper.ts index fdcccea61..23dbde7a6 100644 --- a/playwright-e2e/helpers/e2eJourneyHelper.ts +++ b/playwright-e2e/helpers/e2eJourneyHelper.ts @@ -6,6 +6,7 @@ export async function citizenAdoptionSignInWithNoPartner( userPassword: string, locator: string ): Promise { + await app.signIn.navigateTo(); await app.signIn.signIn(userEmail, userPassword); await app.numberOfApplicants.numberOfApplication(locator); await app.numberOfApplicants.fillNotSpouseOrCivilPartnerDetails('Text to be randomly generated'); @@ -19,6 +20,7 @@ export async function citizenAdoptionSignInWithPartner( userPassword: string, locator: string ): Promise { + await app.signIn.navigateTo(); await app.signIn.signIn(userEmail, userPassword); await app.numberOfApplicants.numberOfApplication(locator); await app.basePage.clickSaveAndContinue(); diff --git a/playwright-e2e/tests/smoke.spec.ts b/playwright-e2e/tests/smoke.spec.ts index ab856bffb..7fb571ff8 100644 --- a/playwright-e2e/tests/smoke.spec.ts +++ b/playwright-e2e/tests/smoke.spec.ts @@ -48,6 +48,7 @@ test.describe('smoke test', () => { const appOneName = await app.applicantOneNameCreate(); const childNames = await app.childNameCreate(); + await app.signIn.navigateTo(); await app.signIn.signIn(userEmail, userPassword); await app.numberOfApplicants.numberOfApplication(applicantNumber); await app.basePage.clickSaveAndContinue(); From d81d89ff7c9caa9a256c3ac543a50cd4300e9e38 Mon Sep 17 00:00:00 2001 From: AustenStevensMOJ Date: Wed, 8 Jan 2025 10:03:32 +0000 Subject: [PATCH 2/2] Fixed month indexing --- playwright-e2e/pages/reviewSubmit.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-e2e/pages/reviewSubmit.page.ts b/playwright-e2e/pages/reviewSubmit.page.ts index 916b5bdda..f65ae1ace 100644 --- a/playwright-e2e/pages/reviewSubmit.page.ts +++ b/playwright-e2e/pages/reviewSubmit.page.ts @@ -86,7 +86,7 @@ export default class ReviewSubmit extends BasePage { await expect(this.cardDetailsH1).toBeVisible(); await expect(this.cost).toBeVisible(); await this.cardNumber.fill('4444333322221111'); - await this.expMonth.fill(`${today.getMonth()}`); + await this.expMonth.fill(`${today.getMonth() + 1}`); await this.expYear.fill(`${today.getFullYear() + 2}`); await this.cardName.fill(name); await this.securityCode.fill('123');