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

NoMongo: migrate the file test/graphql/types/Mutation/updateAgendaItem.test.ts to integration test #3269

Open
Piyushk8 opened this issue Feb 21, 2025 · 5 comments
Assignees
Labels
bug Something isn't working security Security fix unapproved Unapproved for Pull Request

Comments

@Piyushk8
Copy link

Piyushk8 commented Feb 21, 2025

Describe the bug

The updateAgendaItem GraphQL mutation (in test/graphql/types/Mutation/updateAgendaItem.test.ts) uses mocked tests, contradicting the project's requirement for integration testing via real API calls for all mutations in that directory. These mutation files are also incorrectly located; they belong in test/routes/Graphql/Mutation/*.

Expected Behavior

All GraphQL mutations, including updateAgendaItem, should be thoroughly integration tested using actual API calls. Mutation test files should reside in test/routes/Graphql/Mutation/*.

Actual Behavior

updateAgendaItem.test.ts uses mocked tests, bypassing the real API and services. The file is in the wrong directory.

Impact

Mocked tests provide a false sense of security, risking undetected bugs and regressions. Inconsistent testing hinders maintainability.

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

@Piyushk8 Piyushk8 added the bug Something isn't working label Feb 21, 2025
@github-actions github-actions bot added security Security fix unapproved Unapproved for Pull Request labels Feb 21, 2025
@Piyushk8
Copy link
Author

Piyushk8 commented Feb 21, 2025

@palisadoes regarding our recent discussion https://palisadoes-foundation.slack.com/archives/CSWH4PN0M/p1740031948437209 all these files in mentioned directory needs to relocated and tested accordingly

4-5 files have this issue

  • test/graphql/types/Mutation/*
  • test/routes/graphql/Mutation/deleteChatMessage
  • test/routes/graphql/Mutation/updateChatMessage
  • test/routes/graphql//Mutation/deletePost

@Piyushk8 Piyushk8 changed the title NoMongo: migrate the file src/graphql/types/Mutation/updateAgendaItem to integration test NoMongo: migrate the file test/graphql/types/Mutation/updateAgendaItem.test.ts to integration test Feb 21, 2025
@palisadoes
Copy link
Contributor

Please create issues for each set.

@iamanishx
Copy link

iamanishx commented Feb 22, 2025

@Piyushk8 are you making the issues ?
or i will make it !!!

@Piyushk8
Copy link
Author

Piyushk8 commented Feb 22, 2025

@Piyushk8 are you making the issues ? or i will make it !!!

No worries , I'll make it. (I'm on it already actually)

@im-vedant
Copy link

@palisadoes assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security Security fix unapproved Unapproved for Pull Request
Projects
Status: Backlog
Development

No branches or pull requests

4 participants