From 70644d0a2ffc8a8a50ca67d5fa09960126806bce Mon Sep 17 00:00:00 2001 From: Eckerman Date: Thu, 9 May 2024 16:25:48 -0700 Subject: [PATCH] Misc AT fixes --- backend/src/validations/schools.js | 9 +++++++++ .../sdcSchoolCollection/StepFiveSchoolDetails.vue | 2 +- .../e2e/accessUserManagement/accessSchoolUsers.cy.ts | 2 -- .../e2e/sdc-collection/sdcSchoolCollectionStepFive.cy.ts | 1 + .../sdc-collection/sdcSchoolCollectionStepThree.cy.ts | 6 +++--- .../e2e/sdc-district-collection/monitoringScreen.cy.ts | 6 +++--- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/backend/src/validations/schools.js b/backend/src/validations/schools.js index 0a188156e..9a8602df8 100644 --- a/backend/src/validations/schools.js +++ b/backend/src/validations/schools.js @@ -28,6 +28,12 @@ const schoolContactSchema = object({ updateUser: string().nullable(), }).noUnknown(); +const fundingGroupSchema = object({ + schoolFundingGroupCode: string().nullable(), + label: string().nullable(), + description: string().nullable(), + displayOrder: string().nullable() +}).noUnknown(); const postSchoolContactSchema = object({ body: schoolContactSchema, @@ -54,6 +60,8 @@ const putSchoolSchema = object({ updateDate: date().nullable(), updateUser: string().nullable(), }).noUnknown()), + canIssueCertificates: string().nullable(), + canIssueTranscripts: string().nullable(), closedDate: date().nullable(), contacts: array().of(schoolContactSchema), createDate: date(), @@ -88,6 +96,7 @@ const putSchoolSchema = object({ phoneNumber: string().nullable(), schoolCategory: string(), schoolCategoryCode: string(), + schoolFundingGroups: array().of(fundingGroupSchema), schoolId: string(), schoolMove: array().of(object({ createDate: date(), diff --git a/frontend/src/components/sdcCollection/sdcSchoolCollection/StepFiveSchoolDetails.vue b/frontend/src/components/sdcCollection/sdcSchoolCollection/StepFiveSchoolDetails.vue index 1d346fc04..757084a22 100644 --- a/frontend/src/components/sdcCollection/sdcSchoolCollection/StepFiveSchoolDetails.vue +++ b/frontend/src/components/sdcCollection/sdcSchoolCollection/StepFiveSchoolDetails.vue @@ -38,7 +38,7 @@ { cy.get(selectors.studentLevelData.stepTwoNextButton).scrollIntoView().should('be.visible').click(); cy.get(selectors.studentLevelData.stepThreeNextButton).scrollIntoView().should('be.visible').click(); cy.get(selectors.studentLevelData.stepFourNextButton).scrollIntoView().should('be.visible').click(); + cy.get(selectors.studentLevelData.stepFiveNextButton).scrollIntoView().should('be.visible').click(); // Step five of collection - school contacts cy.get(selectors.schoolContacts.newContactButton).scrollIntoView().should('be.visible').click(); diff --git a/tests-e2e/cypress/e2e/sdc-collection/sdcSchoolCollectionStepThree.cy.ts b/tests-e2e/cypress/e2e/sdc-collection/sdcSchoolCollectionStepThree.cy.ts index 7b76266f9..876f7ae97 100644 --- a/tests-e2e/cypress/e2e/sdc-collection/sdcSchoolCollectionStepThree.cy.ts +++ b/tests-e2e/cypress/e2e/sdc-collection/sdcSchoolCollectionStepThree.cy.ts @@ -124,7 +124,7 @@ describe('SDC School Collection View', () => { cy.get(selectors.dropdown.listItem).contains('Female (F)').click(); cy.get(selectors.studentLevelData.enrolledGradeCode).parent().click(); - cy.get(selectors.dropdown.listItem).contains('GRADE 6').click(); + cy.get(selectors.dropdown.listItem).contains('Grade 6 (06)').click(); cy.get(selectors.studentLevelData.nativeAncestryInd).parent().click(); cy.get(selectors.dropdown.listItem).contains('N').click(); @@ -149,7 +149,7 @@ describe('SDC School Collection View', () => { cy.get(selectors.dropdown.listItem).contains('Female (F)').click(); cy.get(selectors.studentLevelData.enrolledGradeCode).parent().click(); - cy.get(selectors.dropdown.listItem).contains('GRADE 6').click(); + cy.get(selectors.dropdown.listItem).contains('Grade 6 (06)').click(); cy.get(selectors.studentLevelData.nativeAncestryInd).parent().click(); cy.get(selectors.dropdown.listItem).contains('N').click(); @@ -192,7 +192,7 @@ describe('SDC School Collection View', () => { expect(records).to.have.length(6); const expectedPENs = ['102866365', '101932770', '103169744', '']; const expectedCourses = ['0700', undefined]; - const expectedApprenticeStatus = ['N', undefined]; + const expectedApprenticeStatus = ['N', undefined, '']; records.forEach((record: { [key: string]: string | undefined }) => { expect(expectedPENs).to.include(record['P.E.N.']); diff --git a/tests-e2e/cypress/e2e/sdc-district-collection/monitoringScreen.cy.ts b/tests-e2e/cypress/e2e/sdc-district-collection/monitoringScreen.cy.ts index aa7a3b3cd..0941e1772 100644 --- a/tests-e2e/cypress/e2e/sdc-district-collection/monitoringScreen.cy.ts +++ b/tests-e2e/cypress/e2e/sdc-district-collection/monitoringScreen.cy.ts @@ -2,7 +2,7 @@ import selectors from '../../support/selectors'; import { AppSetupData } from '../../../cypress.config'; import { DistrictCollectionOptions } from 'tests-e2e/cypress/services/sdc-collection-api-service'; -/*describe('SDC District Collection View', () => { +describe('SDC District Collection View', () => { context('As an EDX District User', () => { before(() => { cy.logout(); @@ -47,7 +47,7 @@ import { DistrictCollectionOptions } from 'tests-e2e/cypress/services/sdc-collec cy.get(selectors.sdcDistrictCollection.monitoringStep.monitoringTable + ' ' + selectors.sdcDistrictCollection.monitoringStep.closeIcon).should('exist').should('have.length', 1); cy.get(selectors.sdcDistrictCollection.monitoringStep.monitoringTable + ' ' + selectors.sdcDistrictCollection.monitoringStep.checkIcon).should('exist').should('have.length', 5); cy.get(selectors.sdcDistrictCollection.monitoringStep.monitoringNextBtn).should('be.disabled'); - cy.get(selectors.sdcDistrictCollection.monitoringStep.schoolNotSubmittedWarning).should('have.text', '1 school not submitted'); + cy.get(selectors.sdcDistrictCollection.monitoringStep.schoolNotSubmittedWarning).should('have.text', '1 school(s) not submitted '); cy.get(selectors.sdcDistrictCollection.monitoringStep.hasUploadedValue).should('have.text', '2'); cy.get(selectors.sdcDistrictCollection.monitoringStep.missingUploadedValue).should('have.text', '0'); @@ -75,7 +75,7 @@ import { DistrictCollectionOptions } from 'tests-e2e/cypress/services/sdc-collec cy.get(selectors.studentLevelData.stepFourNextButton).should('not.be.disabled'); }); }); -});*/ +}); function navigateToMonitorScreen(id: string) { cy.intercept(Cypress.env('interceptors').sdc_district_collection_monitor).as('sdc_district_collection_monitor');