waffle flag - test_settings.show_review_rules

To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py
Updated JS UT and acceptance

Move common/djangoapps/enrollment to openedx/core/djangoapps/enrollments

Fix Pylint for enrollments

README for enrollments app

Move command arguments to common settings

Move command parameter arguments, resend-days and days-range, to
common settings. This will help in creating a consistency when the
default values are changed in the future.

LEARNER-7313

Bumped edx-enterprise version and added cornerstone app

Updating Bokchoy testing database cache (#20713)

complete waiting enrollments. fixed

Remove microsites from user_authn
DEPR-30

Remove microsites from certificates
DEPR-26

Remove microsites from shoppingcart
DEPR-27

Updating Bokchoy testing database cache (#20715)

add arch decision of computation of course-user discount

Mark missing string for internationalization

Remove microsites from static_template_view
DEPR-28

README for commerce and shoppingcart

README for certificates

README for course_experience

geoip2: update maxmind geolite country database

user existence check updated to use email only

Bumped edx-when

Use our fork of this repo instead of the mitocw one.

Make platform bootstrap footer match other footer

Changes:
- Add logo back
- Fix up spacing
- Change font sizes and color

Mark alt text for translation

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - test_settings.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py

waffle flag - studio.show_review_rules
To toggle proctored exam advanced settings
acceptance testing update.
Added CR comments - moved UI vis toggle to template instead of js. Moved waffle flag to waffle.py
Updated JS UT and acceptance

Move common/djangoapps/enrollment to openedx/core/djangoapps/enrollments

Fix Pylint for enrollments

README for enrollments app

Move command arguments to common settings

Move command parameter arguments, resend-days and days-range, to
common settings. This will help in creating a consistency when the
default values are changed in the future.

LEARNER-7313

Bumped edx-enterprise version and added cornerstone app

Updating Bokchoy testing database cache (#20713)

complete waiting enrollments. fixed

Remove microsites from user_authn
DEPR-30

Remove microsites from certificates
DEPR-26

Remove microsites from shoppingcart
DEPR-27

Updating Bokchoy testing database cache (#20715)

add arch decision of computation of course-user discount

Mark missing string for internationalization

Remove microsites from static_template_view
DEPR-28

README for commerce and shoppingcart

README for certificates

README for course_experience

geoip2: update maxmind geolite country database

user existence check updated to use email only

Bumped edx-when

Use our fork of this repo instead of the mitocw one.

Make platform bootstrap footer match other footer

Changes:
- Add logo back
- Fix up spacing
- Change font sizes and color

Mark alt text for translation
This commit is contained in:
atesker
2019-05-28 14:46:27 -04:00
parent 6327b00575
commit 5eeb423372
5 changed files with 117 additions and 31 deletions

View File

@@ -14,7 +14,7 @@ describe('CourseOutlinePage', function() {
selectVisibilitySettings, selectAdvancedSettings, createMockCourseJSON, createMockSectionJSON,
createMockSubsectionJSON, verifyTypePublishable, mockCourseJSON, mockEmptyCourseJSON, setSelfPaced,
mockSingleSectionCourseJSON, createMockVerticalJSON, createMockIndexJSON, mockCourseEntranceExamJSON,
selectOnboardingExam,
selectOnboardingExam, createMockCourseJSONWithReviewRules,mockCourseJSONWithReviewRules,
mockOutlinePage = readFixtures('templates/mock/mock-course-outline-page.underscore'),
mockRerunNotification = readFixtures('templates/mock/mock-course-rerun-notification.underscore');
@@ -44,6 +44,33 @@ describe('CourseOutlinePage', function() {
}, options, {child_info: {children: children}});
};
createMockCourseJSONWithReviewRules = function(options, children) {
return $.extend(true, {}, {
id: 'mock-course',
display_name: 'Mock Course',
category: 'course',
enable_proctored_exams: true,
enable_timed_exams: true,
studio_url: '/course/slashes:MockCourse',
is_container: true,
has_changes: false,
published: true,
edited_on: 'Jul 02, 2014 at 20:56 UTC',
edited_by: 'MockUser',
has_explicit_staff_lock: false,
child_info: {
category: 'chapter',
display_name: 'Section',
children: []
},
user_partitions: [],
show_review_rules: true,
user_partition_info: {},
highlights_enabled: true,
highlights_enabled_for_messaging: false
}, options, {child_info: {children: children}});
};
createMockSectionJSON = function(options, children) {
return $.extend(true, {}, {
id: 'mock-section',
@@ -281,6 +308,13 @@ describe('CourseOutlinePage', function() {
])
])
]);
mockCourseJSONWithReviewRules = createMockCourseJSONWithReviewRules({}, [
createMockSectionJSON({}, [
createMockSubsectionJSON({}, [
createMockVerticalJSON()
])
])
]);
mockEmptyCourseJSON = createMockCourseJSON();
mockSingleSectionCourseJSON = createMockCourseJSON({}, [
createMockSectionJSON()
@@ -987,7 +1021,7 @@ describe('CourseOutlinePage', function() {
var getDisplayNameWrapper, setEditModalValues, setContentVisibility, mockServerValuesJson,
selectDisableSpecialExams, selectTimedExam, selectProctoredExam, selectPracticeExam,
selectPrerequisite, selectLastPrerequisiteSubsection, checkOptionFieldVisibility,
defaultModalSettings, getMockNoPrereqOrExamsCourseJSON, expectShowCorrectness;
defaultModalSettings, modalSettingsWithExamReviewRules, getMockNoPrereqOrExamsCourseJSON, expectShowCorrectness;
getDisplayNameWrapper = function() {
return getItemHeaders('subsection').find('.wrapper-xblock-field');
@@ -1075,7 +1109,19 @@ describe('CourseOutlinePage', function() {
due: null,
is_practice_exam: false,
is_time_limited: false,
exam_review_rules: '',
is_proctored_enabled: false,
default_time_limit_minutes: null,
is_onboarding_exam: false
}
};
modalSettingsWithExamReviewRules = {
graderType: 'notgraded',
isPrereq: false,
metadata: {
due: null,
is_practice_exam: false,
is_time_limited: false,
is_proctored_enabled: false,
default_time_limit_minutes: null,
is_onboarding_exam: false
@@ -1277,7 +1323,6 @@ describe('CourseOutlinePage', function() {
visible_to_staff_only: null,
start: '2014-07-09T00:00:00.000Z',
due: '2014-07-10T00:00:00.000Z',
exam_review_rules: '',
is_time_limited: true,
is_practice_exam: false,
is_proctored_enabled: false,
@@ -1320,6 +1365,14 @@ describe('CourseOutlinePage', function() {
expectShowCorrectness('never');
});
it('review rules exists', function() {
createCourseOutlinePage(this, mockCourseJSONWithReviewRules, false);
outlinePage.$('.outline-subsection .configure-button').click();
$('.wrapper-modal-window .action-save').click();
AjaxHelpers.expectJsonRequest(requests, 'POST', '/xblock/mock-subsection', modalSettingsWithExamReviewRules);
expect(requests[0].requestHeaders['X-HTTP-Method-Override']).toBe('PATCH');
});
it('can hide time limit and hide after due fields when the None radio box is selected', function() {
createCourseOutlinePage(this, mockCourseJSON, false);
outlinePage.$('.outline-subsection .configure-button').click();
@@ -1363,6 +1416,7 @@ describe('CourseOutlinePage', function() {
is_proctored_exam: true,
default_time_limit_minutes: 150,
supports_onboarding: true,
show_review_rules: true
}, [
])
])
@@ -1452,7 +1506,26 @@ describe('CourseOutlinePage', function() {
});
it('can select the Proctored exam option', function() {
createCourseOutlinePage(this, mockCourseJSON, false);
var mockCourseWithSpecialExamJSON = createMockCourseJSON({}, [
createMockSectionJSON({
has_changes: true,
enable_proctored_exams: true,
enable_timed_exams: true
}, [
createMockSubsectionJSON({
has_changes: true,
is_time_limited: true,
is_practice_exam: true,
is_proctored_exam: true,
default_time_limit_minutes: 150,
supports_onboarding: false,
show_review_rules: true,
}, [
])
])
]);
createCourseOutlinePage(this, mockCourseWithSpecialExamJSON, false);
outlinePage.$('.outline-subsection .configure-button').click();
setEditModalValues('7/9/2014', '7/10/2014', 'Lab');
selectVisibilitySettings();