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

feat(commands): use waitForElement; add jest & cypress tests #2

Merged

Conversation

sompylasar
Copy link
Collaborator

@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)

sompylasar and others added 6 commits April 10, 2018 01:59
@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)
Copy link
Member

@kentcdodds kentcdodds left a 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.
Copy link
Member

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...

@kentcdodds
Copy link
Member

Rats. I'll work out what's going on and get this merged and released soon!

Copy link
Member

@kentcdodds kentcdodds left a 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 👍

@kentcdodds kentcdodds merged commit ef22f87 into testing-library:master Apr 10, 2018
@kentcdodds
Copy link
Member

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sompylasar
Copy link
Collaborator Author

Yay! 🎆🔥🎉

Hopefully address #3 soon.

@kentcdodds
Copy link
Member

Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the other/MAINTAINING.md and CONTRIBUTING.md files (specifically the bit about the commit messages and the git hooks) and familiarize yourself with the code of conduct (we're using the contributor covenant). You might also want to watch the repo to be notified when someone files an issue/PR. Please continue to make PRs as you feel the need (you can make your branches directly on the repo rather than your fork if you want). Thanks! And welcome to the team :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants