From b3ff509767b306dbcecba8c2b6875829fac95080 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 10:23:25 +0000 Subject: [PATCH 01/13] chore(deps): update dependency jasmine-core to v2.99.1 --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 743dca2ec852..17793c8397c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,7 +77,7 @@ "devDependencies": { "@edx/stylelint-config-edx": "^2", "babel-jest": "^29", - "jasmine-core": "2.6.4", + "jasmine-core": "2.99.1", "jasmine-jquery": "git+https://git@github.com/velesin/jasmine-jquery.git#ebad463d592d3fea00c69f26ea18a930e09c7b58", "jest": "^29", "karma": "^6.0.0", @@ -10775,9 +10775,9 @@ } }, "node_modules/jasmine-core": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.6.4.tgz", - "integrity": "sha512-HUYBYi/hlSnCIr8QH9xuDBJUAzSHS0El3HxTomovIQcNxtbNhoOtKwpEZaB/jq3sfW/qyhqwW/VDUtoB2RZ4Tg==", + "version": "2.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "integrity": "sha512-ra97U4qu3OCcIxvN6eg3kyy8bLrID/TgxafSGMMICg3SFx5C/sUfDPpiOh7yoIsHdtjrOVdtT9rieYhqOsh9Ww==", "dev": true, "license": "MIT" }, @@ -16951,6 +16951,7 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } diff --git a/package.json b/package.json index 749c937f7ecb..bcfb2b964005 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "devDependencies": { "@edx/stylelint-config-edx": "^2", "babel-jest": "^29", - "jasmine-core": "2.6.4", + "jasmine-core": "2.99.1", "jasmine-jquery": "git+https://git@github.com/velesin/jasmine-jquery.git#ebad463d592d3fea00c69f26ea18a930e09c7b58", "jest": "^29", "karma": "^6.0.0", From 1c68c6c463b6a63312005b4193695ad36d079f11 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 4 Mar 2026 14:21:57 -0500 Subject: [PATCH 02/13] fix: refactor certificate_editor_spec to not call AjaxHelpers inside it() Jasmine 2.99.x added ensureIsNotNested() which throws 'afterEach' should only be used in 'describe' function when afterEach() is called from inside a running spec. AjaxHelpers.requests() calls afterEach() internally, so it must be called from a describe() body. Replicate the createFakeRequests() pattern in beforeEach/afterEach instead: - Set up sinon.useFakeXMLHttpRequest() in describe('Basic') beforeEach - Tear down in afterEach via requests.restore() - Remove inline AjaxHelpers.requests(this) from 3 it() bodies - Remove AjaxHelpers.requests(that) from clickDeleteItem() helper (uses the module-level requests variable instead) This file was a cascade-causing failure: sinon's fake XHR was left active after the suite ran, intercepting requests from later suites. Co-Authored-By: Claude Sonnet 4.6 --- .../spec/views/certificate_editor_spec.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/cms/static/js/certificates/spec/views/certificate_editor_spec.js b/cms/static/js/certificates/spec/views/certificate_editor_spec.js index 64ef492c82ca..bace47fe0b4d 100644 --- a/cms/static/js/certificates/spec/views/certificate_editor_spec.js +++ b/cms/static/js/certificates/spec/views/certificate_editor_spec.js @@ -2,6 +2,7 @@ define([ 'underscore', + 'sinon', 'js/models/course', 'js/certificates/models/certificate', 'js/certificates/models/signatory', @@ -14,11 +15,12 @@ define([ 'js/spec_helpers/validation_helpers', 'js/certificates/spec/custom_matchers' ], -function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, CertificateEditorView, +function(_, sinon, Course, CertificateModel, SignatoryModel, CertificatesCollection, CertificateEditorView, Notification, AjaxHelpers, TemplateHelpers, ViewHelpers, ValidationHelpers, CustomMatchers) { 'use strict'; var MAX_SIGNATORIES_LIMIT = 10; + var requests, xhrFactory; var SELECTORS = { detailsView: '.certificate-details', editView: '.certificate-edit', @@ -45,8 +47,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce }; var clickDeleteItem = function(that, promptText, element, url) { - var requests = AjaxHelpers.requests(that), - promptSpy = ViewHelpers.createPromptSpy(), + var promptSpy = ViewHelpers.createPromptSpy(), notificationSpy = ViewHelpers.createNotificationSpy(); that.view.$(element).click(); @@ -129,6 +130,11 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce describe('Basic', function() { beforeEach(function() { + xhrFactory = sinon.useFakeXMLHttpRequest(); + requests = []; + requests.currentIndex = 0; + requests.restore = function() { xhrFactory.restore(); }; + xhrFactory.onCreate = function(req) { requests.push(req); }; appendSetFixtures( $('