From a9a255e3c8c7f27723d0cf58003d9e6948a44c58 Mon Sep 17 00:00:00 2001 From: Harry Rein Date: Mon, 11 Dec 2017 12:59:43 -0500 Subject: [PATCH] Load popper and bootstrap through a script tag to reduce flakiness on stage. --- .../js/learner_dashboard/views/course_entitlement_view.js | 8 -------- lms/static/lms/js/spec/main.js | 1 - lms/templates/dashboard.html | 4 ++++ themes/edx.org/lms/templates/dashboard.html | 4 ++++ 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lms/static/js/learner_dashboard/views/course_entitlement_view.js b/lms/static/js/learner_dashboard/views/course_entitlement_view.js index cf974973b9..4ac3d8dbb4 100644 --- a/lms/static/js/learner_dashboard/views/course_entitlement_view.js +++ b/lms/static/js/learner_dashboard/views/course_entitlement_view.js @@ -1,11 +1,3 @@ -// 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'; diff --git a/lms/static/lms/js/spec/main.js b/lms/static/lms/js/spec/main.js index f52a208565..0ac5f80d62 100644 --- a/lms/static/lms/js/spec/main.js +++ b/lms/static/lms/js/spec/main.js @@ -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', diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index c60337be24..e479ae9f9d 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -33,6 +33,10 @@ from student.models import CourseEnrollment <%static:include path="dashboard/${template_name}.underscore" /> % endfor +% if course_entitlements: + + +% endif <%block name="js_extra"> diff --git a/themes/edx.org/lms/templates/dashboard.html b/themes/edx.org/lms/templates/dashboard.html index 32eba8b285..1f365da0df 100644 --- a/themes/edx.org/lms/templates/dashboard.html +++ b/themes/edx.org/lms/templates/dashboard.html @@ -34,6 +34,10 @@ from student.models import CourseEnrollment <%static:include path="dashboard/${template_name}.underscore" /> % endfor +% if course_entitlements: + + +% endif <%block name="js_extra">