Skip to content

Commit

Permalink
Merge pull request #1661 from bcgov/fix/AT
Browse files Browse the repository at this point in the history
Fix/at
  • Loading branch information
SodhiA1 authored Jun 25, 2024
2 parents e4db7cb + c52bb0e commit c6b7421
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/common/forms/SchoolDetailsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@
</div>
<v-text-field
v-if="editing"
id="schoolDetailsWebsite"
v-model="schoolDetailsCopy.website"
label="Website"
:rules="[rules.website()]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ describe('SDC School Collection View', () => {
cy.intercept(Cypress.env('interceptors').collection_student).as('student');
cy.get(selectors.secureExchangeDetail.newMessageToConvBtn).click();
cy.wait('@student');
cy.intercept(Cypress.env('interceptors').delete_sdc_school_collection_student).as('deleteStudent');
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecord).click();
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecordConfirmButton).click();
cy.wait('@deleteStudent');
cy.wait('@student');
cy.get(selectors.snackbar.mainSnackBar).should('include.text', 'Success!');
cy.get(selectors.studentLevelData.cancelButton).click();
cy.get('.text-success').should('exist');
cy.get(selectors.studentLevelData.stepFourNextButton).should('not.be.disabled');
});

it('can request review', () => {
navigateToDuplicateScreen(Cypress.env('sdcSchoolCollectionID'));
cy.get(selectors.secureExchangeDetail.editOptionsMenu).first().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,7 @@ describe('SDC School Collection View', () => {
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();
cy.get(selectors.studentLevelData.stepTwoNextButton).click();

// create two students in feb col, one with refugee errors, one without

cy.get(selectors.studentLevelData.addStudent).click();

cy.get(selectors.studentLevelData.saveEditStudentRecord).should('be.disabled');
cy.get(selectors.studentLevelData.legalLastName).type('SMITH');
cy.get(selectors.studentLevelData.dobPicker).type('2016');
cy.get(selectors.datePicker.day).click();

cy.get(selectors.studentLevelData.gender).parent().click();
cy.get(selectors.dropdown.listItem).contains('Female (F)').click();

cy.get(selectors.studentLevelData.enrolledGradeCode).parent().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();

cy.get(selectors.studentLevelData.schoolFundingCodes).parent().click();
cy.get(selectors.dropdown.listItem).contains('Newcomer Refugee (16)').click();

cy.get(selectors.studentLevelData.saveEditStudentRecord).should('be.enabled');

cy.get(selectors.studentLevelData.saveEditStudentRecord).click();
cy.get(selectors.snackbar.mainSnackBar, {timeout:15000}).should('exist').contains('Success! The student details have been updated.');
cy.reload();
// create a student with refugee errors

cy.get(selectors.studentLevelData.addStudent).click();

Expand Down Expand Up @@ -81,16 +56,16 @@ describe('SDC School Collection View', () => {
cy.reload();

// checks tab available in Feb
cy.get(selectors.studentLevelData.collectionTypeDate).should('exist').contains('February 2024 Collection');
cy.get(selectors.studentLevelData.collectionTypeYear).should('exist').contains('February 2024 Collection');
cy.get(selectors.stepThreeTabSlider.refugeeButton).should('exist').click();
cy.get(selectors.studentLevelData.studentsFound).should('exist').contains(2);
cy.get(selectors.studentLevelData.studentsFound).should('exist').contains(1);

// checks special filter for refugee funding
cy.get(selectors.refugeeComponent.filterButton).click();
cy.get(selectors.activeFiltersDrawer.drawer).find(selectors.filters.refugeeFundingEligible).click();
cy.get(selectors.filters.applyFilter).click();

cy.get(selectors.studentLevelData.studentsFound).should('exist').contains(1);
cy.get(selectors.studentLevelData.studentsFound).should('exist').contains(0);

cy.get(selectors.refugeeComponent.filterButton).click();
cy.get(selectors.activeFiltersDrawer.drawer).contains('Clear').click();
Expand Down
4 changes: 2 additions & 2 deletions tests-e2e/cypress/support/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export default {
schoolDetailsEmail: '#schoolDetailsEmail',
schoolDetailsNlc: '#schoolDetailsNlc',
schoolDetailsPhoneNumber: '#schoolDetailsPhoneNumber',
schoolDetailsWebsite: 'form > div > div:nth-child(2) > div > div:nth-child(6) > div:nth-child(4) > div > div > div > div > div > div:nth-child(3) > input',
schoolDetailsWebsite: '#schoolDetailsWebsite',
schoolDisplayNameTitle: '#displayName',
schoolGradesDropdown: '#schoolGrades',
schoolGradesValue: '#schoolGradesValue',
Expand Down Expand Up @@ -481,7 +481,7 @@ export default {
collectionSubmission: '#collection-submission',
csvDownloadLink: '#studentsFound ~ a',
pdfDownloadLink: '#downloadReport',
collectionTypeDate: '#collectionTypeDate'
collectionTypeYear: '#collectionTypeYear'
},
userActivationPage: {
mincodeInput: '#instituteIdentifierTextField',
Expand Down

0 comments on commit c6b7421

Please sign in to comment.