You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There essentially no logic in UserCardComponent, so it's not obvious what or how to test it.
We used to have a test that mocked a whole bunch of stuff and then confirmed that it "built" OK, but nothing else.
I removed that because I thought it was a lot of complicated code with little to no payoff. It turns out that because it's used in other, tested components, the test coverage is still fine with these tests removed, but that testing is obviously "indirect" in nature.
@floogulinchas made a reasonable argument that we should at least test that the component builds and initializes properly, but I didn't really have time to figure out what that would look like in this lab, so I left it so that it's only tested indirectly.
Maybe the "real" solution is to give UserCardComponent some work to do? We don't want to add "fluff" functionality just to make testing make sense, but there might be reasonable functionality that we could add?
The text was updated successfully, but these errors were encountered:
An e2e test that checks basically anything would test that it's there. Note (partially to myself): We won't ever have to write .should('exist')https://docs.cypress.io/guides/core-concepts/introduction-to-cypress#Default-Assertions in our Cypress tests. There are several commits on the user-card.component.spec.ts that add, adjust, or remove the testing. I am fairly satisfied with the single test that is here and shows it was created.
It looks like the way to do this is to have a test container component, and then you can at least test that the @Inputs are working. I included links to various things that would be helpful in a companion issue on the iteration template.
There essentially no logic in
UserCardComponent
, so it's not obvious what or how to test it.We used to have a test that mocked a whole bunch of stuff and then confirmed that it "built" OK, but nothing else.
I removed that because I thought it was a lot of complicated code with little to no payoff. It turns out that because it's used in other, tested components, the test coverage is still fine with these tests removed, but that testing is obviously "indirect" in nature.
@floogulinc has made a reasonable argument that we should at least test that the component builds and initializes properly, but I didn't really have time to figure out what that would look like in this lab, so I left it so that it's only tested indirectly.
Maybe the "real" solution is to give
UserCardComponent
some work to do? We don't want to add "fluff" functionality just to make testing make sense, but there might be reasonable functionality that we could add?The text was updated successfully, but these errors were encountered: