but clicking (as a user) on the disabled button do...
# component-testing
g
but clicking (as a user) on the disabled button does nothing, like the no event handler fires. If it does, then the browser is broken ...
l
to that end, the guy training me reminded me to think of our tests as testing our component props, not that HTML actually works. Which is what you're saying I believe.
Disabled Button Click
g
Ughh, maybe.
l
"Ughh"? Have I touched on something?
Also if you think I should roll through some tutorials more or read some more of your blogs I'm more than happy to. Feel free to send me links. I see you have a course available. Is it component testing specific? Or a good way to grasp the foundations of Cypress? You seem like the component guru.
g
Search https://cypress.tips/search for "Component", there are blog posts, and videos. I don't have a course for component testing, since it will change in Cypress v10 so I am waiting for that to be released, but my free open source workshop which I usually charge a lot (https://cypress.tips/workshops) is open source and has everything https://github.com/bahmutov/cypress-workshop-basics If you want to get hands-on Cypress E2E experience (which 100% applies to the component tests) then my course is a good time and money investment https://cypress.tips/courses
But basically, it is the opposite - you mount your component but then interact with it via public api (dom, storage, network) and not like a component. Props etc are implementation details, yeah it is nice that you can pass them, but after that a component becomes a full mini web application
l
This is all super helpful. I really appreciate your time!
5 Views