reactvt / react-vt Goto Github PK
View Code? Open in Web Editor NEWData-driven visual testing library for React developers
Home Page: http://reactvt.io
License: MIT License
Data-driven visual testing library for React developers
Home Page: http://reactvt.io
License: MIT License
I'm interested in possibilities for integration with Storybook, mainly because the latter helps to easily isolate just one component or tree of components from the larger app / routing / page context, so creating tests at that level would avoid most of the broader difficulties of putting this tool in place in an app that otherwise has a significant number of complicating factors like routing, relay, etc at the top level.
How possible would that be? Could each component tree rendered in a story() potentially be wrapped with react-vt and still have the Chrome extensions discover / operate on that segment?
I'm currently testing it with Next.js and it won't work. It gets stuck at the Waiting for data loading screen. Code is very generic.
import React, { Component } from 'react';
import reactVT from 'react-vt';
export default class Test extends Component {
componentWillUpdate() {
reactVT( React, this )
}
render() {
return (
<h1>Helo</h1>
)
}
}
currently when I run it with 16, I get the two typeErrors:
dom-parse.js:7 Uncaught (in promise) TypeError: Cannot read property 'router' of undefined
at parser (dom-parse.js:7)
at Promise (inject.js:69)
at new Promise (<anonymous>)
at throttle (inject.js:61)
at setTimeout (inject.js:42)
parser @ dom-parse.js:7
Promise @ inject.js:69
throttle @ inject.js:61
setTimeout @ inject.js:42
Promise rejected (async)
setTimeout @ inject.js:43
setTimeout (async)
startTraverse @ inject.js:41
injector @ inject.js:11
_callee2$ @ EventDetail.js:38
tryCatch @ runtime.js:65
invoke @ runtime.js:303
prototype.(anonymous function) @ runtime.js:117
step @ EventDetail.js:21
(anonymous) @ EventDetail.js:21
(anonymous) @ EventDetail.js:21
componentWillMount @ EventDetail.js:41
(anonymous) @ index.js:524
callComponentWillMount @ react-dom.development.js:9789
mountClassInstance @ react-dom.development.js:9846
updateClassComponent @ react-dom.development.js:10228
beginWork @ react-dom.development.js:10612
performUnitOfWork @ react-dom.development.js:12581
workLoop @ react-dom.development.js:12690
callCallback @ react-dom.development.js:1309
e._wrapped @ main.js?_=1505482008287:1
invokeGuardedCallbackDev @ react-dom.development.js:1348
invokeGuardedCallback @ react-dom.development.js:1205
performWork @ react-dom.development.js:12808
scheduleUpdateImpl @ react-dom.development.js:13193
scheduleUpdate @ react-dom.development.js:13132
scheduleTopLevelUpdate @ react-dom.development.js:13417
updateContainer @ react-dom.development.js:13447
(anonymous) @ react-dom.development.js:17137
unbatchedUpdates @ react-dom.development.js:13274
renderSubtreeIntoContainer @ react-dom.development.js:17136
render @ react-dom.development.js:17151
controller.class_1.render @ index.js:51
./node_modules/ngcomponent/index.js.NgComponent.$onChanges @ index.js:25
(anonymous) @ angular.js:9502
forEach @ angular.js:333
nodeLinkFn @ angular.js:9498
compositeLinkFn @ angular.js:8810
publicLinkFn @ angular.js:8690
link @ angular-route.js:1065
(anonymous) @ angular.js:1259
invokeLinkFn @ angular.js:10152
nodeLinkFn @ angular.js:9551
compositeLinkFn @ angular.js:8810
publicLinkFn @ angular.js:8690
lazyCompilation @ angular.js:9047
boundTranscludeFn @ angular.js:8827
controllersBoundTransclude @ angular.js:9601
update @ angular-route.js:1014
$broadcast @ angular.js:18320
(anonymous) @ angular-route.js:653
processQueue @ angular.js:16696
(anonymous) @ angular.js:16712
$eval @ angular.js:17994
$digest @ angular.js:17808
$apply @ angular.js:18102
(anonymous) @ angular.js:13946
dispatch @ jquery.js:4737
elemData.handle @ jquery.js:4549
dom-parse.js:7 Uncaught TypeError: Cannot read property 'router' of undefined
at parser (dom-parse.js:7)
at setTimeout (inject.js:66)
Any plan on adding React Router compatibility any time soon?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.