-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Update test with .toMatchSnapshot to test UI (#243)
* update test * Use .toEqual for small assertions. Remove arguments from .toMatchSnapshot calls
- Loading branch information
1 parent
6f99b90
commit ba59513
Showing
4 changed files
with
410 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Graph Helper #buildNodeProps when node to build is the highlightedLink target (or source) and highlight degree is 0 should properly build node props () 1`] = ` | ||
Object { | ||
"className": "node", | ||
"color": "green", | ||
"cursor": "pointer", | ||
"cx": 1, | ||
"cy": 2, | ||
"dx": 11.5, | ||
"fill": "green", | ||
"fontColor": "black", | ||
"fontSize": 8, | ||
"fontWeight": "normal", | ||
"highlighted": false, | ||
"id": "id", | ||
"label": "id", | ||
"onClickNode": undefined, | ||
"onMouseOut": undefined, | ||
"onMouseOverNode": undefined, | ||
"onRightClickNode": undefined, | ||
"opacity": undefined, | ||
"overrideGlobalViewGenerator": undefined, | ||
"renderLabel": true, | ||
"size": 200, | ||
"stroke": "none", | ||
"strokeWidth": 1.5, | ||
"svg": "file.svg", | ||
"symbolType": undefined, | ||
"type": "circle", | ||
"viewGenerator": null, | ||
"x": 1, | ||
"y": 2, | ||
} | ||
`; | ||
|
||
exports[`Graph Helper #buildNodeProps when node to build is the highlightedLink target (or source) and highlight degree is bigger then 0 should properly build node props 1`] = ` | ||
Object { | ||
"className": "node", | ||
"color": "green", | ||
"cursor": "pointer", | ||
"cx": 1, | ||
"cy": 2, | ||
"dx": 11.5, | ||
"fill": "green", | ||
"fontColor": "black", | ||
"fontSize": 8, | ||
"fontWeight": "normal", | ||
"highlighted": false, | ||
"id": "id", | ||
"label": "id", | ||
"onClickNode": undefined, | ||
"onMouseOut": undefined, | ||
"onMouseOverNode": undefined, | ||
"onRightClickNode": undefined, | ||
"opacity": undefined, | ||
"overrideGlobalViewGenerator": undefined, | ||
"renderLabel": true, | ||
"size": 200, | ||
"stroke": "none", | ||
"strokeWidth": 1.5, | ||
"svg": "file.svg", | ||
"symbolType": undefined, | ||
"type": "circle", | ||
"viewGenerator": null, | ||
"x": 1, | ||
"y": 2, | ||
} | ||
`; | ||
|
||
exports[`Graph Helper #buildNodeProps when node to build is the highlightedNode should return node props with proper highlight values 1`] = ` | ||
Object { | ||
"className": "node", | ||
"color": "green", | ||
"cursor": "pointer", | ||
"cx": 1, | ||
"cy": 2, | ||
"dx": 15.5, | ||
"fill": "red", | ||
"fontColor": "black", | ||
"fontSize": 12, | ||
"fontWeight": "bold", | ||
"highlighted": true, | ||
"id": "id", | ||
"label": "id", | ||
"onClickNode": undefined, | ||
"onMouseOut": undefined, | ||
"onMouseOverNode": undefined, | ||
"onRightClickNode": undefined, | ||
"opacity": 1, | ||
"overrideGlobalViewGenerator": undefined, | ||
"renderLabel": true, | ||
"size": 200, | ||
"stroke": "yellow", | ||
"strokeWidth": 2, | ||
"svg": "file.svg", | ||
"symbolType": undefined, | ||
"type": "circle", | ||
"viewGenerator": null, | ||
"x": 1, | ||
"y": 2, | ||
} | ||
`; |
Oops, something went wrong.