-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
chore: add cypress #27
chore: add cypress #27
Conversation
Update Local
- initial setup, current test assert true is true - next step is creating mock data for fields and utilizing the inputs
…into feature/cypress
- Added data-cyp on suggested query in component QueryAdvise - Added comments to seed file (current unused mostly) - Added two tests for smoke testing app main functionality
Nice! Can you let me know if/when this is ready for review? I'm not sure, because I've noticed that there are a bunch of fixtures committed, that we don't seem to use. |
Yeah, that stuff is auto-generated by cypress, I tried removing it but it seems if to replace it if there isn't something there. |
Deleting is possible, but requires you to add an empty config file. Just create an edit And now I see you already have a config file, in another project of mine, that was the fix. 😕 |
Yeah, but I will end up using fixtures soon anyways, this was mostly an initial setup with a smoke test. |
- Utilized fixture for constant HTML - Refactored utilizing fixture
- Currently tests rewrite of a demo HTML and then clicks on HTML preview for working button
@smeijer Updates:
|
Thanks 👍 Just wanted to let you know that I've seen it. I need a bit more time for a good check though. I'll come back to this. |
I will have to resolve recent conflicts or someone else can, I am good either way. I won't be able to get to it tonight most likely. |
- Updates to ESlint merged - Updates to package.json merged - Change in lock incoming change added with current
@smeijer I resolved the conflicts 😄 |
- Tests cover functionality of query options - Clearing and user input of the code fields - Clicking on the HTML previews - Validating the query option selections change the descriptive content
…shouldnt change often
Awesome! Thanks. I'll try to take a look at it this weekend. |
cypress.json
Outdated
@@ -0,0 +1,5 @@ | |||
{ | |||
"baseUrl": "http://localhost:1234", |
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.
I think you need to run prettier
again here 🤔
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.
Isn't the husky hook running the linting and prettier application wide?
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.
I checked it is not running on Husky hooks and apparently the root files are being ignored by Husky.
I can definitely work on that next! 😄 |
I was definitely waist-deep in Cypress docs and totally forgot about Testing Libs Cypress Library! lmao duh! Thanks for the reminder and suggestion. |
@smeijer Would you like that implemented in this PR before it goes in or as a next milestone for the Cypress integration? |
I would prefer to have it in this PR, before we merge. The codebase is moving quite fast, as the first thing I've shipped was more of a prototype level, than a production-grade thing. Because of that, a lot of things are changing. ClassNames is one of those things. If we would merge this pull-request in it's current state, I'm sure tests will break all the time. And then it would slow us down, instead of giving assurance that everything still works as it should be. |
Sorry about the absence, I had to take a break from coding outside of work. I will get back to this soon. |
Sure. I completely understand. 😊 Take your time. |
Any wise words on what to do with this PR? I would love to have some e2e tests, but I have no Idea how much work it would be to bring this PR to a workable state. |
@smeijer I figured I'd take a stab at this as a part of learning more about testing JavaScript, and the markup -- specifically the implementation of Acknowledging that I'm a complete novice, attempting something even as simple as selecting the editor to clear it out and type something as a user would may be impossible without brittle selectors or acrobatics like grabbing parents of parents. I even went so far as trying to use Testing Playground on Testing Playground to identify good selectors without much luck. 😂 Someone with a bunch more Cypress/Testing Library experience can probably find an elegant solution, but I couldn't even really get started without considering class selectors or thinking about injecting a bunch of I hope that perspective helps as this moves forward! |
If using testIds or classNames is the only thing that can make this work (easily), then we should do that. Does that mean that this branch works when we rebase it? We currently don't have many tests, so I'm eager to get this one merged. |
How would you feel about having actual |
I think as long as it's utilizing the https://testing-library.com/docs/cypress-testing-library/intro/ and following the accessibility priority, then IDs necessity should be minimized. I never got around to that, unfortunately. |
Oh, sorry, I was referring specifically to the HTML |
|
@JacobMGEvans do you plan on rebasing with your changes? If not, I can take a stab at it. |
This PR is very old, so I think that is better to start a new PR and copy what @JacobMGEvans has done here in the new one ? What do you think guys? |
That's what a rebase does 😊. I'm fine with any solution. I think it's still good to have some tests. So any progress in this area would be awesome. |
You can use this branch if you like or create your own from scratch. I had a lot of the setup done which was most of the pain. I think I needed to add https://testing-library.com/docs/cypress-testing-library/intro/ (CTL) The current tests were mostly smoke tests, just needed that CTL, however, if you DO do it from scratch keep this in mind because it was a big hurdle with the |
I'll try to update the PR with upstream main, RN |
The conflicting files doesn't seem to be much. Does it make sense to resolve the conflict, merge, and improve in a new PR? |
Well, that is odd... The branch and work have disappeared. I know I didn't delete it. |
I will figure this out later. |
@JacobMGEvans, can it be because origin has changed in the mean time? It moved from |
Very possible 😅 ! The repo was originally forked from that old one. I don't know what the effects would normally be but explains the "unknown repository." I also rebased already and the work might have been |
Superseded by #313 (comment). Again, I'm very sorry that I haven't merged this sooner. |
5/24/20
5/25/20
5/29/20
dda125b
72eac23
960a767