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

Explore using Cypress #17793

Closed
newmuis opened this issue Aug 30, 2018 · 5 comments
Closed

Explore using Cypress #17793

newmuis opened this issue Aug 30, 2018 · 5 comments

Comments

@newmuis
Copy link
Contributor

newmuis commented Aug 30, 2018

Cypress seems like it would provide a lot of awesome integration testing support that we could benefit from in amp-story (and I'm sure others may as well). Can we explore this and see whether it's feasible and/or desirable to use for AMP?

/cc @danielrozenberg @gmajoulet

@rsimha
Copy link
Contributor

rsimha commented Nov 19, 2018

This investigation can be done as a part of what @esthkim will be working on.

@rsimha rsimha assigned estherkim and unassigned rsimha Nov 19, 2018
@newmuis
Copy link
Contributor Author

newmuis commented Nov 19, 2018

How would this fit in with the interactive visual diff testing that @danielrozenberg added in #19114?

@estherkim
Copy link
Collaborator

I looked briefly into Cypress and saw how it could be really helpful for e2e tests (faster runs, easier to write tests, interactive debugging, etc). The only downside that I could find is that it only works with Chrome, with cross browser support coming later - cypress-io/cypress#310

I'll try to add a small Cypress test in in our Travis builds and see what happens!

@estherkim
Copy link
Collaborator

Hey Jon, here's what I found when trying out Cypress:

  • I was unable to navigate to any test page, whether on localhost or external, using Chrome 71. Came across others having similar issues here and also here. Unfortunately, it pretty much blocked me from testing any further.
  • Cypress can't talk to x-origin iframes, which is a use case for amp-analytics, not sure for amp-story. The workaround is to use window.postMessage(), which is fine, but for e2e testing we want all interactions on the page to be done from the user's perspective rather than inside the codebase.

If it helps, we'll be implementing e2e testing with Selenium soon! Stay tuned.

@newmuis
Copy link
Contributor Author

newmuis commented Jan 23, 2019

Selenium testing sounds like it can work too! We just want some way to write e2e tests for stories 😄

@newmuis newmuis closed this as completed Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants