Skip to content

Commit

Permalink
test: test debug msg
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenk committed Dec 19, 2024
1 parent 425c6cf commit 0c84cad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openassessment/xblock/static/js/spec/lms/oa_self.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,18 @@ describe("OpenAssessment.SelfView", function() {

it("warns of unsubmitted assessments", function() {

console.log("Test1")
expect(view.baseView.unsavedWarningEnabled()).toBe(false);
console.log("Test2")

// Click on radio buttons, to create unsubmitted changes.
$('.question__answers', view.el).each(function() {
$('input[type="radio"]', this).first().click();
});

console.log("Test3")
expect(view.baseView.unsavedWarningEnabled()).toBe(true);
console.log("Test4")

// When selfAssess is executed, the views will all re-render. However,
// as the test does not mock out the surrounding elements, the re-render
Expand All @@ -124,7 +128,9 @@ describe("OpenAssessment.SelfView", function() {
).promise();
};

console.log("Test5")
view.selfAssess();
console.log("Test6")

expect(view.baseView.unsavedWarningEnabled()).toBe(false);
});
Expand Down

0 comments on commit 0c84cad

Please sign in to comment.