-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
navigate to subgoal with one click and moved goalItem summary #1929
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Excellent!
Can you replace the pipe | with a comma ,?
Also please update the tests (or migrate and update them to Playwright if not much effort).
@tijlleenders, I think for smaller UI checks and functionalities, we can use a unit testing library. Playwright is an E2E testing library, and E2E tests are expensive to run and hard to maintain. So, for complex UI interactions (like the collaboration feature), we can use Playwright. For smaller UI and feature testing, we can rely on unit testing libraries like Jest or Vitest. |
Different tests for different purposes, I agree. Since the app is still very much in flux - any test is extra work that might get invalidated soon. So I only want to do end-to-end testing on major features. For now I don't think investing in unit tests is worth it, unless you do it as part of your TDD flow. So for any test currently failing please explain what it is testing - so we can decide on a case-by-case basis what the appropriate level of the test is - and if we want it at this point in the project. |
@Tushar-4781 @vinaybadgujar102 Do you agree to invest in lower level test sparingly - as the expected rate of change is higher on the internals? |
We currently have 6 failing Cypress tests:
|
@vinaybadgujar102 These are all high-level UI checks - for which I think it is appropriate to use a UI testing framework like Cypress/Playwright - don't you? I have a hard time imagining how you would even do a UI check using a unit testing framework. For me unit testing is a relatively simple test on a specific function or module. |
@tijlleenders, I'm relatively new to testing, but I've learned that basic UI checks can be handled using a unit testing library like Jest. I think @Tushar-4781 might have some valuable insights to add on
The last test ensures that search button is only visible on Goals page and not others. |
@vinaybadgujar102 Just because it can be done doesn't mean it should be done. Let's stick to Playwright for UI testing since we need it for testing collaboration anyway (and get rid of Cypress which is basically an equivalent of Playwright). @Tushar-4781 Agree? |
@tijlleenders, migrated the the failing cypress test to playwright. |
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.
Awesome @vinaybadgujar102 !
@Tushar-4781 Code OK?
src/hooks/useGoalSummary.ts
Outdated
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.
can we just use "?" that would save some LOC(s)
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.
Are you suggesting replacing the if statements?
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.
yup
resolves #1924