Skip to content

test(Tasks): Add Recur, Priority, and Reports toggle tests#436

Open
ShivaGupta-14 wants to merge 1 commit intoCCExtractor:mainfrom
ShivaGupta-14:test/300-tasks-recur-priority-reports
Open

test(Tasks): Add Recur, Priority, and Reports toggle tests#436
ShivaGupta-14 wants to merge 1 commit intoCCExtractor:mainfrom
ShivaGupta-14:test/300-tasks-recur-priority-reports

Conversation

@ShivaGupta-14
Copy link
Contributor

Description

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Additional Notes

Before:

Screenshot 2026-01-22 at 1 33 20 AM

After:

Screenshot 2026-01-24 at 5 52 43 PM

@github-actions
Copy link

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

- Add feature-specific tests for editing flows
- Move data-testid from SelectTrigger to Select for testability
- Update Select mock to support dynamic test-ids
- Add ResizeObserver mock
@ShivaGupta-14 ShivaGupta-14 force-pushed the test/300-tasks-recur-priority-reports branch from 63ea37c to e78b544 Compare January 24, 2026 13:06
Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a comment

Choose a reason for hiding this comment

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

Moreover I'd suggest creating separate PRs for Recur, Priority, Reports toggle. And so on. Most tests new or old end up being flaky so we need a better way to sort these out.

Better yet just create a new file for those tests if they are new, for ex:
Tasks.editing.test.tsx
Tasks.priority.test.tsx and similar.

Else if the suite already exists, and need to update anything, do so in the same file. Will break this down later


test('shows error toast when priority save fails', async () => {
const { toast } = require('react-toastify');
const hooks = require('../hooks');
Copy link
Collaborator

Choose a reason for hiding this comment

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

imo just move this to the top, its being reused a lot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, i will

Select: ({ children, onValueChange, value, ...props }: any) => {
return (
<select
data-testid="project-select"
Copy link
Collaborator

Choose a reason for hiding this comment

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

these data-testid related changes are not really desired.
should be reverted

Copy link
Collaborator

Choose a reason for hiding this comment

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

please revert these as those spreaded props are kind of vague, and make it hard to read

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, i will do that, could you please confirm the structure mentioned above?(for new tests)

@its-me-abhishek
Copy link
Collaborator

Moreover got conflicts due to recent merge, needs to be fixed

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.

2 participants