Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion webpack-config/file-lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ module.exports = {
path.resolve(__dirname, '../common/static/common/js/components/views/paging_footer.js'),
path.resolve(__dirname, '../cms/static/js/views/paging.js'),
path.resolve(__dirname, '../common/static/common/js/components/utils/view_utils.js'),
/xmodule\/js\/src/,
// Files in xmodule/js/src/ that still use RequireJS (AMD) patterns.
// New files added under xmodule/js/src/ should use ES6+ — do NOT add them here.
// To migrate a file off RequireJS, remove it from this list.
path.resolve(__dirname, '../xmodule/js/src/poll/poll.js'),
path.resolve(__dirname, '../xmodule/js/src/poll/poll_main.js'),
path.resolve(__dirname, '../xmodule/js/src/video/08_video_auto_advance_control.js'),
path.resolve(__dirname, '../openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js')
],

Expand Down
7 changes: 6 additions & 1 deletion webpack.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ var builtinBlocksJS = require('./webpack.builtinblocks.config.js');

var filesWithRequireJSBlocks = [
path.resolve(__dirname, 'common/static/common/js/components/utils/view_utils.js'),
/xmodule\/js\/src/
// Files in xmodule/js/src/ that still use RequireJS (AMD) patterns.
// New files added under xmodule/js/src/ should use ES6+ — do NOT add them here.
// To migrate a file off RequireJS, remove it from this list.
path.resolve(__dirname, 'xmodule/js/src/poll/poll.js'),
path.resolve(__dirname, 'xmodule/js/src/poll/poll_main.js'),
path.resolve(__dirname, 'xmodule/js/src/video/08_video_auto_advance_control.js'),
];

var defineHeader = /\(function ?\(((define|require|requirejs|\$)(, )?)+\) ?\{/;
Expand Down
15 changes: 14 additions & 1 deletion xmodule/js/karma_runner_webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import '../../common/static/js/test/i18n.js';
import '../../common/static/common/js/vendor/hls.js';
import '../assets/vertical/public/js/vertical_student_view.js';

import '../../common/static/js/vendor/jasmine-imagediff.js';
import imagediff from '../../common/static/js/vendor/jasmine-imagediff.js';
import '../../common/static/common/js/spec_helpers/jasmine-waituntil.js';
import '../../common/static/common/js/spec_helpers/jasmine-extensions.js';
import '../../common/static/common/js/vendor/sinon.js';
Expand All @@ -35,11 +35,23 @@ import StringUtils from 'edx-ui-toolkit/js/utils/string-utils';
// but not explicitly imported
import 'jquery.ui';

// Problem Block (capa) source files
import './src/xmodule.js';
import './src/javascript_loader.js';
import './src/collapsible.js';
import './src/capa/display.js';
import './src/capa/imageinput.js';
import './src/capa/schematic.js';

// These
import '../assets/video/public/js/10_main.js';
import './spec/helper.js';
import './spec/video_helper.js';

// Problem Block (capa) spec files
import './spec/capa/display_spec.js';
import './spec/capa/imageinput_spec.js';

// These are the tests that will be run
import './spec/video/async_process_spec.js';
import './spec/video/completion_spec.js';
Expand Down Expand Up @@ -83,6 +95,7 @@ import './spec/time_spec.js';
'use strict';

window._ = _;
window.imagediff = imagediff;
window.edx = window.edx || {};
window.edx.HtmlUtils = HtmlUtils;
window.edx.StringUtils = StringUtils;
Expand Down
4 changes: 2 additions & 2 deletions xmodule/js/karma_xmodule.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ var options = {
{pattern: 'src/javascript_loader.js', included: true},
{pattern: 'src/collapsible.js', included: true},
// Load everything else
{pattern: 'src/**/!(video)/!(poll|time).js', included: true}
{pattern: 'src/**/!(video|capa)/!(poll|time).js', included: true}
],

specFiles: [
{pattern: 'spec/helper.js', included: true, ignoreCoverage: true}, // Helper which depends on source files.
{pattern: 'spec/**/!(video)/*.js', included: true},
{pattern: 'spec/**/!(video|capa)/*.js', included: true},
{pattern: 'spec/!(time_spec|video_helper).js', included: true}
],

Expand Down
2 changes: 1 addition & 1 deletion xmodule/js/src/capa/schematic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,7 @@ function update_schematics() {
}
window.update_schematics = update_schematics;

schematic = (function () {
var schematic = (function () {
var background_style = "rgb(220,220,220)";
var element_style = "rgb(255,255,255)";
var thumb_style = "rgb(128,128,128)";
Expand Down
Loading