Skip to content

Commit

Permalink
Merge pull request #1521 from bcgov/fix/AT-fixes-0509
Browse files Browse the repository at this point in the history
Misc AT fixes
  • Loading branch information
mightycox authored May 9, 2024
2 parents 291480e + 70644d0 commit 8cbea3c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
9 changes: 9 additions & 0 deletions backend/src/validations/schools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<v-row justify="end">
<PrimaryButton
id="step-4-next-button-school"
id="step-5-next-button-school"
class="mr-3 mb-3"
icon="mdi-check"
text="Verify 1601 as Correct and Continue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ function navigateToAccessSchoolUsers(schoolId: string) {
cy.visit('/');
cy.wait('@schools');
cy.wait('@districts');
cy.intercept(Cypress.env('interceptors').edx_users).as('users');
cy.visit('/schoolAccessDetail/' + schoolId);
cy.wait('@users');
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('SDC School Collection View', () => {
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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.']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 8cbea3c

Please sign in to comment.