Skip to content

Commit 1b504f1

Browse files
committed
Updated tests and snapshots
1 parent 4f2f5d6 commit 1b504f1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/ui/widgets/Line/__snapshots__/line.test.tsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ exports[`<LineComponent /> > matches snapshot 1`] = `
88
xmlns="http://www.w3.org/2000/svg"
99
>
1010
<polyline
11-
fill="none"
1211
overflow="visible"
1312
points="2,20 6,30 15,4 "
1413
stroke="rgba(0,255,255,255)"

src/ui/widgets/Line/line.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe("<LineComponent />", (): void => {
8383

8484
const lines = svg.children as Array<ReactTestRendererJSON>;
8585

86-
expect(lines[0].props.stroke).toEqual("rgba(0,0,0,0)");
86+
expect(lines[0].props.stroke).toEqual("transparent");
8787
expect(lines[0].props.strokeWidth).toEqual(15);
8888
expect(lines[0].props.transform).toEqual("rotation(45,0,0)");
8989
expect(lines[0].props.points).toEqual("16,4 25,10 4,15 ");
@@ -117,8 +117,8 @@ describe("<LineComponent />", (): void => {
117117
const marker = lines[0].children as Array<ReactTestRendererJSON>;
118118

119119
// Check arrowhead definitions were created
120-
expect(marker[0].props.markerWidth).toEqual("2");
121-
expect(marker[0].props.markerHeight).toEqual("2");
120+
expect(marker[0].props.markerWidth).toEqual(2);
121+
expect(marker[0].props.markerHeight).toEqual(1);
122122
expect(marker[0].props.orient).toEqual("auto-start-reverse");
123123
expect(marker[0].props.markerUnits).toEqual("userSpaceOnUse");
124124

@@ -155,13 +155,13 @@ describe("<LineComponent />", (): void => {
155155
const marker = lines[0].children as Array<ReactTestRendererJSON>;
156156

157157
// Check arrowhead definitions were created
158-
expect(marker[0].props.markerWidth).toEqual("1");
159-
expect(marker[0].props.markerHeight).toEqual("1");
158+
expect(marker[0].props.markerWidth).toEqual(2);
159+
expect(marker[0].props.markerHeight).toEqual(1);
160160
expect(marker[0].props.orient).toEqual("auto-start-reverse");
161-
expect(marker[0].props.markerUnits).toEqual("strokeWidth");
161+
expect(marker[0].props.markerUnits).toEqual("userSpaceOnUse");
162162

163163
expect(lines[1].props).toHaveProperty("markerStart");
164-
expect(lines[1].props.stroke).toEqual("rgba(0,0,0,0)");
164+
expect(lines[1].props.stroke).toEqual("transparent");
165165
expect(lines[1].props.points).toEqual("40,10 40,20 20,20 ");
166166
});
167167

0 commit comments

Comments
 (0)