Skip to content

Commit

Permalink
Merge pull request #1005 from bcgov/feature/verifyCareerProgramAT
Browse files Browse the repository at this point in the history
EDX-1252 & 1253 Career and French AT
  • Loading branch information
SodhiA1 authored Aug 30, 2023
2 parents e6880d1 + 81add28 commit ee89059
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('SDC School Collection View', () => {
cy.task<SchoolCollection>('setup-collections', {
school: res.school,
loadWithStudentAndValidations: true,
seedData: 'stepThreeSeedData'
seedData: 'careerProgramsSeedData'
});
cy.task<SchoolUserOptions, EdxUserEntity>('setup-schoolUser', { schoolCodes: ['99998'] });
});
Expand All @@ -18,15 +18,12 @@ describe('SDC School Collection View', () => {
beforeEach(() => cy.login());

it('can load dashboard & click data collection card & process collection', () => {
cy.intercept(Cypress.env('interceptors').collection_students_pagination).as('pagination');

cy.visit('/');
cy.get(selectors.dashboard.title).contains('Dashboard | EDX Automation Testing School');
cy.get(selectors.dashboard.dataCollectionsTileTitle).contains('Data Collections');
cy.get(selectors.dashboard.dataCollectionsTile).click();
cy.get(selectors.dataCollectionsLanding.title).should('exist').contains('Student Level Data (1701) | EDX Automation Testing School');
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();

// Step three of collection - edit/verify data
cy.get(selectors.studentLevelData.nextButton).click();
});
Expand All @@ -36,10 +33,8 @@ describe('SDC School Collection View', () => {
cy.visit('/');
cy.get(selectors.dashboard.dataCollectionsTile).click();
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();

// Step three of collection - edit/verify data
cy.get(selectors.studentLevelData.nextButton).click();
cy.get(selectors.studentLevelData.studentsFound).should('exist').contains(2);
cy.get(selectors.studentLevelData.studentsFound).should('exist').contains(3);

cy.get('.td-data').each(cell => {
const cellText = cell.text()
Expand All @@ -48,5 +43,41 @@ describe('SDC School Collection View', () => {
}
});
});


it('verifies french programs for reported students', () => {
cy.intercept(Cypress.env('interceptors').collection_students_pagination).as('pagination');
cy.visit('/');
cy.get(selectors.dashboard.dataCollectionsTile).click();
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();
cy.get(selectors.studentLevelData.nextButton).click();
cy.get('button[value="French Programs"]').click();
cy.get('.td-data').each(cell => {
const cellText = cell.text()
if (cellText === '08-CORE FRENCH' || cellText === '11-EARLY FRENCH IM') {
cy.log('Correct french enrolled program value expected')
}
});

});

it('verifies career programs for reported students', () => {
cy.intercept(Cypress.env('interceptors').collection_students_pagination).as('pagination');
cy.visit('/');
cy.get(selectors.dashboard.dataCollectionsTile).click();
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();
cy.get(selectors.studentLevelData.nextButton).click();
cy.get('button[value="Career Programs"]').click();

cy.get('.td-data').each(cell => {
const cellText = cell.text()
cy.log(cellText)
if (cellText === '41-CO-OPXA-BUSINESS & APPLIED BUSINESS' || cellText === '43-CAREER TECHNICAXH-TRADES & TECHNOLOGY') {
cy.log('Correct career enrolled program value expected')
}
});


});
});
});
169 changes: 163 additions & 6 deletions tests-e2e/cypress/services/sdc-collection-api-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export class SdcCollectionApiService {

]
}
} else if (schoolCollection.seedData === 'stepThreeSeedData') {
}
else if (schoolCollection.seedData === 'stepThreeSeedData') {
sdcSchoolCollectionPayload = {
"createUser": "EDXAT",
"updateUser": null,
Expand Down Expand Up @@ -250,27 +251,183 @@ export class SdcCollectionApiService {
"updateUser": null,
"createDate": null,
"updateDate": null,
"enrolledProgramCode": "40"
},
"enrolledProgramCode": "08"
}
]
},
]
}
}
else if (schoolCollection.seedData === 'careerProgramsSeedData') {
sdcSchoolCollectionPayload = {
"createUser": "EDXAT",
"updateUser": null,
"createDate": null,
"updateDate": null,
"sdcSchoolCollectionID": null,
"collectionID": newCollection.collectionID,
"schoolID": schoolCollection?.school.schoolId,
"districtID": schoolCollection?.school.districtId,
"uploadDate": "20230822",
"uploadFileName": "EDX-AT-FILE.std",
"sdcSchoolCollectionStatusCode": "LOADED",
"collectionTypeCode": "SEPTEMBER",
"collectionOpenDate": curDate,
"collectionCloseDate": curCloseDate,
"students": [
{
"createUser": "EDXAT",
"localID": "12345",
"studentPen": "101932770",
"legalFirstName": "LEGALFIRST",
"legalMiddleNames": null,
"legalLastName": "LEGALLAST",
"usualFirstName": "USUALFIRST",
"usualMiddleNames": "USUALMIDDLE",
"usualLastName": "USUALLAST",
"dob": "20050630",
"gender": "M",
"specialEducationCategoryCode": null,
"schoolFundingCode": "20",
"nativeAncestryInd": "N",
"homeLanguageSpokenCode": "943",
"otherCourses": "0",
"supportBlocks": null,
"enrolledGradeCode": "09",
"careerProgramCode": null,
"numberOfCourses": "0700",
"bandCode": "0684",
"enrolledProgramCodes": "08",
"sdcSchoolCollectionStudentStatusCode": "LOADED",
"isAdult": "false",
"isSchoolAged": "true",
"fte": 1,
"postalCode": "V8R2Y9",
"fteZeroReasonCode": null,
"frenchProgramNonEligReasonCode": null,
"ellNonEligReasonCode": "NTENRELL",
"indigenousSupportProgramNonEligReasonCode": "NTENRINDIG",
"careerProgramNonEligReasonCode": "NTENRCAREE",
"specialEducationNonEligReasonCode": "NOSPECIAL",
"isGraduated": "false",
"assignedStudentId": null,
"assignedPen": null,
"sdcSchoolCollectionStudentValidationIssues": [],
"sdcSchoolCollectionStudentEnrolledPrograms": [
{
"createUser": "EDXAT",
"updateUser": null,
"createDate": null,
"updateDate": null,
"enrolledProgramCode": "08"
},
}
]
},
{
"createUser": "EDXAT",
"localID": "12345",
"studentPen": "102866365",
"legalFirstName": "LEGALFIRST",
"legalMiddleNames": null,
"legalLastName": "LEGALLAST",
"usualFirstName": "USUALFIRST",
"usualMiddleNames": "USUALMIDDLE",
"usualLastName": "USUALLAST",
"dob": "20070702",
"gender": "F",
"specialEducationCategoryCode": null,
"schoolFundingCode": "20",
"nativeAncestryInd": "N",
"homeLanguageSpokenCode": "943",
"otherCourses": "0",
"supportBlocks": null,
"enrolledGradeCode": "11",
"numberOfCourses": "0700",
"bandCode": "0684",
"postalCode": "V8R2Y9",
"enrolledProgramCodes": "43",
"careerProgramCode": "XH",
"sdcSchoolCollectionStudentStatusCode": "LOADED",
"isAdult": "false",
"isSchoolAged": "true",
"fte": 0.875,
"fteZeroReasonCode": null,
"frenchProgramNonEligReasonCode": null,
"ellNonEligReasonCode": "NTENRELL",
"indigenousSupportProgramNonEligReasonCode": "NTENRINDIG",
"careerProgramNonEligReasonCode": "NTENRCAREE",
"specialEducationNonEligReasonCode": "NOSPECIAL",
"isGraduated": "false",
"assignedStudentId": null,
"assignedPen": null,
"sdcSchoolCollectionStudentValidationIssues": [],
"sdcSchoolCollectionStudentEnrolledPrograms": [
{
"createUser": "EDXAT",
"updateUser": null,
"createDate": null,
"updateDate": null,
"enrolledProgramCode": "08"
"enrolledProgramCode": "43"
}
]
},
{
"createUser": "EDXAT",
"localID": "12345",
"studentPen": "103169744",
"legalFirstName": "LEGALFIRST",
"legalMiddleNames": null,
"legalLastName": "LEGALLAST",
"usualFirstName": "USUALFIRST",
"usualMiddleNames": "USUALMIDDLE",
"usualLastName": "USUALLAST",
"dob": "20070702",
"gender": "F",
"specialEducationCategoryCode": null,
"schoolFundingCode": "20",
"nativeAncestryInd": "N",
"homeLanguageSpokenCode": "943",
"otherCourses": "0",
"supportBlocks": null,
"enrolledGradeCode": "09",
"careerProgramCode": "XA",
"numberOfCourses": "0700",
"bandCode": "0684",
"postalCode": "V8R2Y9",
"enrolledProgramCodes": "1141",
"sdcSchoolCollectionStudentStatusCode": "LOADED",
"isAdult": "false",
"isSchoolAged": "true",
"fte": 0.875,
"fteZeroReasonCode": null,
"frenchProgramNonEligReasonCode": null,
"ellNonEligReasonCode": "NTENRELL",
"indigenousSupportProgramNonEligReasonCode": "NTENRINDIG",
"careerProgramNonEligReasonCode": "NTENRCAREE",
"specialEducationNonEligReasonCode": "NOSPECIAL",
"isGraduated": "false",
"assignedStudentId": null,
"assignedPen": null,
"sdcSchoolCollectionStudentValidationIssues": [],
"sdcSchoolCollectionStudentEnrolledPrograms": [
{
"createUser": "EDXAT",
"updateUser": null,
"createDate": null,
"updateDate": null,
"enrolledProgramCode": "11"
},
{
"createUser": "EDXAT",
"updateUser": null,
"createDate": null,
"updateDate": null,
"enrolledProgramCode": "41"
}
]
}
]
}

}

} else {
Expand Down

0 comments on commit ee89059

Please sign in to comment.