chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:22:52 +08:00
commit 9d4c7d16ba
528 changed files with 740585 additions and 0 deletions
@@ -0,0 +1,136 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`AdditiveForceVisualizer renders correctly 1`] = `
<div>
<svg
style="user-select: none; display: block; font-family: arial;"
>
<style>
.force-bar-axis path {
fill: none;
opacity: 0.4;
}
.force-bar-axis paths {
display: none;
}
.tick line {
stroke: #000;
stroke-width: 1px;
opacity: 0.4;
}
.tick text {
fill: #000;
opacity: 0.5;
font-size: 12px;
padding: 0px;
}
</style>
<g>
<g
class="force-bar-axis"
transform="translate(0,35)"
/>
</g>
<g />
<text />
<line />
<text />
<text />
<text />
<text />
<text />
<text />
<text />
<text
fill="#fff"
font-size="12"
stroke="#fff"
stroke-linejoin="round"
stroke-width="4"
text-anchor="middle"
x="10"
y="20"
/>
<text
fill="#0f0"
font-size="12"
text-anchor="middle"
x="10"
y="20"
/>
<lineargradient
id="linear-grad-0"
x1="0%"
x2="0%"
y1="0%"
y2="100%"
>
<stop
offset="0%"
stop-color="rgb(255, 13, 87)"
stop-opacity="0.6"
/>
<stop
offset="100%"
stop-color="rgb(255, 13, 87)"
stop-opacity="0"
/>
</lineargradient>
<lineargradient
id="linear-backgrad-0"
x1="0%"
x2="0%"
y1="0%"
y2="100%"
>
<stop
offset="0%"
stop-color="rgb(255, 13, 87)"
stop-opacity="0.5"
/>
<stop
offset="100%"
stop-color="rgb(255, 13, 87)"
stop-opacity="0"
/>
</lineargradient>
<lineargradient
id="linear-grad-1"
x1="0%"
x2="0%"
y1="0%"
y2="100%"
>
<stop
offset="0%"
stop-color="rgb(30, 136, 229)"
stop-opacity="0.6"
/>
<stop
offset="100%"
stop-color="rgb(30, 136, 229)"
stop-opacity="0"
/>
</lineargradient>
<lineargradient
id="linear-backgrad-1"
x1="0%"
x2="0%"
y1="0%"
y2="100%"
>
<stop
offset="0%"
stop-color="rgb(30, 136, 229)"
stop-opacity="0.5"
/>
<stop
offset="100%"
stop-color="rgb(30, 136, 229)"
stop-opacity="0"
/>
</lineargradient>
</svg>
</div>
`;
+31
View File
@@ -0,0 +1,31 @@
import { render, screen } from '@testing-library/react';
import { AdditiveForceVisualizer } from "../visualizers";
import React from 'react';
describe('AdditiveForceVisualizer', () => {
it('renders correctly', () => {
// Render the component
const { container } = render(
<AdditiveForceVisualizer
baseValue={0.0}
link={"identity"}
featureNames={{
"0": "Blue",
"1": "Red",
"2": "Green",
"3": "Orange"
}}
outNames={["color rating"]}
features={{
"0": { value: 1.0, effect: 1.0 },
"1": { value: 0.0, effect: 0.5 },
"2": { value: 2.0, effect: -2.5 },
"3": { value: 2.0, effect: -0.5 }
}}
/>
);
// Compare with snapshot
expect(container).toMatchSnapshot();
});
});