From f2de1be96ab793d9a905e2888a8dac887b6f2d1a Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Tue, 1 Jun 2021 08:47:55 -0700 Subject: [PATCH] Fixed "stop spec on expectation failure" checkbox in standalone Fixes [#178248968]. --- lib/jasmine-core/jasmine-html.js | 2 +- spec/html/HtmlReporterSpec.js | 7 +++++-- src/html/HtmlReporter.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/jasmine-core/jasmine-html.js b/lib/jasmine-core/jasmine-html.js index 8539c76c..ebe94049 100644 --- a/lib/jasmine-core/jasmine-html.js +++ b/lib/jasmine-core/jasmine-html.js @@ -565,7 +565,7 @@ jasmineRequire.HtmlReporter = function(j$) { ); throwCheckbox.checked = config.oneFailurePerSpec; throwCheckbox.onclick = function() { - navigateWithNewParam('throwFailures', !config.oneFailurePerSpec); + navigateWithNewParam('oneFailurePerSpec', !config.oneFailurePerSpec); }; var randomCheckbox = optionsMenuDom.querySelector( diff --git a/spec/html/HtmlReporterSpec.js b/spec/html/HtmlReporterSpec.js index 2db0e160..07b5d59f 100644 --- a/spec/html/HtmlReporterSpec.js +++ b/spec/html/HtmlReporterSpec.js @@ -802,7 +802,7 @@ describe('HtmlReporter', function() { var throwingExpectationsUI = container.querySelector('.jasmine-throw'); throwingExpectationsUI.click(); - expect(navigateHandler).toHaveBeenCalledWith('throwFailures', true); + expect(navigateHandler).toHaveBeenCalledWith('oneFailurePerSpec', true); }); it('should navigate and change the setting to off', function() { @@ -831,7 +831,10 @@ describe('HtmlReporter', function() { var throwingExpectationsUI = container.querySelector('.jasmine-throw'); throwingExpectationsUI.click(); - expect(navigateHandler).toHaveBeenCalledWith('throwFailures', false); + expect(navigateHandler).toHaveBeenCalledWith( + 'oneFailurePerSpec', + false + ); }); }); describe('UI for hiding disabled specs', function() { diff --git a/src/html/HtmlReporter.js b/src/html/HtmlReporter.js index e591ccac..1c34b260 100644 --- a/src/html/HtmlReporter.js +++ b/src/html/HtmlReporter.js @@ -534,7 +534,7 @@ jasmineRequire.HtmlReporter = function(j$) { ); throwCheckbox.checked = config.oneFailurePerSpec; throwCheckbox.onclick = function() { - navigateWithNewParam('throwFailures', !config.oneFailurePerSpec); + navigateWithNewParam('oneFailurePerSpec', !config.oneFailurePerSpec); }; var randomCheckbox = optionsMenuDom.querySelector(