feat: Add "detail" parameter to CanvasesCreateResponse & CanvasesEditResponse#1570
Conversation
feat: Add "title" parameter to CanvasesCreateResponse
Added tests for error handling in canvases.create and canvases.edit methods.
WilliamBergamin
left a comment
There was a problem hiding this comment.
Hi @Lexer11l thanks for opening this PR 🙏
The changes seem accurate, would you also be able to update slack-api-client/src/test/java/test_locally/api/methods/CanvasesTest.java to include your changes
slack-api-client/src/test/java/test_with_remote_apis/methods/canvases_Test.java
Show resolved
Hide resolved
Hi @WilliamBergamin, sure! |
@WilliamBergamin I figured out that the way how mock is set up doesn't allow setting up successful and failing cases at the same time because text fixture is read only from one file: What would you suggest here? |
For this scenario I think its fine if we omit the changes to |
Alright, I added the missing import |
WilliamBergamin
left a comment
There was a problem hiding this comment.
Would you be able to share with me the manifest of the app you used to run the integration tests 🤔
I'm not able to get your test to pass from my end
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running test_with_remote_apis.methods.canvases_Test
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.853 s <<< FAILURE! -- in test_with_remote_apis.methods.canvases_Test
[ERROR] test_with_remote_apis.methods.canvases_Test.error_detail -- Time elapsed: 0.571 s <<< FAILURE!
java.lang.AssertionError:
Expected: is not null
but: was null
You're right. I updated the test and refactored the code a bit. Are these tests run in CI or dedicated only for local runs? |
WilliamBergamin
left a comment
There was a problem hiding this comment.
It would be better to not modify existing tests and follow existing patterns in your new test rather then introducing new ones
Hi @WilliamBergamin, I've made the changes in line with the Boy Scout Principle. |
WilliamBergamin
left a comment
There was a problem hiding this comment.
Tests are passing on my end 💯
Thanks for this contribution and addressing my comments 🙏
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1570 +/- ##
============================================
- Coverage 73.21% 73.19% -0.03%
+ Complexity 4514 4513 -1
============================================
Files 477 477
Lines 14283 14283
Branches 1487 1487
============================================
- Hits 10458 10455 -3
- Misses 2935 2936 +1
- Partials 890 892 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks a lot for reviewing the PR and guiding me! 🙇 |
Adding
detailtoCanvasesCreateResponse&CanvasesEditResponseCategory (place an
xin each of the[ ])Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.
Issue:
#1568