feat: handle proctoring-blocked certificates - #58
Merged
santhosh-apphelix-2u merged 7 commits intoSep 14, 2026
Merged
santhosh-apphelix-2u merged 7 commits into
santhosh-apphelix-2u merged 7 commits into
Conversation
Co-authored-by: santhosh-apphelix-2u <211942388+santhosh-apphelix-2u@users.noreply.github.com>
Co-authored-by: santhosh-apphelix-2u <211942388+santhosh-apphelix-2u@users.noreply.github.com>
…ttps://github.com/edx/frontend-app-learning into feature/lp-592-certificate-proctoring-review-block
rahulkanneri-2u
approved these changes
Sep 14, 2026
santhosh-apphelix-2u
marked this pull request as ready for review
September 14, 2026 09:56
santhosh-apphelix-2u
deleted the
feature/lp-592-certificate-proctoring-review-block
branch
September 14, 2026 09:56
There was a problem hiding this comment.
🟡 Changes recommended
The Pact expectation omits newly added fields, and several proctoring branches lack test coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds proctoring-aware handling for blocked certificates across Course Exit, Progress, and Outline flows.
Changes:
- Hides certificate and LinkedIn actions when access is blocked.
- Adds messages for proctoring states.
- Updates Pact data, factories, snapshots, and tests.
Open items include updating the Pact expected normalized metadata and covering incomplete, not-attempted, and unavailable reason codes.
File summaries
| File | Summary |
|---|---|
src/pacts/frontend-app-learning-lms.json |
Updates certificate contract fields. |
src/courseware/data/pact-tests/lmsPact.test.jsx |
Updates Pact data; expected normalized fields need completion. |
src/courseware/course/course-exit/messages.ts |
Adds blocked-certificate messages. |
src/courseware/course/course-exit/CourseExit.test.jsx |
Tests blocked certificate behavior. |
src/courseware/course/course-exit/CourseCelebration.jsx |
Hides blocked certificate actions and shows messaging. |
src/course-home/progress-tab/ProgressTab.test.jsx |
Tests Progress certificate handling. |
src/course-home/progress-tab/certificate-status/messages.ts |
Adds proctoring message mappings. |
src/course-home/progress-tab/certificate-status/CertificateStatus.jsx |
Handles blocked Progress certificates. |
src/course-home/outline-tab/OutlineTab.test.jsx |
Tests Outline certificate alerts. |
src/course-home/outline-tab/alerts/certificate-status-alert/hooks.js |
Passes certificate blocking metadata. |
src/course-home/outline-tab/alerts/certificate-status-alert/CertificateStatusAlert.jsx |
Renders blocked-certificate alerts. |
src/course-home/data/__snapshots__/redux.test.js.snap |
Updates normalized data snapshots. |
src/course-home/data/__factories__/outlineTabData.factory.js |
Adds blocking fields to test data. |
Review details
Suppressed comments (2)
src/course-home/progress-tab/ProgressTab.test.jsx:1121
- The added coverage only exercises
proctoring_review_pending, while the new mapping also has distinctproctored_exam_not_attempted,proctored_exam_incomplete, and fallback/unavailable branches. Add cases for those reasons (and assert the certificate action remains hidden) so the user-facing states promised by this change are protected from regressions.
it('Displays proctoring block message without certificate action', async () => {
setTabData({
certificate_data: {
cert_status: 'downloadable',
certificate_blocked_due_to_proctoring: true,
certificate_block_reason: 'proctoring_review_pending',
certificate_blocking_statuses: ['submitted'],
},
user_has_passing_grade: true,
});
await fetchAndRender();
expect(screen.getByText('Certificate temporarily unavailable')).toBeInTheDocument();
expect(screen.getByText(/being reviewed/)).toBeInTheDocument();
expect(screen.queryByRole('link', { name: 'View my certificate' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: 'View my certificate' })).not.toBeInTheDocument();
});
src/course-home/progress-tab/certificate-status/messages.ts:133
- The new mapping has separate behavior for review-pending, incomplete/not-attempted, and the unavailable fallback, but the added UI tests exercise only
proctoring_review_pending. A typo in either explicit reason code or the fallback message would therefore go undetected; add cases forproctored_exam_incomplete,proctored_exam_not_attempted, and an unknown/unavailable reason (ideally as a table-driven test for the shared helper).
export const getProctoringBlockedMessage = (reason) => {
if (reason === 'proctoring_review_pending') {
return messages.proctoringReviewPendingBody;
}
if (reason === 'proctored_exam_not_attempted' || reason === 'proctored_exam_incomplete') {
return messages.proctoringIncompleteBody;
}
return messages.proctoringUnavailableBody;
- Files reviewed: 13/13 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+332
to
+334
| certificate_blocked_due_to_proctoring: boolean(false), | ||
| certificate_block_reason: null, | ||
| certificate_blocking_statuses: [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the Learning MFE to correctly handle certificates blocked by proctoring status.
Ticket - LP-592
Changes