From f45f6dd1d843ca7ef7e8dd60caadd1ad9681870f Mon Sep 17 00:00:00 2001 From: gmmagruder Date: Fri, 13 Dec 2024 16:40:08 +0000 Subject: [PATCH] Reverse changes --- .../case-details/case-details-page.ts | 5 - playwright-e2e/tests/Login.spec.ts | 129 +++++------------- 2 files changed, 37 insertions(+), 97 deletions(-) diff --git a/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts b/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts index 698a0dbded..aa46055a1a 100644 --- a/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts +++ b/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts @@ -109,9 +109,4 @@ export default class CaseDetailsPage extends ExuiPage(BasePage) { async submit() { throw new Error('Method not implemented.'); } - - async goToUrl() { - await super.clickByText('Tasks'); - await super.clickByText('Directions - Fast Track'); - } } diff --git a/playwright-e2e/tests/Login.spec.ts b/playwright-e2e/tests/Login.spec.ts index 94a5c736d3..3b3ff961a3 100644 --- a/playwright-e2e/tests/Login.spec.ts +++ b/playwright-e2e/tests/Login.spec.ts @@ -2,95 +2,40 @@ import { civilAdminUser } from '../config/users/exui-users'; import ccdEvents from '../fixtures/ccd-events/events'; import { test } from '../playwright-fixtures/index'; -test( - 'Testing Login', - { tag: '@debug' }, - async ({ - IdamSteps, - ExuiDashboardSteps, - ApiUserSteps, - ApiDataSteps, - _requestsFactory, - _exuiDashboardPageFactory, - _notifyClaimPageFactory, - _standardDirectionOrderPageFactory, - }) => { - await ApiUserSteps.SetupUserData(civilAdminUser); - // await ApiDataSteps.SetupBankHolidaysData(); - // await IdamSteps.ClaimantSolicitorLogin(); - await IdamSteps.JudgeRegion1Login(); - await ExuiDashboardSteps.GoToCaseList(); - - const { ccdRequests } = _requestsFactory; - const ccdCaseData = await ccdRequests.fetchCCDCaseData(civilAdminUser, 1732104739145327); - - const { caseDetailsPage } = _exuiDashboardPageFactory; - await caseDetailsPage.goToCaseDetails(1732104739145327); - await caseDetailsPage.goToUrl(); - - const { drawDirectionsOrderPage } = _standardDirectionOrderPageFactory; - await drawDirectionsOrderPage.verifyContent(ccdCaseData); - await drawDirectionsOrderPage.enterNoSumOfDamages(); - // await drawDirectionsOrderPage.enterSumOfDamages(); - await drawDirectionsOrderPage.submit(); - - const { claimsTrackPage } = _standardDirectionOrderPageFactory; - await claimsTrackPage.verifyContent(ccdCaseData); - await claimsTrackPage.enterSmallClaimsTrack(); - await claimsTrackPage.setAdditionalDirectionsSmallClaimsTrack(); - // await claimsTrackPage.setDisputeResolutionHearing(); - - // await claimsTrackPage.enterFastTrack(); - // await claimsTrackPage.setAdditionalDirectionsFastTrack(); - // await claimsTrackPage.setNoiseInducedHearingLoss(); - await claimsTrackPage.submit(); - - const { smallClaimsPage } = _standardDirectionOrderPageFactory; - await smallClaimsPage.verifyContent(ccdCaseData); - await smallClaimsPage.addJudgesRecital(); - await smallClaimsPage.addFlightDelay(); - await smallClaimsPage.addHearingTime(); - // await smallClaimsPage.removeHearingTime(); - await smallClaimsPage.addHearingMethod(); - await smallClaimsPage.addHearingNotes(); - await smallClaimsPage.addWelshLanguage(); - await smallClaimsPage.addImportantNotes(); - await smallClaimsPage.addDocuments(); - await smallClaimsPage.addWitnessStatement(); - await smallClaimsPage.restrictNumPages(); - await smallClaimsPage.restrictNumWitnesses(); - await smallClaimsPage.addCreditHire(); - await smallClaimsPage.addRoadTrafficAccident(); - await smallClaimsPage.addNewDirection(); - await smallClaimsPage.submit(); - - // const { smallClaimsDisputeResolutionHearingPage } = _standardDirectionOrderPageFactory - // await smallClaimsDisputeResolutionHearingPage.verifyContent(ccdCaseData); - - // const { fastTrackPage } = _standardDirectionOrderPageFactory; - // await fastTrackPage.verifyContent(ccdCaseData); - // await fastTrackPage.addAllocation(); - // await fastTrackPage.addJudgesRecital(); - // await fastTrackPage.addCreditHire(); - // await fastTrackPage.addAltDisputeResolution(); - - // await caseDetailsPage.goToCaseDetails(1732120625619001); - // await caseDetailsPage.verifyContent(ccdCaseData); - // await caseDetailsPage.retryChooseNextStep(ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM); - - // const { notifyClaimCOSDefendant1Page } = _notifyClaimPageFactory; - // await notifyClaimCOSDefendant1Page.verifyContent(ccdCaseData); - // await notifyClaimCOSDefendant1Page.fillDetails(); - // await notifyClaimCOSDefendant1Page.submit(); - - // const { notifyClaimCOSDefendant2Page } = _notifyClaimPageFactory; - // await notifyClaimCOSDefendant2Page.verifyContent(ccdCaseData); - // await notifyClaimCOSDefendant2Page.fillDetails(); - // await notifyClaimCOSDefendant2Page.submit(); - - // const { notifyClaimCOSSubmitPage } = _notifyClaimPageFactory; - // await notifyClaimCOSSubmitPage.verifyContent(ccdCaseData); - - // await notifyClaimDetailsCOSSubmitPage.submit(); - }, -); +test('Testing Login', async ({ + IdamSteps, + ExuiDashboardSteps, + ApiUserSteps, + ApiDataSteps, + _requestsFactory, + _exuiDashboardPageFactory, + _notifyClaimPageFactory, +}) => { + // await ApiUserSteps.SetupUserData(civilAdminUser); + // await ApiDataSteps.SetupBankHolidaysData(); + await IdamSteps.ClaimantSolicitorLogin(); + await ExuiDashboardSteps.GoToCaseList(); + + // const { ccdRequests } = _requestsFactory; + // const ccdCaseData = await ccdRequests.fetchCCDCaseData(1732120625619001, civilAdminUser); + + // const { caseDetailsPage } = _exuiDashboardPageFactory; + // await caseDetailsPage.goToCaseDetails(1732120625619001); + // await caseDetailsPage.verifyContent(ccdCaseData); + // await caseDetailsPage.retryChooseNextStep(ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM); + + // const { notifyClaimCOSDefendant1Page } = _notifyClaimPageFactory; + // await notifyClaimCOSDefendant1Page.verifyContent(ccdCaseData); + // await notifyClaimCOSDefendant1Page.fillDetails(); + // await notifyClaimCOSDefendant1Page.submit(); + + // const { notifyClaimCOSDefendant2Page } = _notifyClaimPageFactory; + // await notifyClaimCOSDefendant2Page.verifyContent(ccdCaseData); + // await notifyClaimCOSDefendant2Page.fillDetails(); + // await notifyClaimCOSDefendant2Page.submit(); + + // const { notifyClaimCOSSubmitPage } = _notifyClaimPageFactory; + // await notifyClaimCOSSubmitPage.verifyContent(ccdCaseData); + + // await notifyClaimDetailsCOSSubmitPage.submit(); +});