Bok Choy tests for the split payment and verification flow

Adds mode creation endpoint to course_modes app and ability to bypass media device access prompt when proceeding through verification flow in a testing environment.
This commit is contained in:
Renzo Lucioni
2015-01-09 09:44:26 -05:00
parent 27fee62039
commit c6777a5b25
15 changed files with 672 additions and 17 deletions

View File

@@ -70,6 +70,12 @@ var edx = edx || {};
platformName: el.data('platform-name'),
requirements: el.data('requirements')
},
'face-photo-step': {
platformName: el.data('platform-name')
},
'id-photo-step': {
platformName: el.data('platform-name')
},
'review-photos-step': {
fullName: el.data('full-name'),
platformName: el.data('platform-name')
@@ -79,12 +85,6 @@ var edx = edx || {};
courseStartDate: el.data('course-start-date'),
coursewareUrl: el.data('courseware-url'),
platformName: el.data('platform-name')
},
'face-photo-step': {
platformName: el.data('platform-name')
},
'id-photo-step': {
platformName: el.data('platform-name')
}
}
}).render();

View File

@@ -25,7 +25,14 @@
// Start the capture
this.getUserMediaFunc()(
{ video: true },
{
video: true,
// Specify the `fake` constraint if we detect we are running in a test
// environment. In Chrome, this will do nothing, but in Firefox, it will
// instruct the browser to use a fake video device.
fake: window.location.hostname === 'localhost'
},
_.bind( this.getUserMediaCallback, this ),
_.bind( this.handleVideoFailure, this )
);