diff --git a/src/__tests__/CompareResults/ResultsTable.test.tsx b/src/__tests__/CompareResults/ResultsTable.test.tsx index b855a8be7..ed2fabc33 100644 --- a/src/__tests__/CompareResults/ResultsTable.test.tsx +++ b/src/__tests__/CompareResults/ResultsTable.test.tsx @@ -1122,25 +1122,25 @@ describe('Results Table for MannWhitneyResultsItem for mann-whitney-u testVersio 'a11yr dhtml.html opt e10s fission stylo webrender', ' rev: spam', ' - Windows 10, -, , -, , 100.00 %', - ' - Windows 10, -2.401 %, , -, , 50.00 %', - ' - Linux 18.04, 1.849 %, Regression, -, -, 45.00 %', ' - macOS 10.15, 1.078 %, Improvement, 0.1, -, 25.00 %', + ' - Linux 18.04, 1.849 %, Regression, -, -, 45.00 %', + ' - Windows 10, -2.401 %, , -, , 50.00 %', ' rev: tictactoe', ' - Windows 10, -, , 0.8, , 99.00 %', - ' - Windows 10, -2.401 %, , 0.8, , 49.00 %', - ' - Linux 18.04, 1.849 %, Regression, 0.8, -, 44.00 %', ' - macOS 10.15, 1.078 %, Improvement, 0.9, -, 24.00 %', + ' - Linux 18.04, 1.849 %, Regression, 0.8, -, 44.00 %', + ' - Windows 10, -2.401 %, , 0.8, , 49.00 %', 'a11yr aria.html opt e10s fission stylo webrender', ' rev: spam', ' - Windows 10, -, , 1.2, , 99.00 %', - ' - Windows 10, -2.401 %, , 1.2, , 49.00 %', - ' - Linux 18.04, 1.849 %, Regression, 1.2, -, 44.00 %', ' - macOS 10.15, 1.078 %, Improvement, 1.3, -, 24.00 %', + ' - Linux 18.04, 1.849 %, Regression, 1.2, -, 44.00 %', + ' - Windows 10, -2.401 %, , 1.2, , 49.00 %', ' rev: tictactoe', ' - Windows 10, -, , 2, , 98.00 %', - ' - Windows 10, -2.401 %, , 2, , 48.00 %', - ' - Linux 18.04, 1.849 %, Regression, 2, -, 43.00 %', ' - macOS 10.15, 1.078 %, Improvement, 2.1, -, 23.00 %', + ' - Linux 18.04, 1.849 %, Regression, 2, -, 43.00 %', + ' - Windows 10, -2.401 %, , 2, , 48.00 %', ]); expect(effectSizeButton).toMatchSnapshot(); @@ -1150,28 +1150,28 @@ describe('Results Table for MannWhitneyResultsItem for mann-whitney-u testVersio // Sort by Effect Size (%) ascending await user.click(effectSizeButton); expect(summarizeVisibleRows('mann-whitney-u')).toEqual([ - 'a11yr aria.html opt e10s fission stylo webrender', - ' rev: tictactoe', - ' - macOS 10.15, 1.078 %, Improvement, 2.1, -, 23.00 %', - ' - Linux 18.04, 1.849 %, Regression, 2, -, 43.00 %', - ' - Windows 10, -2.401 %, , 2, , 48.00 %', - ' - Windows 10, -, , 2, , 98.00 %', - ' rev: spam', - ' - macOS 10.15, 1.078 %, Improvement, 1.3, -, 24.00 %', - ' - Linux 18.04, 1.849 %, Regression, 1.2, -, 44.00 %', - ' - Windows 10, -2.401 %, , 1.2, , 49.00 %', - ' - Windows 10, -, , 1.2, , 99.00 %', 'a11yr dhtml.html opt e10s fission stylo webrender', + ' rev: spam', + ' - Windows 10, -2.401 %, , -, , 50.00 %', + ' - Linux 18.04, 1.849 %, Regression, -, -, 45.00 %', + ' - macOS 10.15, 1.078 %, Improvement, 0.1, -, 25.00 %', + ' - Windows 10, -, , -, , 100.00 %', ' rev: tictactoe', - ' - macOS 10.15, 1.078 %, Improvement, 0.9, -, 24.00 %', - ' - Linux 18.04, 1.849 %, Regression, 0.8, -, 44.00 %', ' - Windows 10, -2.401 %, , 0.8, , 49.00 %', + ' - Linux 18.04, 1.849 %, Regression, 0.8, -, 44.00 %', + ' - macOS 10.15, 1.078 %, Improvement, 0.9, -, 24.00 %', ' - Windows 10, -, , 0.8, , 99.00 %', + 'a11yr aria.html opt e10s fission stylo webrender', ' rev: spam', - ' - macOS 10.15, 1.078 %, Improvement, 0.1, -, 25.00 %', - ' - Linux 18.04, 1.849 %, Regression, -, -, 45.00 %', - ' - Windows 10, -2.401 %, , -, , 50.00 %', - ' - Windows 10, -, , -, , 100.00 %', + ' - Windows 10, -2.401 %, , 1.2, , 49.00 %', + ' - Linux 18.04, 1.849 %, Regression, 1.2, -, 44.00 %', + ' - macOS 10.15, 1.078 %, Improvement, 1.3, -, 24.00 %', + ' - Windows 10, -, , 1.2, , 99.00 %', + ' rev: tictactoe', + ' - Windows 10, -2.401 %, , 2, , 48.00 %', + ' - Linux 18.04, 1.849 %, Regression, 2, -, 43.00 %', + ' - macOS 10.15, 1.078 %, Improvement, 2.1, -, 23.00 %', + ' - Windows 10, -, , 2, , 98.00 %', ]); expect(effectSizeButton).toMatchSnapshot(); // It should be persisted in the URL diff --git a/src/__tests__/CompareResults/SubtestsResultsView.test.tsx b/src/__tests__/CompareResults/SubtestsResultsView.test.tsx index 4b6c2ae76..7df2a8e96 100644 --- a/src/__tests__/CompareResults/SubtestsResultsView.test.tsx +++ b/src/__tests__/CompareResults/SubtestsResultsView.test.tsx @@ -585,11 +585,11 @@ describe('SubtestsResultsView Component Tests for mann-whitney-u testVersion', ( }); await user.click(effectButton); expect(summarizeVisibleRows('mann-whitney-u')).toEqual([ + 'browser.html: 0.963 %, -0.04, -, 15.00%', + 'regression.html: 1.135 %, 0.12, , 25.00%', 'dhtml.html: 1.135 %, 0.02, , 60.00%', - 'improvement.html: 0.963 %, -0.05, , 50.00%', 'tablemutation.html: 0.98 %, 0.01, -, 45.00%', - 'regression.html: 1.135 %, 0.12, , 25.00%', - 'browser.html: 0.963 %, -0.04, -, 15.00%', + 'improvement.html: 0.963 %, -0.05, , 50.00%', ]); // It should have the "descending" SVG. @@ -600,11 +600,11 @@ describe('SubtestsResultsView Component Tests for mann-whitney-u testVersion', ( // Sort by Effect Size ascending await user.click(effectButton); expect(summarizeVisibleRows('mann-whitney-u')).toEqual([ - 'browser.html: 0.963 %, -0.04, -, 15.00%', - 'regression.html: 1.135 %, 0.12, , 25.00%', - 'tablemutation.html: 0.98 %, 0.01, -, 45.00%', 'improvement.html: 0.963 %, -0.05, , 50.00%', + 'tablemutation.html: 0.98 %, 0.01, -, 45.00%', 'dhtml.html: 1.135 %, 0.02, , 60.00%', + 'regression.html: 1.135 %, 0.12, , 25.00%', + 'browser.html: 0.963 %, -0.04, -, 15.00%', ]); expectParameterToHaveValue('sort', 'effects|asc'); }); diff --git a/src/common/testVersions/mannWhitney.tsx b/src/common/testVersions/mannWhitney.tsx index cc7559d1e..0312199ad 100644 --- a/src/common/testVersions/mannWhitney.tsx +++ b/src/common/testVersions/mannWhitney.tsx @@ -205,8 +205,8 @@ export const mannWhitneyStrategy = { resultB: MannWhitneyResultsItem, ) { return ( - Math.abs(resultA.cles?.cles ?? 0) - - Math.abs(resultB.cles?.cles ?? 0) + Math.abs((resultA.cles?.cles ?? 0.5) - 0.5) - + Math.abs((resultB.cles?.cles ?? 0.5) - 0.5) ); }, tooltip: tooltipEffectSize,