@edx/edx-proctoring
Advanced tools
Comparing version 3.8.3 to 3.8.4
@@ -66,3 +66,7 @@ (function(Backbone, $) { | ||
this.course_id = this.$el.data('course-id'); | ||
this.username = this.$el.data('username'); | ||
this.model.url = this.model.url + '?course_id=' + encodeURIComponent(this.course_id); | ||
if (this.username) { | ||
this.model.url = this.model.url + '&username=' + encodeURIComponent(this.username); | ||
} | ||
this.template_url = '/static/proctoring/templates/proctored-exam-info.underscore'; | ||
@@ -69,0 +73,0 @@ this.status = ''; |
@@ -131,2 +131,29 @@ /* global LearnerOnboardingModel:false */ | ||
it('should render if username is provided', function() { | ||
setFixtures( | ||
'<div class="proctoring-info-panel" data-course-id="test_course_id" ' + | ||
'data-username="test_username"></div>' | ||
); | ||
this.server.respondWith( | ||
'GET', | ||
'/api/edx_proctoring/v1/user_onboarding/status?course_id=test_course_id&username=test_username', | ||
[ | ||
200, | ||
{ | ||
'Content-Type': 'application/json' | ||
}, | ||
JSON.stringify(expectedProctoredExamInfoJson('verified')) | ||
] | ||
); | ||
this.proctored_exam_info = new edx.courseware.proctored_exam.ProctoredExamInfo({ | ||
el: $('.proctoring-info-panel'), | ||
model: new LearnerOnboardingModel() | ||
}); | ||
this.server.respond(); | ||
this.server.respond(); | ||
expect(this.proctored_exam_info.$el.find('.onboarding-status').html()) | ||
.toContain('Verified'); | ||
}); | ||
it('should not render proctoring info panel for exam with 404 response', function() { | ||
@@ -133,0 +160,0 @@ this.server.respondWith('GET', '/api/edx_proctoring/v1/user_onboarding/status?course_id=test_course_id', |
@@ -5,3 +5,3 @@ { | ||
"//": "Note that the version format is slightly different than that of the Python version when using prereleases.", | ||
"version": "3.8.3", | ||
"version": "3.8.4", | ||
"main": "edx_proctoring/static/index.js", | ||
@@ -8,0 +8,0 @@ "scripts":{ |
Sorry, the diff of this file is not supported yet
977924
18064