-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #489 from DFE-Digital/CreateNewFAMApp
Create new fam app
- Loading branch information
Showing
24 changed files
with
1,429 additions
and
310 deletions.
There are no files selected for viewing
310 changes: 310 additions & 0 deletions
310
Dfe.Academies.External.Web/CypressTests/cypress/e2e/createNewFAMApp.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
|
||
import Header from "../page-objects/components/Header"; | ||
import CookieHeaderModal from "../page-objects/components/CookieHeaderModal"; | ||
import A2BHome from "../page-objects/pages/A2BHome"; | ||
import A2BLogin from "../page-objects/pages/A2BLogin"; | ||
import A2BYourApplications from "../page-objects/pages/A2BYourApplications"; | ||
import A2BWhatAreYouApplyingToDo from "../page-objects/pages/A2BWhatAreYouApplyingToDo"; | ||
import A2BWhatIsYourRole from "../page-objects/pages/A2BWhatIsYourRole"; | ||
import A2BWhatIsTheNameOfTheSchool from "../page-objects/pages/A2BWhatIsTheNameOfTheSchool"; | ||
import A2BYourApplication from "../page-objects/pages/A2BYourApplication"; | ||
import A2BAboutTheConversion from "../page-objects/pages/A2BAboutTheConversion"; | ||
import A2BMainContacts from "../page-objects/pages/A2BMainContacts"; | ||
import A2BConversionTargetDate from "../page-objects/pages/A2BConversionTargetDate"; | ||
import A2BReasonsForJoining from "../page-objects/pages/A2BReasonsForJoining"; | ||
import A2BChangingTheNameOfTheSchool from "../page-objects/pages/A2BChangingTheNameOfTheSchool"; | ||
import A2BAdditionalDetailsSummaryPage from "../page-objects/pages/A2BAdditionalDetailsSummaryPage"; | ||
import A2BAdditionalDetailsDetails from "../page-objects/pages/A2BAdditionalDetailsDetails"; | ||
import A2BFinanceSummary from "../page-objects/pages/A2BFinanceSummary"; | ||
import A2BPreviousFinancialYear from "../page-objects/pages/A2BPreviousFinancialYear"; | ||
import A2BCurrentFinancialYear from "../page-objects/pages/A2BCurrentFinancialYear"; | ||
import A2BNextFinancialYear from "../page-objects/pages/A2BNextFinancialYear"; | ||
import A2BLoansSummary from "../page-objects/pages/A2BLoansSummary"; | ||
import A2BLeasesSummary from "../page-objects/pages/A2BLeasesSummary"; | ||
import A2BFinancialInvestigations from "../page-objects/pages/A2BFinancialInvestigations"; | ||
import A2BFuturePupilNumbersSummary from "../page-objects/pages/A2BFuturePupilNumbersSummary"; | ||
import A2BFuturePupilNumbersDetails from "../page-objects/pages/A2BFuturePupilNumbersDetails"; | ||
import A2BLandAndBuildingsSummary from "../page-objects/pages/A2BLandAndBuildingsSummary"; | ||
import A2BLandAndBuildingsDetails from "../page-objects/pages/A2BLandAndBuildingsDetails"; | ||
import A2BConsultationSummary from "../page-objects/pages/A2BConsultationSummary"; | ||
import A2BConsultationDetails from "../page-objects/pages/A2BConsultationDetails"; | ||
import A2BPreOpeningSupportGrantSummary from "../page-objects/pages/A2BPre-openingSupportGrantSummary"; | ||
import A2BPreopeningSupportGrantDetails from "../page-objects/pages/A2BPre-openingSupportGrantDetails"; | ||
import A2BDeclarationSummary from "../page-objects/pages/A2BDeclarationSummary"; | ||
import A2BDeclaration from "../page-objects/pages/A2BDeclaration"; | ||
import A2BSuccessfulApplicationSubmitted from "../page-objects/pages/A2BSuccessfulApplicationSubmitted"; | ||
import Footer from "../page-objects/components/Footer"; | ||
import A2BFAMSchoolOverview from "../page-objects/pages/A2BFAMSchoolOverview"; | ||
import A2BFAMTrustname from "../page-objects/pages/A2BFAMTrustname"; | ||
import A2BFAMTrustOverview from "../page-objects/pages/A2BFAMTrustOverview"; | ||
import A2BFAMTrustOpeningDateSummary from "../page-objects/pages/A2BFAMTrustOpeningDateSummary"; | ||
import A2BFAMTrustOpeningDateDetails from "../page-objects/pages/A2BFAMTrustOpeningDateDetails"; | ||
import A2BFAMReasonsForFormingTrustSummary from "../page-objects/pages/A2BFAMReasonsForFormingTrustSummary"; | ||
import A2BFAMReasonsForFormingTrustDetails from "../page-objects/pages/A2BFAMReasonsForFormingTrustDetails"; | ||
import A2BFAMTrustPlansForGrowthSummary from "../page-objects/pages/A2BFAMPlansForGrowthSummary"; | ||
import A2BFAMTrustPlansForGrowthDetails from "../page-objects/pages/A2BFAMPlansForGrowthDetails"; | ||
import A2BFAMSchoolImprovementStrategySummary from "../page-objects/pages/A2BFAMSchoolImprovementStrategySummary"; | ||
import A2BFAMSchoolImprovementStrategyDetails from "../page-objects/pages/A2BFAMSchoolImprovementStrategyDetails.ts" | ||
import A2BFAMGovernanceStructureSummary from "../page-objects/pages/A2BFAMGovernanceStructureSummary"; | ||
import A2BFAMGovernanceStructureDetails from "../page-objects/pages/A2BFAMGovernanceStructureDetails"; | ||
import A2BFAMKeyPeopleSummary from "../page-objects/pages/A2BFAMKeyPeopleSummary"; | ||
import A2BFAMKeyPersonDetails from "../page-objects/pages/A2BFAMKeyPersonDetails"; | ||
|
||
describe("View Application Tests", () => { | ||
beforeEach(function () { | ||
cy.visit(Cypress.env('URL')); | ||
|
||
Header.govUkHeaderVisible(); | ||
Header.applyToBecomeAnAcademyHeaderLinkVisible(); | ||
|
||
A2BHome.homePageElementsVisible(); | ||
|
||
Footer.checkFooterLinksVisible(); | ||
|
||
CookieHeaderModal.clickAcceptAnalyticsCookies(); | ||
A2BHome.clickStartNow(); | ||
}); | ||
|
||
it("should be able to create a New Application", () => { | ||
A2BLogin.login(Cypress.env('LOGIN_USERNAME'), Cypress.env('LOGIN_PASSWORD')); | ||
|
||
A2BYourApplications.selectStartANewApplication(); | ||
|
||
A2BWhatAreYouApplyingToDo.selectFAMRadioButtonVerifyAndSubmit() | ||
|
||
A2BWhatIsYourRole.selectChairOfGovernorsRadioButtonVerifyAndSubmit(); | ||
|
||
A2BYourApplication.FAMApplicationNotStartedElementsVisible(); | ||
|
||
A2BYourApplication.selectAddASchool(); | ||
|
||
A2BWhatIsTheNameOfTheSchool.selectSchoolName(); | ||
|
||
A2BYourApplication.FAMApplicationNotStartedSchoolAddedElementsVisible() | ||
|
||
A2BYourApplication.selectFAMSchool() | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageNotStartedElementsVisible() | ||
|
||
A2BYourApplication.selectAboutTheConversion(); | ||
|
||
A2BAboutTheConversion.selectContactDetailsStartSection(); | ||
|
||
A2BMainContacts.fillMainContactDetailsAndSubmit(); | ||
|
||
A2BConversionTargetDate.selectConversionTargetDateOptionNo(); | ||
|
||
A2BConversionTargetDate.conversionTargetDateSubmit(); | ||
|
||
A2BReasonsForJoining.reasonsForJoiningInputAndSubmit(); | ||
|
||
A2BChangingTheNameOfTheSchool.changingTheNameOfTheSchoolSelectOptionNo(); | ||
|
||
A2BChangingTheNameOfTheSchool.submitChangingTheNameOfTheSchool(); | ||
|
||
A2BAboutTheConversion.aboutTheConversionCompleteElementsVisible(); | ||
|
||
A2BAboutTheConversion.submitAboutTheConversion(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageAboutConversionCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectFurtherInformation(); | ||
|
||
A2BAdditionalDetailsSummaryPage.selectAdditionalDetailsStartSection(); | ||
|
||
A2BAdditionalDetailsDetails.fillAdditionalDetailsDetailsAndSubmit(); | ||
|
||
A2BAdditionalDetailsSummaryPage.additionalDetailsSummaryCompleteElementsVisible(); | ||
|
||
A2BAdditionalDetailsSummaryPage.submitAdditionalDetailsSummary(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageFurtherInformationCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectFinances() | ||
|
||
A2BFinanceSummary.selectPreviousFinancialYrStartSection(); | ||
|
||
A2BPreviousFinancialYear.inputPreviousFinancialYrDataAndSubmit(); | ||
|
||
A2BCurrentFinancialYear.inputCurrentFinancialYrDataAndSubmit(); | ||
|
||
A2BNextFinancialYear.inputNextFinancialYrDataAndSubmit(); | ||
|
||
A2BLoansSummary.selectLoansOptionNo(); | ||
|
||
A2BLoansSummary.submitLoansSummary(); | ||
|
||
A2BLeasesSummary.leasesSelectOptionNo(); | ||
|
||
A2BLeasesSummary.submitLeasesSummary(); | ||
|
||
A2BFinancialInvestigations.selectFinancialInvestigationsOptionNo(); | ||
|
||
A2BFinancialInvestigations.submitFinancialInvestigations(); | ||
|
||
A2BFinanceSummary.financeSummaryCompleteElementsVisible(); | ||
|
||
A2BFinanceSummary.submitFinanceSummary(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageFinancesCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectFuturePupilNumbers() | ||
|
||
A2BFuturePupilNumbersSummary.selectFuturePupilNumbersStartSection(); | ||
|
||
A2BFuturePupilNumbersDetails.fillFuturePupilNumbersDetails(); | ||
|
||
A2BFuturePupilNumbersDetails.submitFuturePupilNumbersDetails(); | ||
|
||
A2BFuturePupilNumbersSummary.futurePupilNumbersSummaryCompleteElementsVisible(); | ||
|
||
A2BFuturePupilNumbersSummary.submitFuturePupilNumbersSummary(); | ||
|
||
A2BYourApplication.FAMApplicationFuturePupilNumbersSubmittedElementsVisible() | ||
|
||
A2BYourApplication.selectFAMSchool() | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageFuturePupilNumbersCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectLandAndBuildings() | ||
|
||
A2BLandAndBuildingsSummary.selectLandAndBuildingsStartSection(); | ||
|
||
A2BLandAndBuildingsDetails.fillLandAndBuildingsDetailsDataAndSubmit(); | ||
|
||
A2BLandAndBuildingsSummary.landAndBuildingsSummaryCompleteElementsVisible(); | ||
|
||
A2BLandAndBuildingsSummary.submitLandAndBuildingsSummary(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageLandAndBuildingsCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectConsultation(); | ||
|
||
A2BConsultationSummary.selectConsultationStartSection(); | ||
|
||
A2BConsultationDetails.selectHasGovBodyConsultedStakeholdersOptionNo(); | ||
|
||
A2BConsultationDetails.fillConsultationDetails(); | ||
|
||
A2BConsultationDetails.submitConsultationDetails(); | ||
|
||
A2BConsultationSummary.consultationSummaryCompleteElementsVisible(); | ||
|
||
A2BConsultationSummary.submitConsultationSummary(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageConsultationCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectPreopeningSupportGrant() | ||
|
||
A2BPreOpeningSupportGrantSummary.selectPreopeningSupportGrantStartSection(); | ||
|
||
A2BPreopeningSupportGrantDetails.FAMSelectToTheSchoolVerifyAndSubmitPreopeningSupportGrantDetails(); | ||
|
||
A2BPreOpeningSupportGrantSummary.preopeningSupportGrantSummaryCompleteElementsVisible(); | ||
|
||
A2BPreOpeningSupportGrantSummary.submitPreopeningSupportGrantSummary(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPagePreopeningSupportGrantCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectDeclaration(); | ||
|
||
A2BDeclarationSummary.declarationStartSection(); | ||
|
||
A2BDeclaration.selectAgreementsVerifyAndSubmit(); | ||
|
||
A2BDeclarationSummary.declarationSummaryCompleteElementsVisible(); | ||
|
||
A2BDeclarationSummary.submitDeclarationSummary(); | ||
|
||
A2BFAMSchoolOverview.FAMSchoolOverviewPageDeclarationCompleteElementsVisible() | ||
|
||
A2BFAMSchoolOverview.selectSaveAndReturn() | ||
|
||
A2BYourApplication.FAMApplicationSchoolCompleteElementsVisible() | ||
|
||
A2BYourApplication.selectFAMAddTheTrust() | ||
|
||
A2BFAMTrustname.FAMEnterTrustnameAndSubmit() | ||
|
||
A2BYourApplication.FAMApplicationTrustNameComplete() | ||
|
||
A2BYourApplication.selectFAMTrustDetails() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewTrustNameCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectOpeningDate() | ||
|
||
A2BFAMTrustOpeningDateSummary.selectStartSection() | ||
|
||
A2BFAMTrustOpeningDateDetails.selectDayAndInput() | ||
|
||
A2BFAMTrustOpeningDateDetails.selectMonthAndInput() | ||
|
||
A2BFAMTrustOpeningDateDetails.selectYearAndInput() | ||
|
||
A2BFAMTrustOpeningDateDetails.FAMTrustOpeningDateInputApproverDetailsAndSubmit() | ||
|
||
A2BFAMTrustOpeningDateSummary.FAMOpeningDateSummaryCompleteElementsVisibleAndSubmit() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewOpeningDateCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectReasonsForFormingTheTrust() | ||
|
||
A2BFAMReasonsForFormingTrustSummary.selectStartSection() | ||
|
||
A2BFAMReasonsForFormingTrustDetails.FAMFillReasonsForFormingTrustAndSubmit() | ||
|
||
A2BFAMReasonsForFormingTrustSummary.FAMReasonsForFormingTrustSummaryCompleteElementsVisibleAndSubmit() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewReasonsForFormingTrustCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectPlansForGrowth() | ||
|
||
A2BFAMTrustPlansForGrowthSummary.selectStartSection() | ||
|
||
A2BFAMTrustPlansForGrowthDetails.inputPlansForGrowthAndSubmit() | ||
|
||
A2BFAMTrustPlansForGrowthSummary.FAMPlansForGrowthSummaryCompleteElementsVisibleAndSubmit() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewPlansForGrowthCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectSchoolImprovementStrategy() | ||
|
||
A2BFAMSchoolImprovementStrategySummary.selectStartSection() | ||
|
||
A2BFAMSchoolImprovementStrategyDetails.fillSchoolImprovementStrategyAndSubmit() | ||
|
||
A2BFAMSchoolImprovementStrategySummary.schoolImprovementStrategyCompleteElementsVisibleAndSubmit() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewSchoolImprovementStrategyCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectGovernanceStructure() | ||
|
||
A2BFAMGovernanceStructureSummary.selectStartSection() | ||
|
||
A2BFAMGovernanceStructureDetails.uploadFileAndSubmit() | ||
|
||
A2BFAMGovernanceStructureSummary.FAMGovernanceStructureSummaryCompleteElementsVisibleAndSubmit() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewGovernanceStructureCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectKeyPeople() | ||
|
||
A2BFAMKeyPeopleSummary.selectAddKeyPerson() | ||
|
||
A2BFAMKeyPersonDetails.fillKeyPersonDetailsAndSubmit() | ||
|
||
A2BFAMKeyPeopleSummary.FAMKeyPeopleSummaryCompleteElementsVisibleAndSubmit() | ||
|
||
A2BFAMTrustOverview.FAMTrustOverviewKeyPeopleCompleteElementsVisible() | ||
|
||
A2BFAMTrustOverview.selectReturnToYourApplication() | ||
|
||
A2BYourApplication.FAMApplicationOverviewCompleteElementsVisible() | ||
|
||
A2BYourApplication.submitApplication() | ||
|
||
A2BSuccessfulApplicationSubmitted.applicationSubmittedSuccessfullyElementsVisible() | ||
|
||
}); | ||
}); |
41 changes: 10 additions & 31 deletions
41
Dfe.Academies.External.Web/CypressTests/cypress/fixtures/data-generator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
10 changes: 10 additions & 0 deletions
10
....External.Web/CypressTests/cypress/page-objects/pages/A2BFAMGovernanceStructureDetails.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import BasePage from "../BasePage" | ||
export default class A2BFAMGovernanceStructureDetails extends BasePage { | ||
|
||
static uploadFileAndSubmit() | ||
{ | ||
const filepath = '../fixtures/fifty-k.docx' | ||
cy.get('#governanceDetailsFileUpload').attachFile(filepath) | ||
cy.get('input[type="submit"]').should('be.visible').contains('Save and continue').click() | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
....External.Web/CypressTests/cypress/page-objects/pages/A2BFAMGovernanceStructureSummary.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import BasePage from "../BasePage" | ||
export default class A2BFAMGovernanceStructureSummary extends BasePage { | ||
static selectStartSection() | ||
{ | ||
cy.contains('Start section').click() | ||
} | ||
|
||
static FAMGovernanceStructureSummaryCompleteElementsVisibleAndSubmit() | ||
{ | ||
cy.get('.govuk-link').eq(1).contains('Change your answers') | ||
|
||
cy.get('p').eq(2).contains('fiftyk.docx') | ||
cy.get('.govuk-button').should('be.visible').contains('Save and return to your application').click() | ||
|
||
} | ||
} |
Oops, something went wrong.