Skip to content

Commit

Permalink
#2820 - Program length form and label changes (#2845)
Browse files Browse the repository at this point in the history
- Updated the form labels for Education Program

![image](https://github.com/bcgov/SIMS/assets/78114138/890b48d1-9f51-4bd1-8dd4-df251a1abd69)
- Updated workflow
- Updated integration-utils
- Updated E2E
  • Loading branch information
andrepestana-aot authored Feb 21, 2024
1 parent ead0a8e commit b0d26a4
Show file tree
Hide file tree
Showing 16 changed files with 67 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe("EducationProgramInstitutionsController(e2e)-createEducationProgram", (
deliveredOnSite: true,
deliveredOnline: false,
},
completionYears: "12WeeksToLessThan1Year",
completionYears: "12WeeksTo52Weeks",
courseLoadCalculation: "credit",
regulatoryBody: "other",
otherRegulatoryBody: "Other RB test",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { getSQLFileData } from "../utilities/sqlLoader";

export class UpdateProgramLength1708121940221 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
getSQLFileData("Update-program-length.sql", "EducationPrograms"),
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
getSQLFileData("Rollback-update-program-length.sql", "EducationPrograms"),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
UPDATE
sims.education_programs
SET
completion_years = '52WeeksTo59Weeks'
where
completion_years = '53WeeksTo59Weeks';

UPDATE
sims.education_programs
SET
completion_years = '12WeeksToLessThan1Year'
where
completion_years = '12WeeksTo52Weeks';
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
UPDATE
sims.education_programs
SET
completion_years = '53WeeksTo59Weeks'
where
completion_years = '52WeeksTo59Weeks';

UPDATE
sims.education_programs
SET
completion_years = '12WeeksTo52Weeks'
where
completion_years = '12WeeksToLessThan1Year';
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("ECertPartTimeIntegrationService-createRequestContent", () => {
weeksOfStudy: 51,
fieldOfStudy: 15,
yearOfStudy: 1,
completionYears: "12WeeksToLessThan1Year",
completionYears: "12WeeksTo52Weeks",
enrollmentConfirmationDate: new Date("2023-11-03T19:59:44.913Z"),
dateOfBirth: new Date("1973-01-31T00:00:00.000Z"),
lastName: "SHAH",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
export function getTotalYearsOfStudy(completionYears: string): number {
switch (completionYears) {
case "12WeeksToLessThan1Year":
case "52WeeksTo59Weeks":
case "12WeeksTo52Weeks":
case "53WeeksTo59Weeks":
return 1;
case "60WeeksToLessThan2Years":
return 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ or (calculatedDataPartnerFedralProvincialPDReceiptCost &gt; 0)</bpmn:conditionEx
<bpmn:intermediateThrowEvent id="Event_0ff3d52" name="awardEligibilityBCAG">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=if institutionType = &#34;BC Public&#34; then (&#10;if ((calculatedDataFederalAssessedNeed + calculatedDataProvincialAssessedNeed) &#62;= 1)&#10; and (programCredentialType = &#34;undergraduateCitation&#34;&#10; or programCredentialType = &#34;undergraduateDegree&#34;&#10; or programCredentialType = &#34;graduateCertificate&#34;&#10; or programCredentialType = &#34;graduateDiploma&#34;&#10; or programCredentialType = &#34;qualifyingStudies&#34;)&#10; and (programLength = &#34;12WeeksToLessThan1Year&#34;&#10; or programLength = &#34;52WeeksTo59Weeks&#34;)&#10;then true &#10;else false&#10;)&#10;else false" target="awardEligibilityBCAG" />
<zeebe:output source="=if institutionType = &#34;BC Public&#34; then (&#10;if ((calculatedDataFederalAssessedNeed + calculatedDataProvincialAssessedNeed) &#62;= 1)&#10; and (programCredentialType = &#34;undergraduateCitation&#34;&#10; or programCredentialType = &#34;undergraduateDegree&#34;&#10; or programCredentialType = &#34;graduateCertificate&#34;&#10; or programCredentialType = &#34;graduateDiploma&#34;&#10; or programCredentialType = &#34;qualifyingStudies&#34;)&#10; and (programLength = &#34;12WeeksTo52Weeks&#34;&#10; or programLength = &#34;53WeeksTo59Weeks&#34;)&#10;then true &#10;else false&#10;)&#10;else false" target="awardEligibilityBCAG" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ao0mi8</bpmn:incoming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ or (calculatedDataPartnerFedralProvincialPDReceiptCost &gt; 0)</bpmn:conditionEx
<bpmn:intermediateThrowEvent id="Event_0ff3d52" name="awardEligibilityBCAG">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=if institutionType = &#34;BC Public&#34; then (&#10;if ((calculatedDataFederalAssessedNeed + calculatedDataProvincialAssessedNeed) &#62;= 1)&#10; and (programCredentialType = &#34;undergraduateCitation&#34;&#10; or programCredentialType = &#34;undergraduateDegree&#34;&#10; or programCredentialType = &#34;graduateCertificate&#34;&#10; or programCredentialType = &#34;graduateDiploma&#34;&#10; or programCredentialType = &#34;qualifyingStudies&#34;)&#10; and (programLength = &#34;12WeeksToLessThan1Year&#34;&#10; or programLength = &#34;52WeeksTo59Weeks&#34;)&#10;then true &#10;else false&#10;)&#10;else false" target="awardEligibilityBCAG" />
<zeebe:output source="=if institutionType = &#34;BC Public&#34; then (&#10;if ((calculatedDataFederalAssessedNeed + calculatedDataProvincialAssessedNeed) &#62;= 1)&#10; and (programCredentialType = &#34;undergraduateCitation&#34;&#10; or programCredentialType = &#34;undergraduateDegree&#34;&#10; or programCredentialType = &#34;graduateCertificate&#34;&#10; or programCredentialType = &#34;graduateDiploma&#34;&#10; or programCredentialType = &#34;qualifyingStudies&#34;)&#10; and (programLength = &#34;12WeeksTo52Weeks&#34;&#10; or programLength = &#34;53WeeksTo59Weeks&#34;)&#10;then true &#10;else false&#10;)&#10;else false" target="awardEligibilityBCAG" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ao0mi8</bpmn:incoming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ or (calculatedDataPartnerFedralProvincialPDReceiptCost &gt; 0)</bpmn:conditionEx
<bpmn:intermediateThrowEvent id="Event_0ff3d52" name="awardEligibilityBCAG">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=if institutionType = &#34;BC Public&#34; then (&#10;if ((calculatedDataFederalAssessedNeed + calculatedDataProvincialAssessedNeed) &#62;= 1)&#10; and (programCredentialType = &#34;undergraduateCitation&#34;&#10; or programCredentialType = &#34;undergraduateDegree&#34;&#10; or programCredentialType = &#34;graduateCertificate&#34;&#10; or programCredentialType = &#34;graduateDiploma&#34;&#10; or programCredentialType = &#34;qualifyingStudies&#34;)&#10; and (programLength = &#34;12WeeksToLessThan1Year&#34;&#10; or programLength = &#34;52WeeksTo59Weeks&#34;)&#10;then true &#10;else false&#10;)&#10;else false" target="awardEligibilityBCAG" />
<zeebe:output source="=if institutionType = &#34;BC Public&#34; then (&#10;if ((calculatedDataFederalAssessedNeed + calculatedDataProvincialAssessedNeed) &#62;= 1)&#10; and (programCredentialType = &#34;undergraduateCitation&#34;&#10; or programCredentialType = &#34;undergraduateDegree&#34;&#10; or programCredentialType = &#34;graduateCertificate&#34;&#10; or programCredentialType = &#34;graduateDiploma&#34;&#10; or programCredentialType = &#34;qualifyingStudies&#34;)&#10; and (programLength = &#34;12WeeksTo52Weeks&#34;&#10; or programLength = &#34;53WeeksTo59Weeks&#34;)&#10;then true &#10;else false&#10;)&#10;else false" target="awardEligibilityBCAG" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0ao0mi8</bpmn:incoming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-eligibility-BCAG
).filter((type) => !EXPECTED_PROGRAM_CREDENTIAL_TYPES.includes(type));
// Expected and not expected program length options.
const EXPECTED_PROGRAM_LENGTH = [
ProgramLengthOptions.WeeksToLessThanYear,
ProgramLengthOptions.FiftyTwoWeeksToFiftyNineWeeks,
ProgramLengthOptions.TwelveWeeksToFiftyTwoWeeks,
ProgramLengthOptions.FiftyThreeWeeksToFiftyNineWeeks,
];
const NOT_EXPECTED_PROGRAM_LENGTH = Object.values(
ProgramLengthOptions,
Expand Down Expand Up @@ -99,7 +99,7 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-eligibility-BCAG
assessmentConsolidatedData.programCredentialType =
CredentialType.GraduateDiploma;
assessmentConsolidatedData.programLength =
ProgramLengthOptions.FiftyTwoWeeksToFiftyNineWeeks;
ProgramLengthOptions.FiftyThreeWeeksToFiftyNineWeeks;
// Act
const calculatedAssessment =
await executeFullTimeAssessmentForProgramYear(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-eligibility-BCAG
).filter((type) => !EXPECTED_PROGRAM_CREDENTIAL_TYPES.includes(type));
// Expected and not expected program length options.
const EXPECTED_PROGRAM_LENGTH = [
ProgramLengthOptions.WeeksToLessThanYear,
ProgramLengthOptions.FiftyTwoWeeksToFiftyNineWeeks,
ProgramLengthOptions.TwelveWeeksToFiftyTwoWeeks,
ProgramLengthOptions.FiftyThreeWeeksToFiftyNineWeeks,
];
const NOT_EXPECTED_PROGRAM_LENGTH = Object.values(
ProgramLengthOptions,
Expand Down Expand Up @@ -99,7 +99,7 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-eligibility-BCAG
assessmentConsolidatedData.programCredentialType =
CredentialType.GraduateDiploma;
assessmentConsolidatedData.programLength =
ProgramLengthOptions.FiftyTwoWeeksToFiftyNineWeeks;
ProgramLengthOptions.FiftyThreeWeeksToFiftyNineWeeks;
// Act
const calculatedAssessment =
await executeFullTimeAssessmentForProgramYear(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-eligibility-BCAG
).filter((type) => !EXPECTED_PROGRAM_CREDENTIAL_TYPES.includes(type));
// Expected and not expected program length options.
const EXPECTED_PROGRAM_LENGTH = [
ProgramLengthOptions.WeeksToLessThanYear,
ProgramLengthOptions.FiftyTwoWeeksToFiftyNineWeeks,
ProgramLengthOptions.TwelveWeeksToFiftyTwoWeeks,
ProgramLengthOptions.FiftyThreeWeeksToFiftyNineWeeks,
];
const NOT_EXPECTED_PROGRAM_LENGTH = Object.values(
ProgramLengthOptions,
Expand Down Expand Up @@ -99,7 +99,7 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}-eligibility-BCAG
assessmentConsolidatedData.programCredentialType =
CredentialType.GraduateDiploma;
assessmentConsolidatedData.programLength =
ProgramLengthOptions.FiftyTwoWeeksToFiftyNineWeeks;
ProgramLengthOptions.FiftyThreeWeeksToFiftyNineWeeks;
// Act
const calculatedAssessment =
await executeFullTimeAssessmentForProgramYear(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export enum CredentialType {
}

export enum ProgramLengthOptions {
WeeksToLessThanYear = "12WeeksToLessThan1Year",
FiftyTwoWeeksToFiftyNineWeeks = "52WeeksTo59Weeks",
TwelveWeeksToFiftyTwoWeeks = "12WeeksTo52Weeks",
FiftyThreeWeeksToFiftyNineWeeks = "53WeeksTo59Weeks",
SixtyWeeksToTwoYears = "60WeeksToLessThan2Years",
TwoToThreeYears = "2YearsToLessThan3Years",
ThreeToFourYears = "3YearsToLessThan4Years",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2097,12 +2097,12 @@
"data": {
"values": [
{
"label": "12 weeks to less than 1 Year",
"value": "12WeeksToLessThan1Year"
"label": "12 weeks to 52 weeks",
"value": "12WeeksTo52Weeks"
},
{
"label": "52 weeks to 59 weeks",
"value": "52WeeksTo59Weeks"
"label": "53 weeks to 59 weeks",
"value": "53WeeksTo59Weeks"
},
{
"label": "60 weeks to less than 2 years",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ describe("Location Program", () => {
ProgramDeliveryOptions.OnSite
);
dashboardInstitutionObject.selectProgramLength(
ProgramLengthOptions.WeeksToLessThanYear
ProgramLengthOptions.TwelveWeeksToFiftyTwoWeeks
);
dashboardInstitutionObject.courseLoadCalculationRadioButton(
CourseLoadCalculationOptions.CreditBased
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export enum CredentialTypes {
}

export enum ProgramLengthOptions {
WeeksToLessThanYear = "12WeeksToLessThan1Year",
FiftyTwoWeeksToFiftyNineWeeks = "52WeeksTo59Weeks",
TwelveWeeksToFiftyTwoWeeks = "12WeeksTo52Weeks",
FiftyThreeWeeksToFiftyNineWeeks = "53WeeksTo59Weeks",
SixtyWeeksToTwoYears = "60WeeksToLessThan2Years",
TwoToThreeYears = "2YearsToLessThan3Years",
ThreeToFourYears = "3YearsToLessThan4Years",
Expand Down

0 comments on commit b0d26a4

Please sign in to comment.