solid-recharts 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/package.json +6 -5
- package/src/component/Customized.tsx +1 -1
- package/src/state/RechartsReduxContext.tsx +1 -1
- package/src/state/selectors/arrayEqualityCheck.ts +1 -1
- package/src/state/selectors/numberDomainEqualityCheck.ts +1 -1
- package/src/state/store.ts +0 -1
- package/src/util/resolveDefaultProps.tsx +1 -1
- package/src/util/typedDataKey.ts +1 -1
- package/src/util/types.ts +1 -1
- package/test/animation/CSSTransitionAnimate.timing.spec.tsx +1 -1
- package/test/animation/JavascriptAnimate.spec.tsx +1 -1
- package/test/animation/legacyAnimationLengthChange.spec.tsx +1 -1
- package/test/cartesian/Area.animation.spec.tsx +1 -1
- package/test/cartesian/Area.range.spec.tsx +1 -1
- package/test/cartesian/Area.spec.tsx +1 -1
- package/test/cartesian/Area.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Area.typed.spec.tsx +1 -1
- package/test/cartesian/Axis.integration.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.csstransition.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.typed.spec.tsx +1 -1
- package/test/cartesian/Bar.animation.spec.tsx +1 -1
- package/test/cartesian/Bar.stackDomain.spec.tsx +1 -1
- package/test/cartesian/Bar.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Bar.zeroDimensionFiltering.spec.tsx +1 -1
- package/test/cartesian/Brush.keyboard.spec.tsx +1 -1
- package/test/cartesian/Brush.panorama.spec.tsx +1 -1
- package/test/cartesian/Brush.props.spec.tsx +1 -1
- package/test/cartesian/Brush.render.spec.tsx +1 -1
- package/test/cartesian/Brush.spec.tsx +1 -1
- package/test/cartesian/Brush.stacked.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.render.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.spec.tsx +1 -1
- package/test/cartesian/CartesianGrid.render.spec.tsx +1 -1
- package/test/cartesian/CartesianGrid.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.render.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.spec.tsx +1 -1
- package/test/cartesian/Funnel.animation.spec.tsx +1 -1
- package/test/cartesian/Funnel.spec.tsx +1 -1
- package/test/cartesian/Funnel.typed.spec.tsx +1 -1
- package/test/cartesian/GraphicalItemClipPath.scale-behavior.spec.tsx +1 -1
- package/test/cartesian/Line.animation.spec.tsx +1 -1
- package/test/cartesian/Line.sparseAnimationPath.spec.tsx +1 -1
- package/test/cartesian/Line.spec.tsx +1 -1
- package/test/cartesian/Line.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.panorama.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.animation.spec.tsx +1 -1
- package/test/cartesian/Scatter.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.spec.tsx +1 -1
- package/test/cartesian/Scatter.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.barSize.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.brush.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.categorydomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.datatypes.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.hide.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.multiaxis.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.numberdomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding_clip.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.state.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.tick.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.timescale.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.vertical.spec.tsx +1 -1
- package/test/cartesian/XAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.7362.derivedDomain.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.interval-zero.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.label.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tick.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.typed.spec.tsx +1 -1
- package/test/cartesian/ZAxis.spec.tsx +1 -1
- package/test/cartesian/ZAxis.typed.spec.tsx +1 -1
- package/test/cartesian/axisLineAndStroke.spec.tsx +1 -1
- package/test/cartesian/miscFeatureGaps.spec.tsx +1 -1
- package/test/chart/AccessibilityLayer.spec.tsx +1 -1
- package/test/chart/AccessibilityScans.spec.tsx +2 -2
- package/test/chart/AreaChart.spec.tsx +1 -1
- package/test/chart/AreaChart.typed.spec.tsx +1 -1
- package/test/chart/BarChart.spec.tsx +1 -1
- package/test/chart/BarChart.typed.spec.tsx +1 -1
- package/test/chart/CategoricalChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.typed.spec.tsx +1 -1
- package/test/chart/FunnelChart.spec.tsx +1 -1
- package/test/chart/FunnelChart.typed.spec.tsx +1 -1
- package/test/chart/LineChart.smoke.spec.tsx +1 -1
- package/test/chart/LineChart.spec.tsx +1 -1
- package/test/chart/LineChart.typed.spec.tsx +1 -1
- package/test/chart/NicheChartTooltip.spec.tsx +1 -1
- package/test/chart/PieChart.spec.tsx +1 -1
- package/test/chart/PieChart.typed.spec.tsx +1 -1
- package/test/chart/RadarChart.spec.tsx +1 -1
- package/test/chart/RadarChart.typed.spec.tsx +1 -1
- package/test/chart/RadialBarChart.spec.tsx +1 -1
- package/test/chart/RadialBarChart.typed.spec.tsx +1 -1
- package/test/chart/RechartsWrapper.spec.tsx +1 -1
- package/test/chart/Sankey.content.spec.tsx +1 -1
- package/test/chart/Sankey.spec.tsx +1 -1
- package/test/chart/ScatterChart.spec.tsx +1 -1
- package/test/chart/ScatterChart.typed.spec.tsx +1 -1
- package/test/chart/SunburstChart.spec.tsx +1 -1
- package/test/chart/Treemap.animation.spec.tsx +1 -1
- package/test/chart/Treemap.spec.tsx +1 -1
- package/test/chart/chartEvents.spec.tsx +1 -1
- package/test/chart/responsive.spec.tsx +1 -1
- package/test/component/Cell.render.spec.tsx +1 -1
- package/test/component/Cell.spec.tsx +1 -1
- package/test/component/Cursor.spec.tsx +1 -1
- package/test/component/DefaultTooltipContent.spec.tsx +1 -1
- package/test/component/Label.render.spec.tsx +1 -1
- package/test/component/Label.spec.tsx +1 -1
- package/test/component/LabelList.spec.tsx +1 -1
- package/test/component/Legend.itemSorter.spec.tsx +1 -1
- package/test/component/Legend.render.spec.tsx +1 -1
- package/test/component/Legend.spec.tsx +1 -1
- package/test/component/ResponsiveContainer.spec.tsx +1 -1
- package/test/component/ResponsiveContainerDataTest.spec.tsx +1 -1
- package/test/component/Text.spec.tsx +1 -1
- package/test/component/Tooltip/ActiveDot.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipEventType.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipTestHelpers.tsx +1 -1
- package/test/component/Tooltip.defaultIndex.spec.tsx +1 -1
- package/test/component/Tooltip.hover.spec.tsx +1 -1
- package/test/component/Tooltip.item.spec.tsx +1 -1
- package/test/component/Tooltip.keyboard.spec.tsx +1 -1
- package/test/component/Tooltip.payload.spec.tsx +1 -1
- package/test/component/Tooltip.touch.spec.tsx +1 -1
- package/test/component/Tooltip.visibility.spec.tsx +1 -1
- package/test/component/TooltipBoundingBox.spec.tsx +2 -2
- package/test/container/ClipPath.spec.tsx +1 -1
- package/test/context/chartLayoutContext.spec.tsx +1 -1
- package/test/helper/createSelectorTestCase.tsx +1 -1
- package/test/helper/selectorTestHelpers.tsx +1 -1
- package/test/hooks/useActiveTooltipDataPoints.spec.tsx +1 -1
- package/test/hooks/useOffset.spec.tsx +1 -1
- package/test/hooks/useTooltipStateHooks.spec.tsx +1 -1
- package/test/polar/Pie/Pie-TwoLevelPieChart.spec.tsx +1 -1
- package/test/polar/Pie/Pie.spec.tsx +1 -1
- package/test/polar/Pie/Pie.typed.spec.tsx +1 -1
- package/test/polar/Pie.animation.spec.tsx +1 -1
- package/test/polar/PieWithLegend.animation.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.events.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.spec.tsx +1 -1
- package/test/polar/PolarLegendPerRow.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.events.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarTooltipLegend.render.spec.tsx +1 -1
- package/test/polar/Radar.animation.spec.tsx +1 -1
- package/test/polar/Radar.render.spec.tsx +1 -1
- package/test/polar/Radar.spec.tsx +1 -1
- package/test/polar/Radar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar.animation.spec.tsx +1 -1
- package/test/polar/RadialBar.render.spec.tsx +1 -1
- package/test/polar/RadialBar.stacked.spec.tsx +1 -1
- package/test/setup.ts +1 -1
- package/test/shape/ActiveShape.spec.tsx +1 -1
- package/test/shape/Cross.spec.tsx +1 -1
- package/test/shape/Curve.spec.tsx +1 -1
- package/test/shape/Curve.typed.spec.tsx +1 -1
- package/test/shape/Dot.spec.tsx +1 -1
- package/test/shape/Polygon.spec.tsx +1 -1
- package/test/shape/Rectangle.animation.spec.tsx +1 -1
- package/test/shape/Rectangle.spec.tsx +1 -1
- package/test/shape/Sector.spec.tsx +1 -1
- package/test/shape/Symbols.spec.tsx +1 -1
- package/test/shape/Trapezoid.spec.tsx +1 -1
- package/test/state/hooks.spec.tsx +1 -1
- package/test/state/selectors/axisSelectors.spec.tsx +1 -1
- package/test/state/selectors/dataSelectors.spec.tsx +1 -1
- package/test/state/selectors/legendSelectors.spec.tsx +1 -1
- package/test/state/selectors/radarSelectors.spec.tsx +1 -1
- package/test/state/selectors/selectActiveTooltipIndex.spec.tsx +1 -1
- package/test/state/selectors/selectDisplayedData.spec.tsx +1 -1
- package/test/state/selectors/selectStackGroups.spec.tsx +1 -1
- package/test/state/selectors/selectors.spec.tsx +1 -1
- package/test/util/DomUtils.spec.tsx +1 -1
- package/test/util/FunnelUtils.spec.tsx +1 -1
- package/test/util/useElementOffset.spec.tsx +1 -1
- package/test/util/usePrefersReducedMotion.spec.ts +1 -1
- package/test/util/useUniqueId.spec.ts +1 -1
- package/test/zIndex/AllZIndexPortals.spec.tsx +1 -1
- package/test/zIndex/DynamicZIndex.spec.tsx +1 -1
- package/test/zIndex/ZIndexLayer.portalOwner.spec.tsx +1 -1
- package/test/zIndex/componentZIndex.spec.tsx +1 -1
- package/test/zIndex/multiChartZIndexIsolation.spec.tsx +1 -1
- package/NEXT_SESSION_PROMPT.md +0 -114
- package/test/helper/render.ts +0 -7
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// selectScatterPoints.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { ScatterChart, Scatter, XAxis, YAxis } from "../../src";
|
|
8
8
|
|
|
9
9
|
const data = [
|
|
@@ -19,7 +19,7 @@ import { assertNotNull } from "../helper/assertNotNull";
|
|
|
19
19
|
import { expectScatterPoints } from "../helper/expectScatterPoints";
|
|
20
20
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
21
21
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
22
|
-
import { fireEvent, render } from "
|
|
22
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
23
23
|
import { dataWithSpecialNameAndFillProperties, PageData } from "../_data";
|
|
24
24
|
import { selectTooltipPayload } from "../../src/state/selectors/tooltipSelectors";
|
|
25
25
|
import { selectActiveTooltipPayload } from "../../src/state/selectors/tooltipSelectors";
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { describe, expect, it } from "vitest";
|
|
25
25
|
import { Scatter, ScatterChart } from "../../src";
|
|
26
26
|
import type { ScatterPointItem } from "../../src/cartesian/Scatter";
|
|
27
|
-
import { render } from "
|
|
27
|
+
import { render } from "@solidjs/testing-library";
|
|
28
28
|
|
|
29
29
|
type ExampleDataPoint = {
|
|
30
30
|
x: number;
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createEffect } from "solid-js";
|
|
3
3
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
4
4
|
import { Bar, BarChart, XAxis, YAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
7
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
8
8
|
import { expectBars } from "../../helper/expectBars";
|
|
@@ -3,7 +3,7 @@ import { createEffect } from "solid-js";
|
|
|
3
3
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
4
4
|
import { selectTicksOfAxis } from "../../../src/state/selectors/axisSelectors";
|
|
5
5
|
import { BarChart, Brush, XAxis } from "../../../src";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
8
8
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { Bar, BarChart, Line, LineChart, Scatter, useXAxisDomain, XAxis } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
5
5
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
6
6
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -4,7 +4,7 @@ import { describe, it } from "vitest";
|
|
|
4
4
|
import { ComposedChart, XAxis } from "../../../src";
|
|
5
5
|
import { coordinateWithValueData, dateWithValueData, pageData, timeData } from "../../_data";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
|
|
9
9
|
const normalizedDateString = (date: Date): string =>
|
|
10
10
|
date.toString().replace(/\(.*?\)/, "(Coordinated Universal Time)");
|
|
@@ -8,7 +8,7 @@ import { pageData } from "../../_data";
|
|
|
8
8
|
import { createSelectorTestCase } from "../../helper/createSelectorTestCase";
|
|
9
9
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
10
10
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
|
|
13
13
|
describe("XAxis hide", () => {
|
|
14
14
|
it("Don't render x-axis when hide is set to be true", () => {
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createEffect } from "solid-js";
|
|
3
3
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
4
4
|
import { Line, LineChart, Tooltip, XAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
7
|
import { selectXAxisPosition } from "../../../src/state/selectors/axisSelectors";
|
|
8
8
|
import { pageData } from "../../_data";
|
|
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { createSignal, flush } from "solid-js";
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
4
|
import { BarChart, Line, LineChart, XAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
7
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
8
8
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { selectBarBandSize } from "../../../src/state/selectors/barSelectors";
|
|
9
9
|
import { selectChartOffsetInternal } from "../../../src/state/selectors/selectChartOffsetInternal";
|
|
10
10
|
import { Bar, BarChart, XAxis, YAxis } from "../../../src";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
13
13
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
14
14
|
import { expectBars } from "../../helper/expectBars";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Bar, BarChart, XAxis, YAxis } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
describe("XAxis padding with allowDataOverflow", () => {
|
|
6
6
|
it("should clip data reaching into the padding area when allowDataOverflow is true", () => {
|
|
@@ -3,7 +3,7 @@ import type { Mock } from "vitest";
|
|
|
3
3
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
4
4
|
import type { JSX } from "@solidjs/web";
|
|
5
5
|
import { BarChart, XAxis } from "../../../src";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
8
8
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
9
9
|
import {
|
|
@@ -3,7 +3,7 @@ import type { Mock } from "vitest";
|
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
4
|
import { Bar, BarChart, ComposedChart, Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
5
5
|
import type { CartesianTickContentProps } from "../../../src";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
8
8
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
9
9
|
import { expectLastCalledWith, expectNthCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -6,7 +6,7 @@ import { scaleTime } from "victory-vendor/d3-scale";
|
|
|
6
6
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
7
7
|
import { selectRealScaleType } from "../../../src/state/selectors/axisSelectors";
|
|
8
8
|
import { Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
11
11
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
12
12
|
import type { XAxisProps } from "../../../src/cartesian/XAxis";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { getRelativeCoordinate, Line, LineChart, XAxis, type TickItem } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/XAxis/XAxis.typed.spec.tsx.
|
|
6
6
|
//
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
selectDisplayedData,
|
|
17
17
|
} from "../../../src/state/selectors/axisSelectors";
|
|
18
18
|
import { useAppSelector } from "../../../src/state/hooks";
|
|
19
|
-
import { render } from "
|
|
19
|
+
import { render } from "@solidjs/testing-library";
|
|
20
20
|
import { expectXAxisTicks } from "../../helper/expectAxisTicks";
|
|
21
21
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
22
22
|
import type { XAxisSettings } from "../../../src/state/cartesianAxisSlice";
|
|
@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
4
4
|
import { Line, LineChart, XAxis } from "../../src";
|
|
5
5
|
import { PageData } from "../_data";
|
|
6
6
|
import { expectXAxisTicks } from "../helper/expectAxisTicks";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
|
|
9
9
|
describe("XAxis with custom tickFormatter", () => {
|
|
10
10
|
it("should render ticks formatted with tickFormatter", () => {
|
|
@@ -26,7 +26,7 @@ import type { AxisDomain, AxisTick } from "../../../src/util/types";
|
|
|
26
26
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
27
27
|
import { expectYAxisTicks } from "../../helper/expectAxisTicks";
|
|
28
28
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
29
|
-
import { render } from "
|
|
29
|
+
import { render } from "@solidjs/testing-library";
|
|
30
30
|
|
|
31
31
|
type Datum = { name: string; value: number | null };
|
|
32
32
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
5
|
-
import { render } from "
|
|
5
|
+
import { render } from "@solidjs/testing-library";
|
|
6
6
|
|
|
7
7
|
describe("YAxis interval={0} with custom ticks - comprehensive tests", () => {
|
|
8
8
|
const data = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
2
|
import { YAxis, Label, AreaChart, Area } from "../../../src";
|
|
3
|
-
import { render, screen } from "
|
|
3
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
4
4
|
import { PageData } from "../../_data";
|
|
5
5
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ import { getCalculatedYAxisWidth } from "../../../src/util/YAxisUtils";
|
|
|
41
41
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
42
42
|
import { createSelectorTestCase } from "../../helper/createSelectorTestCase";
|
|
43
43
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
44
|
-
import { render, fireEvent } from "
|
|
44
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
45
45
|
|
|
46
46
|
describe("<YAxis />", () => {
|
|
47
47
|
const data = [
|
|
@@ -3,7 +3,7 @@ import type { Mock } from "vitest";
|
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
4
|
import { Bar, BarChart, ComposedChart, Line, LineChart, XAxis, YAxis } from "../../../src";
|
|
5
5
|
import type { CartesianTickContentProps } from "../../../src";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { expectYAxisTicks } from "../../helper/expectAxisTicks";
|
|
8
8
|
import { ExpectAxisDomain } from "../../helper/ExpectAxisDomain";
|
|
9
9
|
import { expectLastCalledWith, expectNthCalledWith } from "../../helper/expectLastCalledWith";
|
|
@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
4
4
|
import { Line, LineChart, YAxis } from "../../../src";
|
|
5
5
|
import { PageData } from "../../_data";
|
|
6
6
|
import { expectYAxisTicks } from "../../helper/expectAxisTicks";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
|
|
9
9
|
describe("YAxis with custom tickFormatter", () => {
|
|
10
10
|
it("should render ticks formatted with tickFormatter", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { getRelativeCoordinate, Line, LineChart, YAxis, type TickItem } from "../../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/YAxis/YAxis.typed.spec.tsx.
|
|
6
6
|
//
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect, vi } from "vitest";
|
|
2
2
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
|
-
import { fireEvent, render } from "
|
|
4
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
5
5
|
import {
|
|
6
6
|
BarChart,
|
|
7
7
|
CartesianGrid,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { Scatter, ScatterChart, ZAxis } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/cartesian/ZAxis.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// unit-test them on the cartesian axes (only PolarAngleAxis tests axisLine=false).
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { Line, LineChart, XAxis, YAxis } from "../../src";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
|
|
8
8
|
const data = [
|
|
9
9
|
{ name: "a", uv: 100 },
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
getTooltip,
|
|
24
24
|
} from "../component/Tooltip/tooltipTestHelpers";
|
|
25
25
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
26
|
-
import { fireEvent, render } from "
|
|
26
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
27
27
|
|
|
28
28
|
function assertChartA11yAttributes(svg: Element): void {
|
|
29
29
|
expect(svg).not.toBeNull();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// 7a23854).
|
|
3
3
|
//
|
|
4
4
|
// Harness deviations: React `render` -> Solid `render(() => <…/>)` + `flush()`;
|
|
5
|
-
// @testing-library/react ->
|
|
5
|
+
// @testing-library/react -> @solidjs/testing-library.
|
|
6
6
|
//
|
|
7
7
|
// The reference spec's PRIMARY assertion in every case is
|
|
8
8
|
// `expect((await axe(container, AXE_OPTIONS)).violations).toEqual([])` (axe-core static a11y
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
exampleTreemapData,
|
|
56
56
|
} from "../_data";
|
|
57
57
|
import { expectScatterPoints } from "../helper/expectScatterPoints";
|
|
58
|
-
import { render } from "
|
|
58
|
+
import { render } from "@solidjs/testing-library";
|
|
59
59
|
|
|
60
60
|
const AXE_OPTIONS = { rules: { "color-contrast": { enabled: false } } } as const;
|
|
61
61
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// fails it via the global guard in test/setup.ts.
|
|
19
19
|
import { beforeEach, describe, expect, it, test, vi } from "vitest";
|
|
20
20
|
import { createEffect, flush } from "solid-js";
|
|
21
|
-
import { render } from "
|
|
21
|
+
import { render } from "@solidjs/testing-library";
|
|
22
22
|
import { AreaChart, Area, XAxis, YAxis } from "../../src";
|
|
23
23
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
24
24
|
import { expectAreaCurve } from "../helper/expectAreaCurve";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// because the bar registers via an effect and its rectangles compute from the store.
|
|
9
9
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
10
10
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
11
|
-
import { render, fireEvent } from "
|
|
11
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
12
12
|
import { BarChart, Bar, ComposedChart, Rectangle, Tooltip, XAxis, YAxis } from "../../src";
|
|
13
13
|
import type { BarChartProps, BarProps, BarRectangleItem } from "../../src";
|
|
14
14
|
import { PageData, boxPlotData } from "../_data";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Bar, BarChart, LineChart, PieChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/BarChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "../../src";
|
|
30
30
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
31
31
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
32
|
-
import { fireEvent, render } from "
|
|
32
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
33
33
|
|
|
34
34
|
type WrapperProps = {
|
|
35
35
|
onClick: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { ComposedChart, Line } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/ComposedChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// so that reference assertion is intentionally omitted.
|
|
13
13
|
import { describe, expect, it, vi } from "vitest";
|
|
14
14
|
import { flush } from "solid-js";
|
|
15
|
-
import { render, fireEvent } from "
|
|
15
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
16
16
|
import { FunnelChart, Funnel, Tooltip, Cell } from "../../src";
|
|
17
17
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
18
18
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Funnel, FunnelChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/FunnelChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// containers → chart composition) mounts and renders correct SVG end-to-end.
|
|
4
4
|
// The comprehensive `chartDimensions.spec` parity port is the next milestone.
|
|
5
5
|
import { describe, it, expect } from "vitest";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { LineChart } from "../../src";
|
|
8
8
|
|
|
9
9
|
describe("LineChart (empty-chart smoke)", () => {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
// call-count spies (render-count coupling).
|
|
25
25
|
import { describe, expect, it, test, vi } from "vitest";
|
|
26
26
|
import { createSignal, flush } from "solid-js";
|
|
27
|
-
import { render, fireEvent } from "
|
|
27
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
28
28
|
import { Brush, CartesianGrid, Legend, Line, LineChart, Tooltip, XAxis, YAxis } from "../../src";
|
|
29
29
|
import type { CurveType } from "../../src/shape/Curve";
|
|
30
30
|
import type { LabelContentType } from "../../src/component/Label";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// hover dispatches through the store before the tooltip portal updates.
|
|
5
5
|
import { describe, expect, it } from "vitest";
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent } from "
|
|
7
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { SunburstChart, Treemap, Sankey, Tooltip } from "../../src";
|
|
9
9
|
|
|
10
10
|
function tipItems(container: Element): Array<string | null> {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "../helper/expectPieSectors";
|
|
24
24
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
25
25
|
import { selectDisplayedData, selectPieLegend } from "../../src/state/selectors/pieSelectors";
|
|
26
|
-
import { render, fireEvent } from "
|
|
26
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
27
27
|
import { PageData } from "../_data";
|
|
28
28
|
|
|
29
29
|
const SECTOR_SELECTOR = ".recharts-pie-sector path.recharts-sector";
|
|
@@ -15,7 +15,7 @@ import { createEffect, createSignal, flush } from "solid-js";
|
|
|
15
15
|
import { describe, expect, it, test, vi } from "vitest";
|
|
16
16
|
import { exampleRadarData } from "../_data";
|
|
17
17
|
import { PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart } from "../../src";
|
|
18
|
-
import { render, fireEvent } from "
|
|
18
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
19
19
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
20
20
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
21
21
|
import { expectLastCalledWithScale } from "../helper/expectScale";
|
|
@@ -25,7 +25,7 @@ import { createEffect, flush } from "solid-js";
|
|
|
25
25
|
import { describe, expect, it, test, vi } from "vitest";
|
|
26
26
|
import { Cell, Legend, RadialBar, RadialBarChart, Sector, Tooltip } from "../../src";
|
|
27
27
|
import type { SectorProps } from "../../src/shape/Sector";
|
|
28
|
-
import { render, fireEvent } from "
|
|
28
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
29
29
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
30
30
|
import { trim } from "../helper/trim";
|
|
31
31
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { RadialBar, RadialBarChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/RadialBarChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Show, createSignal, flush } from "solid-js";
|
|
2
2
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
import { fireEvent, render } from "
|
|
3
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
4
4
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
5
5
|
import { BarChart } from "../../src";
|
|
6
6
|
import { RechartsWrapper } from "../../src/chart/RechartsWrapper";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { flush } from "solid-js";
|
|
5
5
|
import { Sankey } from "../../src";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
|
|
8
8
|
const data = {
|
|
9
9
|
nodes: [{ name: "A" }, { name: "B" }, { name: "C" }, { name: "D" }],
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// before the layout computes.
|
|
5
5
|
import { describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent } from "
|
|
7
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { Sankey, Tooltip, XAxis, YAxis } from "../../src";
|
|
9
9
|
import { computeData, sankeyPayloadSearcher } from "../../src/chart/Sankey";
|
|
10
10
|
import type { SankeyLinkProps, SankeyNodeProps } from "../../src";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import { expectScatterPoints, expectScatterPointsUnordered } from "../helper/expectScatterPoints";
|
|
22
22
|
import { expectXAxisTicks, expectYAxisTicks } from "../helper/expectAxisTicks";
|
|
23
23
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
24
|
-
import { fireEvent, render } from "
|
|
24
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
25
25
|
import { boxPlotData, PageData } from "../_data";
|
|
26
26
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
27
27
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Scatter, ScatterChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/ScatterChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// size is reported via an effect (ReportChartSize) before the arcs compute.
|
|
5
5
|
import { describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createEffect, flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent } from "
|
|
7
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { SunburstChart } from "../../src";
|
|
9
9
|
import type { SunburstData } from "../../src";
|
|
10
10
|
import { useChartHeight, useChartWidth, useViewBox } from "../../src/context/chartLayoutContext";
|
|
@@ -6,7 +6,7 @@ import { describe, expect, it } from "vitest";
|
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
7
|
import { Treemap } from "../../src";
|
|
8
8
|
import { exampleTreemapData } from "../_data";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
|
|
11
11
|
function depthLayers(container: Element): Element[] {
|
|
12
12
|
return Array.from(container.querySelectorAll(".recharts-treemap-depth-1"));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// chart size is reported via an effect before the layout computes.
|
|
5
5
|
import { describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createEffect, flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent, screen } from "
|
|
7
|
+
import { render, fireEvent, screen } from "@solidjs/testing-library";
|
|
8
8
|
import { Tooltip, Treemap, XAxis, YAxis } from "../../src";
|
|
9
9
|
import { getTooltip, showTooltip } from "../component/Tooltip/tooltipTestHelpers";
|
|
10
10
|
import { treemapNodeChartMouseHoverTooltipSelector } from "../component/Tooltip/tooltipMouseHoverSelectors";
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// RechartsWrapper.handleClick now flush()es between dispatchMouseClick and the
|
|
28
28
|
// external-handler dispatch.
|
|
29
29
|
import { describe, it, expect, vi, beforeEach, type Mock } from "vitest";
|
|
30
|
-
import { fireEvent, render } from "
|
|
30
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
31
31
|
import {
|
|
32
32
|
BarChartCase,
|
|
33
33
|
ComposedChartCase,
|