From 19d5411402ef8a649f18b07745f16e3efcb11054 Mon Sep 17 00:00:00 2001
From: Bianca Severino
Date: Wed, 9 Dec 2020 16:29:07 -0500
Subject: [PATCH] Remove course key
---
src/id-verification/data/service.js | 1 -
src/id-verification/panels/SubmittedPanel.jsx | 10 ++--------
.../tests/panels/SubmittedPanel.test.jsx | 15 ---------------
3 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/src/id-verification/data/service.js b/src/id-verification/data/service.js
index f3eff39..f58ea97 100644
--- a/src/id-verification/data/service.js
+++ b/src/id-verification/data/service.js
@@ -64,7 +64,6 @@ export async function submitIdVerification(verificationData) {
facePhotoFile: 'face_image',
idPhotoFile: 'photo_id_image',
idPhotoName: 'full_name',
- courseRunKey: 'course_key',
};
const postData = {};
// Don't include blank/null/undefined values.
diff --git a/src/id-verification/panels/SubmittedPanel.jsx b/src/id-verification/panels/SubmittedPanel.jsx
index 9476cf8..1a416ff 100644
--- a/src/id-verification/panels/SubmittedPanel.jsx
+++ b/src/id-verification/panels/SubmittedPanel.jsx
@@ -10,17 +10,11 @@ import messages from '../IdVerification.messages';
function SubmittedPanel(props) {
const { userId } = useContext(IdVerificationContext);
- const [returnUrl, setReturnUrl] = useState('dashboard');
- const [returnText, setReturnText] = useState('id.verification.return.dashboard');
const panelSlug = 'submitted';
// If the user accessed IDV through a course,
// link back to that course rather than the dashboard
useEffect(() => {
- if (sessionStorage.getItem('courseRunKey')) {
- setReturnUrl(`courses/${sessionStorage.getItem('courseRunKey')}`);
- setReturnText('id.verification.return.course');
- }
sendTrackEvent('edx.id_verification.submitted', {
category: 'id_verification',
user_id: userId,
@@ -37,10 +31,10 @@ function SubmittedPanel(props) {
- {props.intl.formatMessage(messages[returnText])}
+ {props.intl.formatMessage(messages['id.verification.return.dashboard'])}
);
diff --git a/src/id-verification/tests/panels/SubmittedPanel.test.jsx b/src/id-verification/tests/panels/SubmittedPanel.test.jsx
index cf4ef06..edcc5b6 100644
--- a/src/id-verification/tests/panels/SubmittedPanel.test.jsx
+++ b/src/id-verification/tests/panels/SubmittedPanel.test.jsx
@@ -47,19 +47,4 @@ describe('SubmittedPanel', () => {
const button = await screen.findByTestId('return-button');
expect(button).toHaveTextContent(/Return to Your Dashboard/);
});
-
- it('links to course with courseRunKey', async () => {
- Storage.prototype.getItem = jest.fn(() => 'courseRunKey');
- await act(async () => render((
-
-
-
-
-
-
-
- )));
- const button = await screen.findByTestId('return-button');
- expect(button).toHaveTextContent(/Return to Course/);
- });
});