Skip to content

Commit 3ed24ca

Browse files
authored
Merge branch 'master' into stories/ecer-5513
2 parents cdd22ba + 36909e5 commit 3ed24ca

29 files changed

+1375
-192
lines changed

src/ECER.Clients.RegistryPortal/ECER.Clients.RegistryPortal.Server/ICRA/ICRAEligibilitiesEndpoints.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ public enum ICRAStatus
157157
Ineligible,
158158
InReview,
159159
ReadyforReview,
160-
Submitted
160+
Submitted,
161+
ReadyforAssessment
161162
}
162163

163164
public record ICRAEligibilitySubmissionRequest(string Id);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import selectors from "../../../support/selectors";
2+
import { courseStartDay, courseEndDay, todayDay } from "../../../support/utils";
3+
4+
describe("Managed Submitted ECE5Year Certification Add New WE Refrence", () => {
5+
it("should sucessfully create a New ECE 5 Year Application and add new WE reference", () => {
6+
/** Dashboard */
7+
cy.get(selectors.dashboard.applyNowButton).click();
8+
9+
/** Certification Type */
10+
cy.get(selectors.certificationType.applyNowEceFiveYearButton).click();
11+
12+
/** Application Requirements */
13+
cy.get(selectors.certificationType.iteCheckBox).uncheck({ force: true });
14+
cy.get(selectors.certificationType.sneCheckBox).uncheck({ force: true });
15+
cy.get(selectors.applicationRequirements.applyNowButton).click();
16+
17+
/** Declaration */
18+
cy.get(selectors.declaration.declarationCheckbox).check({ force: true });
19+
cy.get(selectors.declaration.continueButton).click();
20+
21+
/** Contact Information */
22+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
23+
24+
/** Education */
25+
cy.get(selectors.education.addEducationButton).click();
26+
27+
cy.get(selectors.education.provinceDropDownList).should("exist").type("British Columbia");
28+
29+
cy.get(selectors.education.postSecondaryInstitutionDropDownList).should("exist").type("Other");
30+
cy.get("body").click({ force: true });
31+
32+
cy.get(selectors.education.institutionNameInput).type("TEST Educational Institution");
33+
34+
cy.get(selectors.education.programNameInput).type("TEST ECE 5 Year Course");
35+
36+
/* Start Date - DatePicker*/
37+
cy.get(selectors.education.programStartDateInput).click({ force: true });
38+
cy.get(selectors.education.programStartDateInput).clear();
39+
cy.get(selectors.education.programStartDateInput).type(`${courseStartDay} {enter}`);
40+
41+
/* End Date - DatePicker*/
42+
cy.get(selectors.education.programEndDateInput).click({ force: true });
43+
cy.get(selectors.education.programEndDateInput).clear();
44+
cy.get(selectors.education.programEndDateInput).type(`${courseEndDay} {enter}`);
45+
46+
cy.get(selectors.education.studentIDInput).type("1234");
47+
cy.get(selectors.education.nameOnTranscriptRadioDiv).within(() => {
48+
cy.get(selectors.elementType.radio).first().check({ force: true });
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("CharacterReferenceLastName");
59+
cy.get(selectors.characterReference.firstNameInput).type("CharacterReferenceFirstName");
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+
/** Work Experience Reference */
66+
cy.document().its("readyState").should("eq", "complete");
67+
cy.get(selectors.workExperienceReference.addReferenceButton).click();
68+
69+
cy.get(selectors.workExperienceReference.lastNameInput).type("WorkReferenceLastName");
70+
cy.get(selectors.workExperienceReference.firstNameInput).type("WorkReferenceFirstName");
71+
cy.get(selectors.workExperienceReference.emailInput).type("[email protected]");
72+
cy.get(selectors.workExperienceReference.phoneNumberInput).type("1234567890");
73+
cy.get(selectors.workExperienceReference.hoursInput).type("500");
74+
75+
cy.get(selectors.workExperienceReference.saveReferenceButton).click();
76+
77+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
78+
79+
/** Application Review and Submit */
80+
cy.document().its("readyState").should("eq", "complete");
81+
82+
cy.contains("Review and submit").should("be.visible");
83+
cy.get(selectors.applicationPreview.certificationType).should("be.visible").should("contain.text", "ECE Five Year");
84+
cy.get(selectors.applicationPreview.characterReferenceFirstName).should("be.visible").should("contain.text", "CharacterReferenceFirstName");
85+
cy.get(selectors.applicationPreview.characterReferenceLastName).should("be.visible").should("contain.text", "CharacterReferenceLastName");
86+
cy.get(selectors.applicationPreview.characterReferenceEmail).should("be.visible").should("contain.text", "[email protected]");
87+
cy.get(selectors.applicationPreview.educationCountry).should("be.visible").should("contain.text", "Canada");
88+
cy.get(selectors.applicationPreview.educationProvince).should("be.visible").should("contain.text", "British Columbia");
89+
90+
cy.get(selectors.applicationPreview.workReferenceName).should("be.visible").should("contain.text", "WorkReferenceFirstName");
91+
cy.get(selectors.applicationPreview.workReferenceName).should("be.visible").should("contain.text", "WorkReferenceLastName");
92+
cy.get(selectors.applicationPreview.workReferenceEmail).should("be.visible").should("contain.text", "[email protected]");
93+
94+
cy.get(selectors.applicationWizard.submitApplicationButton).click();
95+
96+
/** Application Submitted */
97+
cy.document().its("readyState").should("eq", "complete");
98+
cy.get(selectors.applicationSubmitted.pageTitle).should("be.visible").should("contain.text", "Application Submitted");
99+
cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary");
100+
101+
// Manage Submitted Application
102+
cy.get(selectors.elementType.span_button).contains('Home').click();
103+
cy.reload();
104+
cy.get(selectors.elementType.span_button).contains('Manage Application').click();
105+
cy.get(selectors.elementType.text_links).contains('500 hours of work experience with reference').click()
106+
cy.get('body').then($body => {
107+
if ($body.find('p.text-links:contains("WorkReference")').length > 0) {
108+
// Element exists → click it
109+
cy.contains('Unhandled Status').should('be.visible')
110+
cy.get(selectors.elementType.span_button).contains('Add reference').click();
111+
} else {
112+
// Element not found → fallback
113+
cy.reload()
114+
cy.get(selectors.elementType.span_button).contains('Add reference').click();
115+
}
116+
});
117+
118+
cy.get('[aria-label="Last name"]').type("WorkReferenceLastName");
119+
cy.get('[aria-label="First name"]').type("WorkReferenceLastName");
120+
cy.get('[aria-label="Email"]').type("[email protected]");
121+
cy.get('[aria-label="Phone number (optional)"]').type("1234567890");
122+
cy.get('[aria-label="Work experience hours observed by reference"]').type("500");
123+
cy.get(selectors.elementType.span_button).contains('Save new reference').click();
124+
});
125+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
import selectors from "../../../support/selectors";
2+
import { courseStartDay, courseEndDay, todayDay } from "../../../support/utils";
3+
4+
describe("New ECE 5 Year + ITE & SNE Certificate Application", () => {
5+
it("should sucessfully create a New ECE 5 Year + ITE & SNE Application", () => {
6+
/** Dashboard */
7+
cy.get(selectors.dashboard.applyNowButton).click();
8+
9+
/** Certification Type */
10+
cy.get(selectors.certificationType.applyNowEceFiveYearButton).click();
11+
12+
/** Application Requirements */
13+
cy.get(selectors.applicationRequirements.applyNowButton).click();
14+
15+
/** Declaration */
16+
cy.get(selectors.declaration.declarationCheckbox).check({ force: true });
17+
cy.get(selectors.declaration.continueButton).click();
18+
19+
/** Contact Information */
20+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
21+
22+
/** Education */
23+
cy.get(selectors.education.addEducationButton).click();
24+
25+
cy.get(selectors.education.provinceDropDownList).should("exist").type("British Columbia");
26+
27+
cy.get(selectors.education.postSecondaryInstitutionDropDownList).should("exist").type("Other");
28+
cy.get("body").click({ force: true });
29+
30+
cy.get(selectors.education.institutionNameInput).type("TEST Educational Institution");
31+
32+
cy.get(selectors.education.programNameInput).type("TEST ECE 5 Year Course");
33+
34+
/* Start Date - DatePicker*/
35+
cy.get(selectors.education.programStartDateInput).click({ force: true });
36+
cy.get(selectors.education.programStartDateInput).clear();
37+
cy.get(selectors.education.programStartDateInput).type(`${courseStartDay} {enter}`);
38+
39+
/* End Date - DatePicker*/
40+
cy.get(selectors.education.programEndDateInput).click({ force: true });
41+
cy.get(selectors.education.programEndDateInput).clear();
42+
cy.get(selectors.education.programEndDateInput).type(`${courseEndDay} {enter}`);
43+
44+
cy.get(selectors.education.studentIDInput).type("1234");
45+
cy.get(selectors.education.nameOnTranscriptRadioDiv).within(() => {
46+
cy.get(selectors.elementType.radio).first().check({ force: true });
47+
});
48+
49+
cy.get(selectors.education.transcriptStatusRadioDiv).within(() => {
50+
cy.get(selectors.elementType.radio).first().check({ force: true });
51+
});
52+
cy.get(selectors.education.saveEducationButton).click();
53+
54+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
55+
56+
/** Character Reference */
57+
cy.get(selectors.characterReference.lastNameInput).type("CharacterReferenceLastName");
58+
cy.get(selectors.characterReference.firstNameInput).type("CharacterReferenceFirstName");
59+
cy.get(selectors.characterReference.emailInput).type("[email protected]");
60+
cy.get(selectors.characterReference.phoneNumberInput).type("1234567890");
61+
62+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
63+
64+
/** Work Experience Reference */
65+
cy.document().its("readyState").should("eq", "complete");
66+
cy.get(selectors.workExperienceReference.addReferenceButton).click();
67+
68+
cy.get(selectors.workExperienceReference.lastNameInput).type("WorkReferenceLastName");
69+
cy.get(selectors.workExperienceReference.firstNameInput).type("WorkReferenceFirstName");
70+
cy.get(selectors.workExperienceReference.emailInput).type("[email protected]");
71+
cy.get(selectors.workExperienceReference.phoneNumberInput).type("1234567890");
72+
cy.get(selectors.workExperienceReference.hoursInput).type("500");
73+
74+
cy.get(selectors.workExperienceReference.saveReferenceButton).click();
75+
76+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
77+
78+
/** Application Review and Submit */
79+
cy.document().its("readyState").should("eq", "complete");
80+
81+
cy.contains("Review and submit").should("be.visible");
82+
cy.get(selectors.applicationPreview.certificationType).should("be.visible").should("contain.text", "ECE Five Year");
83+
cy.get(selectors.applicationPreview.characterReferenceFirstName).should("be.visible").should("contain.text", "CharacterReferenceFirstName");
84+
cy.get(selectors.applicationPreview.characterReferenceLastName).should("be.visible").should("contain.text", "CharacterReferenceLastName");
85+
cy.get(selectors.applicationPreview.characterReferenceEmail).should("be.visible").should("contain.text", "[email protected]");
86+
cy.get(selectors.applicationPreview.educationCountry).should("be.visible").should("contain.text", "Canada");
87+
cy.get(selectors.applicationPreview.educationProvince).should("be.visible").should("contain.text", "British Columbia");
88+
89+
cy.get(selectors.applicationPreview.workReferenceName).should("be.visible").should("contain.text", "WorkReferenceFirstName");
90+
cy.get(selectors.applicationPreview.workReferenceName).should("be.visible").should("contain.text", "WorkReferenceLastName");
91+
cy.get(selectors.applicationPreview.workReferenceEmail).should("be.visible").should("contain.text", "[email protected]");
92+
93+
cy.get(selectors.applicationWizard.submitApplicationButton).click();
94+
95+
/** Application Submitted */
96+
cy.document().its("readyState").should("eq", "complete");
97+
cy.get(selectors.applicationSubmitted.pageTitle).should("be.visible").should("contain.text", "Application Submitted");
98+
cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary");
99+
// Manage Submitted Application
100+
cy.contains('span.v-btn__content', 'Home').click();
101+
cy.reload();
102+
cy.contains('span.v-btn__content', 'Manage Application').click();
103+
cy.contains('p.text-links', 'Course outlines or syllabi:').click()
104+
cy.get('input[aria-label="I have my course outlines or syllabi and will upload them now."]').check({ force: true });
105+
cy.contains('span.v-btn__content', 'Add file').click();
106+
107+
// Wait for hidden file input to appear in the DOM
108+
cy.get('input[type="file"]', { timeout: 10000 }).should('exist');
109+
110+
// Path relative to cypress/fixtures
111+
const filePath = 'Sample.pdf';
112+
113+
// Attach file directly to hidden input
114+
cy.get('input[type="file"]').attachFile(filePath);
115+
116+
// (Optional) Assert successful upload
117+
cy.contains('Upload complete').should('be.visible');
118+
cy.contains('span.v-btn__content', 'Save').click();
119+
});
120+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
import selectors from "../../../support/selectors";
2+
import { courseStartDay, courseEndDay, todayDay } from "../../../support/utils";
3+
4+
describe("managed Submitted ECE5Year Plus ITE and SNE Certification Add Program Confrimation", () => {
5+
it("should sucessfully create a New ECE 5 Year + ITE & SNE Application and Add Program Confirmation", () => {
6+
/** Dashboard */
7+
cy.get(selectors.dashboard.applyNowButton).click();
8+
9+
/** Certification Type */
10+
cy.get(selectors.certificationType.applyNowEceFiveYearButton).click();
11+
12+
/** Application Requirements */
13+
cy.get(selectors.applicationRequirements.applyNowButton).click();
14+
15+
/** Declaration */
16+
cy.get(selectors.declaration.declarationCheckbox).check({ force: true });
17+
cy.get(selectors.declaration.continueButton).click();
18+
19+
/** Contact Information */
20+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
21+
22+
/** Education */
23+
cy.get(selectors.education.addEducationButton).click();
24+
25+
cy.get(selectors.education.provinceDropDownList).should("exist").type("British Columbia");
26+
27+
cy.get(selectors.education.postSecondaryInstitutionDropDownList).should("exist").type("Other");
28+
cy.get("body").click({ force: true });
29+
30+
cy.get(selectors.education.institutionNameInput).type("TEST Educational Institution");
31+
32+
cy.get(selectors.education.programNameInput).type("TEST ECE 5 Year Course");
33+
34+
/* Start Date - DatePicker*/
35+
cy.get(selectors.education.programStartDateInput).click({ force: true });
36+
cy.get(selectors.education.programStartDateInput).clear();
37+
cy.get(selectors.education.programStartDateInput).type(`${courseStartDay} {enter}`);
38+
39+
/* End Date - DatePicker*/
40+
cy.get(selectors.education.programEndDateInput).click({ force: true });
41+
cy.get(selectors.education.programEndDateInput).clear();
42+
cy.get(selectors.education.programEndDateInput).type(`${courseEndDay} {enter}`);
43+
44+
cy.get(selectors.education.studentIDInput).type("1234");
45+
cy.get(selectors.education.nameOnTranscriptRadioDiv).within(() => {
46+
cy.get(selectors.elementType.radio).first().check({ force: true });
47+
});
48+
49+
cy.get(selectors.education.transcriptStatusRadioDiv).within(() => {
50+
cy.get(selectors.elementType.radio).first().check({ force: true });
51+
});
52+
cy.get(selectors.education.saveEducationButton).click();
53+
54+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
55+
56+
/** Character Reference */
57+
cy.get(selectors.characterReference.lastNameInput).type("CharacterReferenceLastName");
58+
cy.get(selectors.characterReference.firstNameInput).type("CharacterReferenceFirstName");
59+
cy.get(selectors.characterReference.emailInput).type("[email protected]");
60+
cy.get(selectors.characterReference.phoneNumberInput).type("1234567890");
61+
62+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
63+
64+
/** Work Experience Reference */
65+
cy.document().its("readyState").should("eq", "complete");
66+
cy.get(selectors.workExperienceReference.addReferenceButton).click();
67+
68+
cy.get(selectors.workExperienceReference.lastNameInput).type("WorkReferenceLastName");
69+
cy.get(selectors.workExperienceReference.firstNameInput).type("WorkReferenceFirstName");
70+
cy.get(selectors.workExperienceReference.emailInput).type("[email protected]");
71+
cy.get(selectors.workExperienceReference.phoneNumberInput).type("1234567890");
72+
cy.get(selectors.workExperienceReference.hoursInput).type("500");
73+
74+
cy.get(selectors.workExperienceReference.saveReferenceButton).click();
75+
76+
cy.get(selectors.applicationWizard.saveAndContinueButton).click();
77+
78+
/** Application Review and Submit */
79+
cy.document().its("readyState").should("eq", "complete");
80+
81+
cy.contains("Review and submit").should("be.visible");
82+
cy.get(selectors.applicationPreview.certificationType).should("be.visible").should("contain.text", "ECE Five Year");
83+
cy.get(selectors.applicationPreview.characterReferenceFirstName).should("be.visible").should("contain.text", "CharacterReferenceFirstName");
84+
cy.get(selectors.applicationPreview.characterReferenceLastName).should("be.visible").should("contain.text", "CharacterReferenceLastName");
85+
cy.get(selectors.applicationPreview.characterReferenceEmail).should("be.visible").should("contain.text", "[email protected]");
86+
cy.get(selectors.applicationPreview.educationCountry).should("be.visible").should("contain.text", "Canada");
87+
cy.get(selectors.applicationPreview.educationProvince).should("be.visible").should("contain.text", "British Columbia");
88+
89+
cy.get(selectors.applicationPreview.workReferenceName).should("be.visible").should("contain.text", "WorkReferenceFirstName");
90+
cy.get(selectors.applicationPreview.workReferenceName).should("be.visible").should("contain.text", "WorkReferenceLastName");
91+
cy.get(selectors.applicationPreview.workReferenceEmail).should("be.visible").should("contain.text", "[email protected]");
92+
93+
cy.get(selectors.applicationWizard.submitApplicationButton).click();
94+
95+
/** Application Submitted */
96+
cy.document().its("readyState").should("eq", "complete");
97+
cy.get(selectors.applicationSubmitted.pageTitle).should("be.visible").should("contain.text", "Application Submitted");
98+
cy.get(selectors.applicationSubmitted.applicationSummaryButton).should("be.visible").should("contain.text", "Go to application summary");
99+
// Manage Submitted Application
100+
cy.get(selectors.elementType.span_button).contains('Home').click();
101+
cy.reload();
102+
cy.get(selectors.elementType.span_button).contains('Manage Application').click();
103+
cy.get(selectors.elementType.text_links).contains('Program Confirmation Form:').click()
104+
cy.get('input[aria-label="I have my Program Confirmation Form and will upload it now."]').check({ force: true });
105+
cy.get(selectors.elementType.span_button).contains('Add file').click();
106+
107+
// Wait for hidden file input to appear in the DOM
108+
cy.get('input[type="file"]', { timeout: 10000 }).should('exist');
109+
110+
// Path relative to cypress/fixtures
111+
const filePath = 'Sample.pdf';
112+
113+
// Attach file directly to hidden input
114+
cy.get('input[type="file"]').attachFile(filePath);
115+
116+
// (Optional) Assert successful upload
117+
cy.contains('Upload complete').should('be.visible');
118+
cy.get(selectors.elementType.span_button).contains('Save').click();
119+
});
120+
});

0 commit comments

Comments
 (0)