Unverified Commit c734058c by Harry Rein Committed by GitHub

Merge pull request #16862 from edx/HarryRein/temp-patch-dashboard-entitlements

Load popper and bootstrap through a script tag to reduce stage flakiness
parents 98456e11 a9a255e3
// This is required for karma testing due to a known issue in Bootstrap-v4: https://github.com/twbs/bootstrap/pull/22888
// The issue is that bootstrap tries to access Popper's global Popper object which is not initialized on loading
// from the karma configuration. The next version of bootstrap (>v4.2) will solve this issue.
// Once this is resolved, we should import bootstrap through require-config.js and main.js (for jasmine testing)
var defineFn = require || RequireJS.require; // eslint-disable-line global-require
var Popper = defineFn(['common/js/vendor/popper']);
defineFn(['common/js/vendor/bootstrap']);
(function(define) {
'use strict';
......
......@@ -762,7 +762,6 @@
'js/spec/learner_dashboard/unenroll_view_spec.js',
'js/spec/learner_dashboard/course_card_view_spec.js',
'js/spec/learner_dashboard/course_enroll_view_spec.js',
'js/spec/learner_dashboard/course_entitlement_view_spec.js',
'js/spec/markdown_editor_spec.js',
'js/spec/dateutil_factory_spec.js',
'js/spec/navigation_spec.js',
......
......@@ -33,6 +33,10 @@ from student.models import CourseEnrollment
<%static:include path="dashboard/${template_name}.underscore" />
</script>
% endfor
% if course_entitlements:
<script type="text/javascript" src="${static.url('common/js/vendor/popper.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/bootstrap.js')}"></script>
% endif
</%block>
<%block name="js_extra">
......
......@@ -34,6 +34,10 @@ from student.models import CourseEnrollment
<%static:include path="dashboard/${template_name}.underscore" />
</script>
% endfor
% if course_entitlements:
<script type="text/javascript" src="${static.url('common/js/vendor/popper.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/bootstrap.js')}"></script>
% endif
</%block>
<%block name="js_extra">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment