-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove use of proctoring settings and use config values (#95)
- Loading branch information
Showing
15 changed files
with
31 additions
and
121 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
NODE_ENV='production' | ||
LANGUAGE_PREFERENCE_COOKIE_NAME=null | ||
LMS_BASE_URL=null | ||
CONTACT_URL='' | ||
PROCTORED_EXAM_FAQ_URL='' | ||
PROCTORED_EXAM_RULES_URL='' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
NODE_ENV='development' | ||
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference' | ||
LMS_BASE_URL='http://localhost:18000' | ||
CONTACT_URL='http://localhost:18000/contact' | ||
PROCTORED_EXAM_FAQ_URL='' | ||
PROCTORED_EXAM_RULES_URL='' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference' | ||
LMS_BASE_URL='http://localhost:18000' | ||
EXAMS_BASE_URL='http://localhost:18740' | ||
CONTACT_URL='http://localhost:18000/contact' | ||
PROCTORED_EXAM_FAQ_URL='' | ||
PROCTORED_EXAM_RULES_URL='' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ coverage: | |
project: | ||
default: | ||
target: auto | ||
threshold: 0% | ||
threshold: 0.2% | ||
patch: | ||
default: | ||
target: auto | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,6 @@ import { Factory } from 'rosie'; // eslint-disable-line import/no-extraneous-dep | |
|
||
Factory.define('proctoringSettings') | ||
.attrs({ | ||
platform_name: 'Your Platform Name Here', | ||
contact_us: '[email protected]', | ||
link_urls: { | ||
contact_us: 'https://example.com/contact_us/', | ||
faq: 'https://example.com/faq/', | ||
online_proctoring_rules: 'https://example.com/online_proctoring_rules/', | ||
tech_requirements: 'https://example.com/tech_requirements/', | ||
}, | ||
exam_proctoring_backend: { | ||
download_url: '', | ||
instructions: [], | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,6 @@ Object { | |
}, | ||
"isLoading": false, | ||
"proctoringSettings": Object { | ||
"contact_us": "", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -84,8 +83,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": null, | ||
"platform_name": "", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
@@ -124,7 +121,6 @@ Object { | |
}, | ||
"isLoading": false, | ||
"proctoringSettings": Object { | ||
"contact_us": "", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -133,8 +129,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": null, | ||
"platform_name": "", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
@@ -212,7 +206,6 @@ Object { | |
}, | ||
"isLoading": false, | ||
"proctoringSettings": Object { | ||
"contact_us": "", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -221,8 +214,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": null, | ||
"platform_name": "", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
@@ -261,7 +252,6 @@ Object { | |
}, | ||
"isLoading": false, | ||
"proctoringSettings": Object { | ||
"contact_us": "", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -270,8 +260,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": null, | ||
"platform_name": "", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
@@ -283,7 +271,6 @@ Object { | |
|
||
exports[`Data layer integration tests Test getProctoringSettings Should fail to fetch if error occurs 1`] = ` | ||
Object { | ||
"contact_us": "", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -292,8 +279,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": null, | ||
"platform_name": "", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
@@ -302,7 +287,6 @@ Object { | |
|
||
exports[`Data layer integration tests Test getProctoringSettings Should get, and save proctoringSettings 1`] = ` | ||
Object { | ||
"contact_us": "[email protected]", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -311,13 +295,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": Object { | ||
"contact_us": "https://example.com/contact_us/", | ||
"faq": "https://example.com/faq/", | ||
"online_proctoring_rules": "https://example.com/online_proctoring_rules/", | ||
"tech_requirements": "https://example.com/tech_requirements/", | ||
}, | ||
"platform_name": "Your Platform Name Here", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
@@ -416,7 +393,6 @@ Object { | |
}, | ||
"isLoading": false, | ||
"proctoringSettings": Object { | ||
"contact_us": "", | ||
"exam_proctoring_backend": Object { | ||
"download_url": "", | ||
"instructions": Array [], | ||
|
@@ -425,8 +401,6 @@ Object { | |
}, | ||
"integration_specific_email": "", | ||
"learner_notification_from_email": "", | ||
"link_urls": null, | ||
"platform_name": "", | ||
"provider_name": "", | ||
"provider_tech_support_email": "", | ||
"provider_tech_support_phone": "", | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,9 +137,6 @@ describe('SequenceExamWrapper', () => { | |
examState: Factory.build('examState', { | ||
timeIsOver: true, | ||
allowProctoringOptOut: true, | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
attempt: {}, | ||
|
@@ -178,9 +175,6 @@ describe('SequenceExamWrapper', () => { | |
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
timeIsOver: true, | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
type: ExamType.PROCTORED, | ||
|
@@ -214,13 +208,6 @@ describe('SequenceExamWrapper', () => { | |
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
timeIsOver: true, | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
link_urls: [ | ||
{ | ||
contact_us: 'http://localhost:2000', | ||
}, | ||
], | ||
}), | ||
exam: Factory.build('exam', { | ||
type: ExamType.PROCTORED, | ||
attempt: Factory.build('attempt', { | ||
|
@@ -245,9 +232,6 @@ describe('SequenceExamWrapper', () => { | |
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
timeIsOver: true, | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Platform Name', | ||
}), | ||
exam: Factory.build('exam', { | ||
type: ExamType.PROCTORED, | ||
attempt: Factory.build('attempt', { | ||
|
@@ -359,7 +343,6 @@ describe('SequenceExamWrapper', () => { | |
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
integration_specific_email: integrationEmail, | ||
}), | ||
exam: Factory.build('exam', { | ||
|
@@ -394,9 +377,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows submit onboarding exam instructions if exam is onboarding and attempt status is ready_to_submit', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -423,9 +403,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows error onboarding exam instructions if exam is onboarding and attempt status is error', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -454,7 +431,6 @@ describe('SequenceExamWrapper', () => { | |
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
integration_specific_email: '[email protected]', | ||
learner_notification_from_email: '[email protected]', | ||
}), | ||
|
@@ -493,7 +469,6 @@ describe('SequenceExamWrapper', () => { | |
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
integration_specific_email: '[email protected]', | ||
}), | ||
activeAttempt: {}, | ||
|
@@ -523,9 +498,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows error practice exam instructions if exam is onboarding and attempt status is error', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -553,9 +525,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows submitted practice exam instructions if exam is onboarding and attempt status is submitted', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -583,9 +552,6 @@ describe('SequenceExamWrapper', () => { | |
it('Does not show expired page if exam is passed due date and is practice', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -610,9 +576,6 @@ describe('SequenceExamWrapper', () => { | |
it.each([ExamType.TIMED, ExamType.PROCTORED, ExamType.ONBOARDING])('Shows expired page when exam is passed due date and is %s', (examType) => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -640,9 +603,6 @@ describe('SequenceExamWrapper', () => { | |
(item) => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -672,9 +632,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows exam content for timed exam if attempt status is submitted, due date has passed and hide after due is set to false', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
type: ExamType.TIMED, | ||
|
@@ -702,9 +659,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows submitted exam page for proctored exams if attempt status is submitted, due date has passed and hide after due is set to false', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
type: ExamType.PROCTORED, | ||
|
@@ -732,9 +686,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows submitted page when proctored exam is in second_review_required status', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -807,9 +758,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows error message if receives unknown attempt status', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
type: ExamType.TIMED, | ||
|
@@ -835,9 +783,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows ready to start page when proctored exam is in ready_to_start status', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
@@ -864,9 +809,6 @@ describe('SequenceExamWrapper', () => { | |
it('Shows loading spinner while waiting to start exam', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
platform_name: 'Your Platform', | ||
}), | ||
activeAttempt: {}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
|
Oops, something went wrong.