Skip to content

Commit

Permalink
Merge pull request #1001 from bcgov/feature/removeErrorStudent
Browse files Browse the repository at this point in the history
EDX-1143 AT Remove error student
  • Loading branch information
arcshiftsolutions authored Aug 29, 2023
2 parents 44973d5 + 7de5f51 commit b78fed2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,27 @@ describe('SDC School Collection View', () => {
cy.get(selectors.studentLevelData.nextButton).should('not.be.disabled');
cy.get(selectors.studentLevelData.nextButton).click();
});

it('can remove record containing validation errors', () => {
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();

cy.wait('@pagination').then(({response}) => {
cy.get(selectors.studentLevelData.nextButton).should('be.disabled');
})
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecord).should('exist');
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecord).click();
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecordRejectButton).click();
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecord).click();
cy.get(selectors.sdcSchoolStudentCollection.sdcCollectionStepTwo.removeRecordConfirmButton).click();
cy.get(selectors.snackbar.mainSnackBar).should('exist').contains('Success! The student details have been deleted.');
});
});
});
8 changes: 8 additions & 0 deletions tests-e2e/cypress/support/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ export default {
viewFirstSchoolContactsButton: '#viewContactsButton0',
schoolRow: '.hoverTable'
},
sdcSchoolStudentCollection: {
sdcCollectionStepTwo: {
removeRecord: '#removeRecord',
removeRecordRejectButton: '#rejectBtn',
removeRecordConfirmButton: '#resolveBtn',
}
},

secureExchangeDetail: {
addAttachmentConvButton: '#addAttachmentConvButton',
addStudentConvButton: '#addStudentConvButton',
Expand Down

0 comments on commit b78fed2

Please sign in to comment.