From ad5844a94935966492b90bfd08f290f4010e9a73 Mon Sep 17 00:00:00 2001 From: Alec Li Date: Fri, 11 Aug 2023 23:21:56 -0700 Subject: [PATCH] Fix tests due to style changes --- .../src/components/course/SectionCard.tsx | 7 +- .../section/MentorSectionAttendance.tsx | 5 +- .../src/components/section/StudentSection.tsx | 8 +- csm_web/frontend/src/css/base/form.scss | 1 + csm_web/frontend/src/css/section.scss | 2 +- csm_web/frontend/src/css/word-of-the-day.scss | 15 - .../frontend/src/tests/__mocks__/styleMock.ts | 5 + .../tests/__snapshots__/Modal.test.tsx.snap | 70 +- .../tests/__transformers__/pathTransformer.ts | 17 + .../src/tests/section/StudentDropper.test.tsx | 10 +- .../StudentDropper.test.tsx.snap | 73 +- cypress/e2e/course/coordinator-course.cy.ts | 2 +- cypress/e2e/course/restricted-courses.cy.ts | 108 +- cypress/e2e/course/student-course.cy.ts | 34 +- cypress/e2e/section/coordinator-section.cy.ts | 54 +- cypress/e2e/section/mentor-section.cy.ts | 48 +- .../section/mentor-student-interaction.cy.ts | 20 +- cypress/e2e/section/student-section.cy.ts | 62 +- jest.config.js => jest.config.ts | 25 +- package-lock.json | 29951 +++++++--------- package.json | 7 +- tsconfig.json | 2 +- 22 files changed, 13668 insertions(+), 16858 deletions(-) create mode 100644 csm_web/frontend/src/tests/__mocks__/styleMock.ts create mode 100644 csm_web/frontend/src/tests/__transformers__/pathTransformer.ts rename jest.config.js => jest.config.ts (90%) diff --git a/csm_web/frontend/src/components/course/SectionCard.tsx b/csm_web/frontend/src/components/course/SectionCard.tsx index 96298383..49d28323 100644 --- a/csm_web/frontend/src/components/course/SectionCard.tsx +++ b/csm_web/frontend/src/components/course/SectionCard.tsx @@ -179,12 +179,13 @@ export const SectionCard = ({ MANAGE ) : ( -
ENROLL -
+ )} diff --git a/csm_web/frontend/src/components/section/MentorSectionAttendance.tsx b/csm_web/frontend/src/components/section/MentorSectionAttendance.tsx index fb6e158c..aec375a1 100644 --- a/csm_web/frontend/src/components/section/MentorSectionAttendance.tsx +++ b/csm_web/frontend/src/components/section/MentorSectionAttendance.tsx @@ -265,7 +265,7 @@ const MentorSectionAttendance = ({ sectionId }: MentorSectionAttendanceProps): R ))} - +
{selectedOccurrence && stagedAttendances.map(({ id, student, presence }) => { @@ -322,7 +322,8 @@ const MentorSectionAttendance = ({ sectionId }: MentorSectionAttendanceProps): R
Submit Word of the Day
- {attendances // only allow choosing from dates with blank attendances .filter(attendance => attendance.presence === "") @@ -273,6 +278,7 @@ function StudentSectionAttendance({ associatedProfileId, id }: StudentSectionAtt