https://cypress.io logo
#component-testing
Title
# component-testing
g

gray-kilobyte-89541

05/04/2022, 10:53 PM
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

little-france-10142

05/05/2022, 2:23 PM
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

gray-kilobyte-89541

05/05/2022, 4:13 PM
Ughh, maybe.
l

little-france-10142

05/05/2022, 4:16 PM
"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

gray-kilobyte-89541

05/05/2022, 4:22 PM
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

little-france-10142

05/05/2022, 7:38 PM
This is all super helpful. I really appreciate your time!
5 Views