Skip to content

Commit fe5ad68

Browse files
Merge pull request #1824 from bcgov/fix/at
AT fixes
2 parents cebfb20 + 56a47f6 commit fe5ad68

File tree

7 files changed

+65
-77
lines changed

7 files changed

+65
-77
lines changed

frontend/src/components/common/EditStudent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
>
9696
<template #append>
9797
<v-btn
98-
id="saveRecord"
98+
id="getPenBtn"
9999
color="#003366"
100100
variant="elevated"
101101
density="compact"

frontend/src/utils/sdc/SdcSteps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const SDC_STEPS_INDP_SCHOOL = Object.freeze([
155155
showSubmissionDate: true
156156
},
157157
{
158-
id: 'step-6',
158+
id: 'step-8',
159159
title: 'Resolve Province Duplicates',
160160
step: 8,
161161
sdcSchoolCollectionStatusCode: ['P_DUP_POST', 'P_DUP_VRFD', 'COMPLETED'],

tests-e2e/cypress/e2e/sdc-collection/sdcSchoolCollectionSchoolDetails.cy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('SDC School Collection View', () => {
9696
beforeEach(() => {
9797
cy.login();
9898
});
99-
it('New Contact should be disabled', () => {
99+
it('Step 5 should be disabled', () => {
100100
cy.visit('/');
101101
cy.get(selectors.dashboard.title).contains('Dashboard | EDX Automation Testing School');
102102
cy.get(selectors.dashboard.dataCollectionsTileTitle).contains('Student Level Data Collection (1701)');
@@ -105,8 +105,7 @@ describe('SDC School Collection View', () => {
105105
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();
106106

107107
cy.get(selectors.studentLevelData.collectionSubmission).should('exist');
108-
cy.get(selectors.studentLevelData.stepFive).should('exist').click();
109-
cy.get(selectors.schoolContacts.newContactButton).should('not.exist');
108+
cy.get(selectors.studentLevelData.stepFive).should('be.disabled');
110109
});
111110
});
112111
});

tests-e2e/cypress/e2e/sdc-collection/sdcSchoolCollectionStepOne.cy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('SDC Step-One', () => {
5151
beforeEach(() => {
5252
cy.login();
5353
});
54-
it('Re-upload button is disabled', () => {
54+
it('Step one button is disabled', () => {
5555
cy.visit('/');
5656
cy.get(selectors.dashboard.title).contains('Dashboard | EDX Automation Testing School');
5757
cy.get(selectors.dashboard.dataCollectionsTileTitle).contains('Student Level Data Collection (1701)');
@@ -60,8 +60,7 @@ describe('SDC Step-One', () => {
6060
cy.get(selectors.dataCollectionsLanding.continue).contains('Continue').click();
6161

6262
cy.get(selectors.studentLevelData.collectionSubmission).should('exist');
63-
cy.get(selectors.studentLevelData.stepOne).should('exist').click();
64-
cy.get(selectors.studentLevelData.documentReUploadButton).should('be.disabled');
63+
cy.get(selectors.studentLevelData.stepOne).should('be.disabled');
6564
});
6665
});
6766
});

tests-e2e/cypress/e2e/sdc-collection/stepThreeFilters.cy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ describe('SDC School Collection View', () => {
361361
checkCommonFiltersExist();
362362
cy.intercept(Cypress.env('interceptors').collection_students_pagination).as('paginationFilters');
363363
cy.get(selectors.studentLevelData.stepThreeSearchField).type('102866365');
364+
cy.get(selectors.filters.applyPenLocalIdNameFilterBtn).click();
364365
cy.wait('@paginationFilters');
365366
cy.get(selectors.filters.cancelBtn).click();
366367
cy.get(selectors.studentLevelData.stepThreeStudentsFound).contains('Students Found: 1');

tests-e2e/cypress/e2e/sdc-district-collection/summaryReports.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ describe('SDC District Collection View', () => {
344344
cy.get('tr')
345345
.each(($row, index) => {
346346
const rowText = $row.text();
347-
expect(rowText).to.equal(expectedRows[index]);
347+
expect(expectedRows).to.contains(rowText);
348348
});
349349

350350
cy.get(selectors.refugeeComponent.pdfDownloadLink).then(($link) => {
Lines changed: 57 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,68 @@
11
import {AppSetupData} from '../../../cypress.config';
22
import { DistrictCollectionOptions } from 'tests-e2e/cypress/services/sdc-collection-api-service';
33
import selectors from '../../support/selectors';
4-
import {TemporalQueries} from "@js-joda/core";
5-
import localDate = TemporalQueries.localDate;
6-
74

85
describe('SDC District Collection - testing Upload School Level Data screen\'s summary or data', () => {
9-
context('As an EDX District User', () => {
10-
before(() => {
11-
cy.logout();
12-
cy.task<AppSetupData>('districtDataLoad', {
13-
schoolOptions: [
14-
{
15-
includeTombstoneValues: true,
16-
includeSchoolAddress: true,
17-
includeSchoolContact: true,
18-
schoolStatus: 'Open',
19-
withPrimaryActivationCode: true,
20-
isIndependentSchool: false,
21-
schoolCode: '99990'
22-
},
23-
{
24-
includeTombstoneValues: true,
25-
includeSchoolAddress: true,
26-
includeSchoolContact: true,
27-
schoolStatus: 'Open',
28-
withPrimaryActivationCode: true,
29-
isIndependentSchool: false,
30-
schoolCode: '99991'
31-
}
32-
]
33-
}).then(res => {
34-
cy.task<DistrictCollectionOptions, SdcCollections>('setup-district-collections', {
35-
schools: res.schools,
36-
district: res.district,
37-
loadWithStudentAndValidations: false
38-
}).then(response => {
39-
Cypress.env('sdcDistrictCollectionID', response?.sdcDistrictCollection?.sdcDistrictCollectionID);
40-
});
41-
cy.task('setup-districtUser', { districtRoles: ['DISTRICT_SDC'], districtCodes: ['998'] });
42-
});
6+
context('As an EDX District User', () => {
7+
before(() => {
8+
cy.logout();
9+
cy.task<AppSetupData>('districtDataLoad', {
10+
schoolOptions: [
11+
{
12+
includeTombstoneValues: true,
13+
includeSchoolAddress: true,
14+
includeSchoolContact: true,
15+
schoolStatus: 'Open',
16+
withPrimaryActivationCode: true,
17+
isIndependentSchool: false,
18+
schoolCode: '99990'
19+
},
20+
{
21+
includeTombstoneValues: true,
22+
includeSchoolAddress: true,
23+
includeSchoolContact: true,
24+
schoolStatus: 'Open',
25+
withPrimaryActivationCode: true,
26+
isIndependentSchool: false,
27+
schoolCode: '99991'
28+
}
29+
]
30+
}).then(res => {
31+
cy.task<DistrictCollectionOptions, SdcCollections>('setup-district-collections', {
32+
schools: res.schools,
33+
district: res.district,
34+
loadWithStudentAndValidations: false
35+
}).then(response => {
36+
Cypress.env('sdcDistrictCollectionID', response?.sdcDistrictCollection?.sdcDistrictCollectionID);
4337
});
44-
beforeEach(() => cy.login());
45-
it('can re-upload a collection file', () => {
46-
const id = Cypress.env('sdcDistrictCollectionID');
47-
cy.visit('/open-district-collection-details/' + id);
48-
49-
cy.get(selectors.sdcDocumentUploadStep.infoNote).should('exist').should('contain.text', 'Note: Eligible FTE counts are available in Step 3');
50-
cy.get("#navTitle").should('exist').contains('Student Level Data (1701) | EDX Automation Testing District');
51-
52-
const headings = ['School', 'File Name', 'Date Uploaded', 'Processed']
53-
cy.get('.v-data-table__td').then(($td) => {
54-
const texts = Cypress._.map($td, 'innerText')
55-
expect(texts, 'headings').to.deep.equal(headings)
56-
})
57-
58-
var today = new Date();
59-
var dd=String(today.getDate()).padStart(2,'0');
60-
var mm=String(today.getMonth()+1).padStart(2,'0');
61-
var yyyy = today.getFullYear();
38+
cy.task('setup-districtUser', { districtRoles: ['DISTRICT_SDC'], districtCodes: ['998'] });
39+
});
40+
});
41+
beforeEach(() => cy.login());
42+
it('can re-upload a collection file', () => {
43+
const id = Cypress.env('sdcDistrictCollectionID');
44+
cy.visit('/open-district-collection-details/' + id);
6245

63-
var stringToday=mm+'/'+dd+'/'+yyyy;
46+
cy.get(selectors.sdcDocumentUploadStep.infoNote).should('exist').should('contain.text', 'Note: Eligible FTE counts are available in Step 3');
47+
cy.get('#navTitle').should('exist').contains('Student Level Data (1701) | EDX Automation Testing District');
6448

65-
cy.get('.v-data-table').should('exist').contains(`99899991`);
66-
cy.get('.v-data-table').should('exist').contains(`99899990`);
49+
const headings = ['School', 'File Name', 'Date Uploaded', 'Processed'];
50+
cy.get('.v-data-table__td').then(($td) => {
51+
const texts = Cypress._.map($td, 'innerText');
52+
expect(texts, 'headings').to.deep.equal(headings);
53+
});
6754

68-
cy.get('#uploadButton').click();
69-
cy.get('#selectFileInput').selectFile('./cypress/uploads/dis-upload-sample-1-student-fnchars.std', { force: true });
55+
cy.get('.v-data-table').should('exist').contains('99899991');
56+
cy.get('.v-data-table').should('exist').contains('99899990');
7057

71-
cy.get('.fileUploadWarningMessage').first().should('exist').contains('The date in the dis-upload-sample-1-student-fn.std file is 2023-04-26. Please ensure that you have uploaded the correct data for this collection before continuing.')
72-
cy.get('.fileUploadSuccessMessage').first().should('exist').contains('1 file(s) were successfully uploaded. Files will continue to be processed even if you leave the page.');
73-
74-
cy.get('#step-1-next-button-district').should('not.be.disabled');
75-
76-
});
77-
})
58+
cy.get('#uploadButton').click();
59+
cy.get('#selectFileInput').selectFile('./cypress/uploads/dis-upload-sample-1-student-fnchars.std', { force: true });
7860

79-
})
61+
cy.get('.fileUploadWarning').first().should('have.text', 'dis-upload-sample-1-student-fnchars.std - Pending');
62+
cy.get('.fileUploadWarning').first().should('have.text', 'dis-upload-sample-1-student-fnchars.std - The date in this file is 2023-04-26. Please ensure that you have uploaded the correct data for this collection before continuing.');
63+
cy.get('.v-card-actions').contains('1 of 1 Complete');
64+
cy.get('.v-card-actions .v-btn').click();
65+
cy.get('#step-1-next-button-district').should('not.be.disabled');
66+
});
67+
});
68+
});

0 commit comments

Comments
 (0)