Skip to content

Conversation

@andreichirila0712
Copy link
Contributor

Summary

Introduces support for the `Remove String Approvals` endpoint and refactors `deleteStringTranslations` method and its corresponding test for better parameter handling.

Changes

  • Added new method to support the Remove String Approvals endpoint.
  • Updated the newly added method (removeStringApprovals) and the existing one (deleteStringTranslations) to fix request type and parameters requirements.
  • Changed HTTP method from GET to DELETE for deletion operations.
  • Used Optional.of() in case of required parameters in order to match documentation.

Testing

  • Added removeStringApprovalsTest and refactored deleteTranslationsTest to ensure correct functionality.
  • Updated the request mock builders for the DELETE operations to include query parameters.
  • All tests pass successfully.

Additional notes

  • The reasoning behind Optional.of() is that on the documentation the stringId parameter is marked as required, so it cannot be null.
  • Corresponding request mock builders used another method from RequestMock.java, the one that takes into account the query params.
  • Any feedback regarding the implementation would be much appreciated!

”Andrei” added 3 commits January 28, 2025 15:54
* Implemented DELETE method for removing string approvals.
* Added test to validate the new endpoint's functionality.
* Updated removeStringApprovals implementation to improve handling of required parameters.
* Updated deleteStringTranslations implementation to improve handling of optional parameters.
* Added request mocking and a unit test for removeStringApprovals in StringTranslationsApiTest.
* Adjusted the corresponding test for deleteStringTranslations to match the new implementation.
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.14%. Comparing base (aa2ac4a) to head (d65f2c4).
Report is 19 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #310      +/-   ##
============================================
+ Coverage     94.13%   94.14%   +0.01%     
- Complexity      809      810       +1     
============================================
  Files           190      190              
  Lines          2725     2729       +4     
  Branches         54       54              
============================================
+ Hits           2565     2569       +4     
  Misses          134      134              
  Partials         26       26              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrii-bodnar andrii-bodnar linked an issue Jan 29, 2025 that may be closed by this pull request
Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@andreichirila0712 thank you!

@andrii-bodnar andrii-bodnar merged commit 5ab9f0c into crowdin:master Jan 29, 2025
2 checks passed
@andreichirila0712 andreichirila0712 deleted the feature/275-string-approvals-endpoint branch December 8, 2025 09:24
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.

Support new 'Remove String Approvals' API endpoint

3 participants