From b203ae81f938915b5ac5686b68a8f9715016dade Mon Sep 17 00:00:00 2001 From: Josh Thoo Jen Sen <110712708+josh1248@users.noreply.github.com> Date: Sun, 1 Sep 2024 12:25:14 +0800 Subject: [PATCH] Add tooltip for assessments that are not fully attempted (#3028) * Add tooltip for assessments that are not fully attempted * Update test snaphots --------- Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> --- src/commons/assessment/Assessment.tsx | 28 +- .../__snapshots__/Assessment.tsx.snap | 434 ++++++++++-------- 2 files changed, 265 insertions(+), 197 deletions(-) diff --git a/src/commons/assessment/Assessment.tsx b/src/commons/assessment/Assessment.tsx index 634e49f486..d458dbf602 100644 --- a/src/commons/assessment/Assessment.tsx +++ b/src/commons/assessment/Assessment.tsx @@ -74,18 +74,24 @@ const Assessment: React.FC = () => { const sortAssessments = (assessments: AssessmentOverview[]) => sortBy(assessments, [a => -a.id]); const makeSubmissionButton = (overview: AssessmentOverview, index: number) => ( - + + ); const makeAssessmentInteractButton = (overview: AssessmentOverview) => { diff --git a/src/commons/assessment/__tests__/__snapshots__/Assessment.tsx.snap b/src/commons/assessment/__tests__/__snapshots__/Assessment.tsx.snap index 5e51062ea6..293640ccb3 100644 --- a/src/commons/assessment/__tests__/__snapshots__/Assessment.tsx.snap +++ b/src/commons/assessment/__tests__/__snapshots__/Assessment.tsx.snap @@ -165,45 +165,55 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
- + +
- + +
- + +
- + +
- + +
- + +