-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat(commands): use waitForElement; add jest & cypress tests #2
feat(commands): use waitForElement; add jest & cypress tests #2
Conversation
@kentcdodds I apologize for this one huge commit but I wanted to make it all real, fast (in a few hours). - change commands to use `waitForElement` from `dom-testing-library` (updated to latest) - update `kcd-scripts` dependency to latest - add jest tests for basic smoke check on the exports - add cypress tests for functionality check of the commands - add npm scripts that run the tests in both development and CI environments (somewhat convoluted because cypress hasn't got enough hooks to spin up the fixture server from JavaScript; I didn't want to write a Node app so I used `serve` which needs to be killed after cypress exits but regardless of its exit code, so I used `npm-run-all` and `fkill-cli` and a combination of npm scripts with parallel/sequential execution)
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.
This is fantastic! Now let's see if the changes I made in the github online editor actually worked 😅
@@ -0,0 +1,2 @@ | |||
// Keeping this file here, otherwise it gets recreated by Cypress on each run. |
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.
Yes, this is super annoying...
Rats. I'll work out what's going on and get this merged and released soon! |
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.
That was easy. It should work now 👍
🎉 This PR is included in version 1.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Yay! 🎆🔥🎉 Hopefully address #3 soon. |
Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the |
@kentcdodds I apologize for this one huge commit but I wanted to make
it all real, fast (in a few hours).
waitForElement
fromdom-testing-library
(updated to latest)
kcd-scripts
dependency to latestenvironments (somewhat convoluted because cypress hasn't got enough
hooks to spin up the fixture server from JavaScript; I didn't want to
write a Node app so I used
serve
which needs to be killed aftercypress exits but regardless of its exit code, so I used
npm-run-all
and
fkill-cli
and a combination of npm scripts withparallel/sequential execution)