You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @chrisbreiding,
We (SpotHero) just spoke to @RandallKent and @bahmutov on Zoom and were encouraged to write some use cases for us here. Our use cases for Cypress testing are 1) Selenium-like run through the page and test a flow and 2) develop/test UI components in a silo. The second case is what I'd like to quickly run through.
Our components are written in ES7 and the way I saw this working was that I can run our Webpack build to open up an index.html file with a blank container div, and in our Cypress test I can write an App component which will set up the test (in this case, lets say its a Modal component that we are testing). To be able to test the Modal, we need a button on the page that opens it, which in turns changes some state (let's just say isOpen indicating if the modal is currently open or not). In the render method, if isOpen then the modal gets rendered/animated into view. All of this code, including the test itself as well as the underlying actual Modal component, are written in ES7.
The hope is that a developer can write tests and continue developing extra features on Modal all in this Cypress test, meaning if they change Modal.jsx, and subsequently the tests were to break, you'd get instant feedback from Cypress that your changes just broke the Modal functionality. This whole component library has its own .babelrc file and its own set of plugins, and we'd like to make sure that those are taken into account when writing our tests and modifying the components. As of right now, the test errors because it cannot read ES7 code which as I understand it, is currently hard coded into Cypress.
I'm hoping all of that made sense, but if anything is unclear, please let me know and I'll try my best to clarify.
Create an extension API for hooking into the pipeline when preprocessing spec files.
The text was updated successfully, but these errors were encountered: