Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract browserify code / abstract build pipeline #580

Closed
chrisbreiding opened this issue Aug 3, 2017 · 3 comments
Closed

Extract browserify code / abstract build pipeline #580

chrisbreiding opened this issue Aug 3, 2017 · 3 comments
Assignees
Labels
type: enhancement Requested enhancement of existing feature
Milestone

Comments

@chrisbreiding
Copy link
Contributor

chrisbreiding commented Aug 3, 2017

Create an extension API for hooking into the pipeline when preprocessing spec files.

@chrisbreiding chrisbreiding self-assigned this Aug 3, 2017
@chrisbreiding chrisbreiding added the type: enhancement Requested enhancement of existing feature label Aug 3, 2017
@reintroducing
Copy link

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.

@brian-mann
Copy link
Member

brian-mann commented Nov 20, 2017

Fixed by #888.

@brian-mann
Copy link
Member

Fixed in 1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants