diff --git a/src/users/VerifiedName.jsx b/src/users/VerifiedName.jsx
index 093db4e5c..f1daac461 100644
--- a/src/users/VerifiedName.jsx
+++ b/src/users/VerifiedName.jsx
@@ -45,13 +45,17 @@ const verifiedNameHistoryColumns = [
accessor: 'status',
},
{
- Header: 'IDV Attempt ID',
+ Header: 'Legacy Attempt ID',
accessor: 'idvAttemptId',
},
{
Header: 'Proctoring Attempt ID',
accessor: 'proctoringAttemptId',
},
+ {
+ Header: 'IDV Attempt ID',
+ accessor: 'platformVerificationAttemptId',
+ },
{
Header: 'Created At',
accessor: 'createdAt',
@@ -105,6 +109,26 @@ export default function VerifiedName({ username }) {
) : '',
proctoringAttemptId: result.proctoredExamAttemptId,
+ platformVerificationAttemptId: result.platformVerificationAttemptId ? (
+
+
+ Status
+
+
+ {result.platformVerificationAttemptStatus ? result.platformVerificationAttemptStatus : 'Error: Missing data'}
+
+
+ )}
+ >
+
+
+ ) : '',
createdAt: formatDate(result.created),
}),
), [verifiedNameHistoryData]);
diff --git a/src/users/VerifiedName.test.jsx b/src/users/VerifiedName.test.jsx
index 31c9b148a..a6bbb6389 100644
--- a/src/users/VerifiedName.test.jsx
+++ b/src/users/VerifiedName.test.jsx
@@ -46,7 +46,7 @@ describe('Verified Name', () => {
// Profile name and denied verified name are visible in history modal
const profileName = await screen.findAllByText(/jon doe/i);
- expect(profileName.length).toEqual(2);
+ expect(profileName.length).toEqual(3);
await screen.findByText(/j doe/i);
});
@@ -76,4 +76,31 @@ describe('Verified Name', () => {
expect(screen.getByText('must_retry')).toBeTruthy();
});
+
+ it('displays hover popup to show Platform Verification Attempt details', async () => {
+ const verifiedNameData = {
+ verifiedName: 'Jonathan Doe',
+ status: 'approved',
+ verificationType: 'Proctoring',
+ history: verifiedNameHistory.results,
+ };
+ jest.spyOn(api, 'getVerifiedNameHistory').mockResolvedValueOnce(verifiedNameData);
+ await act(async () => {
+ render();
+ });
+
+ const historyButton = await screen.findByText('Show');
+ await act(async () => {
+ fireEvent.click(historyButton);
+ });
+
+ const hoverLink = await screen.getByText(verifiedNameHistory.results[2].platform_verification_attempt_id);
+ await act(async () => {
+ fireEvent.mouseOver(hoverLink);
+ });
+
+ await screen.getByTestId('platformVerificationAttemptTooltipTitle');
+
+ expect(screen.getByText('pending')).toBeTruthy();
+ });
});
diff --git a/src/users/data/test/verifiedNameHistory.js b/src/users/data/test/verifiedNameHistory.js
index 236360a26..fee781369 100644
--- a/src/users/data/test/verifiedNameHistory.js
+++ b/src/users/data/test/verifiedNameHistory.js
@@ -7,6 +7,8 @@ const verifiedNameHistory = {
verification_attempt_id: null,
verification_attempt_status: null,
proctored_exam_attempt_id: 123,
+ platform_verification_attempt_id: null,
+ platform_verification_attempt_status: null,
status: 'approved',
},
{
@@ -16,6 +18,19 @@ const verifiedNameHistory = {
verification_attempt_id: 456,
verification_attempt_status: 'must_retry',
proctored_exam_attempt_id: null,
+ platform_verification_attempt_id: null,
+ platform_verification_attempt_status: null,
+ status: 'denied',
+ },
+ {
+ created: '2021-09-07T17:36:55.781077Z',
+ verified_name: 'Jonathan D. Doe',
+ profile_name: 'Jon Doe',
+ verification_attempt_id: null,
+ verification_attempt_status: null,
+ proctored_exam_attempt_id: null,
+ platform_verification_attempt_id: 789,
+ platform_verification_attempt_status: 'pending',
status: 'denied',
},
],