Skip to content

fix: fix slope line #478

fix: fix slope line

fix: fix slope line #478

Triggered via pull request October 25, 2024 14:37
Status Failure
Total duration 1m 0s
Artifacts

unit-test.yml

on: pull_request
unit-test
49s
unit-test
Fit to window
Zoom out
Zoom in

Annotations

5 errors
reference lines › should render slope line with negative slope label on Y: packages/picasso.js/src/core/chart-components/ref-line/__tests__/refline.spec.js#L557
assert.deepStrictEqual(received, expected) Expected value to deeply and strictly equal to: [{"flipXY": false, "stroke": "green", "strokeDasharray": undefined, "strokeWidth": 2, "type": "line", "value": 0.5, "x1": 0, "x2": 870, "y1": 406.5, "y2": 0}, {"anchor": "start", "fill": "green", "fontFamily": "Arial", "fontSize": "12px", "maxWidth": 120, "opacity": 1, "text": "Threshold value (-0.5x + 0.5)", "title": "Threshold value (-0.5x + 0.5)", "type": "text", "width": 120, "x": 7, "y": 404}] Received: [{"flipXY": false, "stroke": "green", "strokeDasharray": undefined, "strokeWidth": 2, "type": "line", "value": 0.5, "x1": 0, "x2": 870, "y1": 406.5, "y2": 813}, {"anchor": "start", "fill": "green", "fontFamily": "Arial", "fontSize": "12px", "maxWidth": 120, "opacity": 1, "text": "Threshold value (-0.5x + 0.5)", "title": "Threshold value (-0.5x + 0.5)", "type": "text", "width": 120, "x": 7, "y": 404}] Message: expected [ Array(2) ] to deeply equal [ { flipXY: false, …(9) }, …(1) ] Difference: - Expected + Received @@ -7,11 +7,11 @@ "type": "line", "value": 0.5, "x1": 0, "x2": 870, "y1": 406.5, - "y2": 0, + "y2": 813, }, Object { "anchor": "start", "fill": "green", "fontFamily": "Arial", at Object.equal (packages/picasso.js/src/core/chart-components/ref-line/__tests__/refline.spec.js:557:36)
reference lines › should render slope line with rect for colored background on Y scale: packages/picasso.js/src/core/chart-components/ref-line/__tests__/refline.spec.js#L634
assert.deepStrictEqual(received, expected) Expected value to deeply and strictly equal to: [{"flipXY": false, "stroke": "green", "strokeDasharray": undefined, "strokeWidth": 2, "type": "line", "value": 0.5, "x1": 0, "x2": 870, "y1": 406.5, "y2": 813}, {"fill": "green", "height": 12.399999999999999, "rx": 3, "ry": 3, "stroke": "green", "type": "rect", "width": 55.4, "x": 791.6, "y": 0.6000000000000014}, {"anchor": "start", "fill": "#ffffff", "fontFamily": "Arial", "fontSize": "12px", "maxWidth": 120, "opacity": 1, "text": "Colored", "title": "Colored", "type": "text", "width": 50.4, "x": 793.6, "y": 10}] Received: [{"flipXY": false, "stroke": "green", "strokeDasharray": undefined, "strokeWidth": 2, "type": "line", "value": 0.5, "x1": 0, "x2": 870, "y1": 406.5, "y2": 0}, {"fill": "green", "height": 12.399999999999999, "rx": 3, "ry": 3, "stroke": "green", "type": "rect", "width": 55.4, "x": 791.6, "y": 0.6000000000000014}, {"anchor": "start", "fill": "#ffffff", "fontFamily": "Arial", "fontSize": "12px", "maxWidth": 120, "opacity": 1, "text": "Colored", "title": "Colored", "type": "text", "width": 50.4, "x": 793.6, "y": 10}] Message: expected [ Array(3) ] to deeply equal [ { flipXY: false, …(9) }, …(2) ] Difference: - Expected + Received @@ -7,11 +7,11 @@ "type": "line", "value": 0.5, "x1": 0, "x2": 870, "y1": 406.5, - "y2": 813, + "y2": 0, }, Object { "fill": "green", "height": 12.399999999999999, "rx": 3, at Object.equal (packages/picasso.js/src/core/chart-components/ref-line/__tests__/refline.spec.js:634:36)
reference lines › should not render slope line if oob: packages/picasso.js/src/core/chart-components/ref-line/__tests__/refline.spec.js#L721
assert.deepStrictEqual(received, expected) Expected value to deeply and strictly equal to: [{"cx": 15, "cy": 775, "data": [{"value": 3}], "fill": "#1A1A1A", "opacity": 1, "r": 10, "stroke": "transparent", "strokeWidth": 0, "type": "circle"}, {"fill": "#fff", "fontFamily": "Arial", "fontSize": "13px", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "text": 1, "type": "text", "x": 11, "y": 779}, {"d": " M 7.5 786.25 L 22.5 786.25 L 15 793.75 Z ", "fill": "#4D4D4D", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "type": "path", "x": 15, "y": 775}] Received: [{"cx": 38, "cy": 798, "data": [{"value": 3}], "fill": "#1A1A1A", "opacity": 1, "r": 10, "stroke": "transparent", "strokeWidth": 0, "type": "circle"}, {"fill": "#fff", "fontFamily": "Arial", "fontSize": "13px", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "text": 1, "type": "text", "x": 34, "y": 802}, {"d": " M 26.75 790.5 L 26.75 805.5 L 19.25 798 Z ", "fill": "#4D4D4D", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "type": "path", "x": 38, "y": 798}, {"cx": 15, "cy": 38, "data": [{"value": 3}], "fill": "#1A1A1A", "opacity": 1, "r": 10, "stroke": "transparent", "strokeWidth": 0, "type": "circle"}, {"fill": "#fff", "fontFamily": "Arial", "fontSize": "13px", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "text": 1, "type": "text", "x": 11, "y": 42}, {"d": " M 7.5 26.75 L 22.5 26.75 L 15 19.25 Z ", "fill": "#4D4D4D", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "type": "path", "x": 15, "y": 38}] Message: expected [ …(6) ] to deeply equal [ …(3) ] Difference: - Expected + Received @@ -1,9 +1,50 @@ Array [ Object { + "cx": 38, + "cy": 798, + "data": Array [ + Object { + "value": 3, + }, + ], + "fill": "#1A1A1A", + "opacity": 1, + "r": 10, + "stroke": "transparent", + "strokeWidth": 0, + "type": "circle", + }, + Object { + "fill": "#fff", + "fontFamily": "Arial", + "fontSize": "13px", + "opacity": 1, + "stroke": "transparent", + "strokeWidth": 0, + "text": 1, + "type": "text", + "x": 34, + "y": 802, + }, + Object { + "d": " + M 26.75 790.5 + L 26.75 805.5 + L 19.25 798 Z + ", + "fill": "#4D4D4D", + "opacity": 1, + "stroke": "transparent", + "strokeWidth": 0, + "type": "path", + "x": 38, + "y": 798, + }, + Object { "cx": 15, - "cy": 775, + "cy": 38, "data": Array [ Object { "value": 3, }, ], @@ -22,22 +63,22 @@ "stroke": "transparent", "strokeWidth": 0, "text": 1, "type": "text", "x": 11, - "y": 779, + "y": 42, }, Object { "d": " - M 7.5 786.25 - L 22.5 786.25 - L 15 793.75 Z + M 7.5 26.75 + L 22.5 26.75 + L 15 19.25 Z ", "fill": "#4D4D4D", "opacity": 1, "stroke": "transparent", "strokeWidth": 0, "type": "path", "x": 15, - "y": 775, + "y": 38, }, ] at Object.equal (packages/picasso.js/src/core/chart-components/ref-line/__tests__/refline.spec.js:721:36)
unit-test
The process '/home/runner/setup-pnpm/node_modules/.bin/pnpm' failed with exit code 1
unit-test
🚨 Coverage run failed!