-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Cypress initial cleanup pass #16189
Cypress initial cleanup pass #16189
Conversation
5ee3629
to
354afd4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the expectation that, assuming no disabled UI, localhost:8000
is available and with a disabled UI & npm start
, localhost:3000
is used?
Does docker-compose stop webapp
need to be run after the OSS backend has been spun up?
Yes to both. As a result of this comment, I dug a little deeper, and will rewrite this a bit; some things that I phrased as options are actually required. The TL;DR is that you must use Background info: unless given a fully-qualified url, Cypress uses a |
Cypress doesn't actually know or care anything about the backend--but if the UI can't reach any server, everything fails. You can actually run cypress against a cloud backend, given a reliable network connection, but the tests contain a bunch of implicit assumptions that they're interacting with an OSS build, so again, lots of failures. As for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nicely documented! 👍
6a800c1
to
dcd7543
Compare
* Update README with instructions * Prevent test failures from intentionally-thrown errors * Rephrase cypress open instructions in README * Add CI repro documentation
I found running the cypress test suite to be pretty confusing and not well-documented; and when I got that working, I noticed that
base.spec.ts
was always failing due to uncaught (but intentionally-triggered) errors in the application's js runtime. That can be straightforwardly fixed with a spec-local handler for theuncaught:exception
event (there are ways to register a global event handler for uncaught exceptions, but generally we want errors to fail tests).This is only a very quick initial pass at improving the developer experience for our Cypress tests. Here are a few follow-up tasks I'd like to tackle soon:
prettier
command to reformat all test typescript files according to our conventions. I think this should wait until @SofiiaZaitseva has finished and merged 15700 add tests for PokeAPI #15701, to avoid creating a huge pile of merge conflicts for that PR; it should also be an isolated PR, because the file diffs from automated reformatting will be long and noisy, and would make any changes to the code's behavior unnecessarily hard to review.I'd also like to create some custom cypress commands to give ourselves a streamlined, easy-to-use API for airbyte-specific logic and DOM interactions, but that's a less discrete/well-scoped task.