Skip to content
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

Merged
merged 8 commits into from
Jun 9, 2024

Conversation

vinaybadgujar102
Copy link
Collaborator

resolves #1924

Copy link

vercel bot commented Jun 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
zinzen ✅ Ready (Inspect) Visit Preview Jun 9, 2024 4:38am

Copy link
Owner

@tijlleenders tijlleenders left a 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).

@vinaybadgujar102
Copy link
Collaborator Author

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.

@tijlleenders
Copy link
Owner

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.

@tijlleenders
Copy link
Owner

@Tushar-4781 @vinaybadgujar102 Do you agree to invest in lower level test sparingly - as the expected rate of change is higher on the internals?

@vinaybadgujar102
Copy link
Collaborator Author

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.

We currently have 6 failing Cypress tests:

  • Goals Page Title: Verifies that the page title is displayed correctly on the Goals Page.
  • Search Input Visibility: Checks if the search input is shown when the search icon is clicked.
  • Settings Dropdown Open: Ensures the settings dropdown opens when the settings icon is clicked.
  • Close Settings Dropdown: Verifies that the settings dropdown closes when clicking outside of it.
  • Dark Mode Toggle: Tests the functionality of toggling dark mode when the Switch Mode button is clicked.
  • Conditional Settings Display: Ensures the Zinzen settings are only displayed on the MyJournal or My Time pages.

@tijlleenders
Copy link
Owner

@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.
No idea what the last test is for though. What is this 'settings display'?

@vinaybadgujar102
Copy link
Collaborator Author

@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

No idea what the last test is for though. What is this 'settings display'?

The last test ensures that search button is only visible on Goals page and not others.

@tijlleenders
Copy link
Owner

@vinaybadgujar102 Just because it can be done doesn't mean it should be done.
Do you have a compelling reason to add another testing framework?

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?

@vinaybadgujar102
Copy link
Collaborator Author

@tijlleenders, migrated the the failing cypress test to playwright.

tijlleenders
tijlleenders previously approved these changes Jun 6, 2024
Copy link
Owner

@tijlleenders tijlleenders left a 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?

Copy link
Collaborator

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)

Copy link
Collaborator Author

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup

@Tushar-4781 Tushar-4781 merged commit 7054132 into main Jun 9, 2024
6 checks passed
@tijlleenders tijlleenders deleted the vin/1924/navigate-one-click branch July 21, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigate with one click
3 participants