|
| 1 | +import selectors from "../../../support/selectors"; |
| 2 | +import { courseStartDay, courseEndDay } from "../../../support/utils"; |
| 3 | + |
| 4 | +describe("Renew Active ECE 5 Year Certificate Application", () => { |
| 5 | + it("should sucessfully create a Renewal ECE 5 Year Application", () => { |
| 6 | + cy.seedRenewalApplication("ECE5Years", true, false); |
| 7 | + |
| 8 | + cy.reload(); |
| 9 | + /** Dashboard */ |
| 10 | + cy.get(selectors.dashboard.multiApplyButton).first().click(); |
| 11 | + |
| 12 | + /** Application Requirements */ |
| 13 | + cy.get(selectors.certificationType.applyNowEceAssistantButton).click(); |
| 14 | + cy.get(selectors.applicationRequirements.applyNowButton).click(); |
| 15 | + |
| 16 | + /** Declaration */ |
| 17 | + cy.get(selectors.declaration.declarationCheckbox).check({ force: true }); |
| 18 | + cy.get(selectors.declaration.continueButton).click(); |
| 19 | + |
| 20 | + /** Contact Information */ |
| 21 | + cy.get(selectors.applicationWizard.saveAndContinueButton).click(); |
| 22 | + |
| 23 | + /** Professional Development */ |
| 24 | + cy.get(selectors.education.addEducationButton).click(); |
| 25 | + |
| 26 | + cy.get(selectors.education.provinceDropDownList).should("exist").type("British Columbia"); |
| 27 | + |
| 28 | + cy.get(selectors.education.postSecondaryInstitutionDropDownList).should("exist").type("Other"); |
| 29 | + cy.get("body").click({ force: true }); |
| 30 | + |
| 31 | + cy.get(selectors.education.institutionNameInput).type("TEST Educational Institution"); |
| 32 | + |
| 33 | + cy.get(selectors.education.programNameInput).type("TEST ECE Assistant Course"); |
| 34 | + |
| 35 | + /* Start Date - DatePicker*/ |
| 36 | + cy.get(selectors.education.programStartDateInput).click({ force: true }); |
| 37 | + cy.get(selectors.education.programStartDateInput).clear(); |
| 38 | + cy.get(selectors.education.programStartDateInput).type(`${courseStartDay} {enter}`); |
| 39 | + |
| 40 | + /* End Date - DatePicker*/ |
| 41 | + cy.get(selectors.education.programEndDateInput).click({ force: true }); |
| 42 | + cy.get(selectors.education.programEndDateInput).clear(); |
| 43 | + cy.get(selectors.education.programEndDateInput).type(`${courseEndDay} {enter}`); |
| 44 | + |
| 45 | + cy.get(selectors.education.studentIDInput).type("1234"); |
| 46 | + cy.get(selectors.education.nameOnTranscriptRadioDiv).within(() => { |
| 47 | + cy.get(selectors.elementType.radio).first().check({ force: true }); |
| 48 | + }); |
| 49 | + |
| 50 | + cy.get(selectors.education.transcriptStatusRadioDiv).within(() => { |
| 51 | + cy.get(selectors.elementType.radio).first().check({ force: true }); |
| 52 | + }); |
| 53 | + cy.get(selectors.education.saveEducationButton).click(); |
| 54 | + |
| 55 | + cy.get(selectors.applicationWizard.saveAndContinueButton).click(); |
| 56 | + |
| 57 | + /** Character Reference */ |
| 58 | + cy.get(selectors.characterReference.lastNameInput).type("Reference Last Name"); |
| 59 | + cy.get(selectors.characterReference.firstNameInput).type("Reference First Name"); |
| 60 | + cy.get(selectors.characterReference.emailInput).type("[email protected]"); |
| 61 | + cy.get(selectors.characterReference.phoneNumberInput).type("1234567890"); |
| 62 | + |
| 63 | + cy.get(selectors.applicationWizard.saveAndContinueButton).click(); |
| 64 | + |
| 65 | + /** Application Review and Submit */ |
| 66 | + cy.document().its("readyState").should("eq", "complete"); |
| 67 | + cy.contains("Review and submit").should("be.visible"); |
| 68 | + cy.get(selectors.applicationPreview.certificationType).should("be.visible").should("contain.text", "ECE Assistant"); |
| 69 | + cy.get(selectors.applicationPreview.characterReferenceFirstName).should("be.visible").should("contain.text", "Reference First Name"); |
| 70 | + cy.get(selectors.applicationPreview.characterReferenceLastName).should("be.visible").should("contain.text", "Reference Last Name"); |
| 71 | + cy.get(selectors.applicationPreview.characterReferenceEmail).should("be.visible").should("contain.text", "[email protected]"); |
| 72 | + |
| 73 | + cy.get(selectors.applicationPreview.educationCountry).should("be.visible").should("contain.text", "Canada"); |
| 74 | + |
| 75 | + cy.get(selectors.applicationPreview.educationProvince).should("be.visible").should("contain.text", "British Columbia"); |
| 76 | + cy.get(selectors.applicationWizard.submitApplicationButton).click(); |
| 77 | + |
| 78 | + /** Application Submitted */ |
| 79 | + cy.document().its("readyState").should("eq", "complete"); |
| 80 | + cy.get(selectors.applicationSubmitted.pageTitle).should("be.visible").should("contain.text", "Application Submitted"); |
| 81 | + cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary"); |
| 82 | + }); |
| 83 | +}); |
0 commit comments