-
Notifications
You must be signed in to change notification settings - Fork 68
feat: Update packages #3364
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
Merged
Merged
feat: Update packages #3364
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4796979
to
794744a
Compare
zatteo
commented
Apr 17, 2025
There is |
794744a
to
b098b7e
Compare
Since cozy/cozy-client#1594 the `selectors.spec.js` test where failing This was due to incorrect mock for `client.requestQuery` that would return incorrect values with mixed folders and files where queryDefinition did request for only one type With previous cozy-client implementation, the `extractAndMergeDocument` would always return a new reference for the documents list. Then on the store's Reducer, the `haveDocumentsChanged` variable would always be `true`, so the queries helpers would try to auto update the queries and so would replay them with Sift The combination of incorrect mock + incorrect `dir_id` fields would result to Sift not being able to retrieve existing files and so it would chose to empty the entire `data` field from the `file` query in the redux store Also the `directory` query would contains both files and folders, so the test did see 13 items in queries, but for the wrong reason: - Instead of having: `files query=> 10 files` and `directories query => 3 folders` - We had: `files query=> 0 files` and `directories query => 3 folders and 10 files` With the new cozy-client implementation, the `extractAndMergeDocument` would return the reference for the documents list as both `file` and `directory` queries where mocked to receive the exact same content, so the documents list was identical. Then the on the store's Reducer, the `haveDocumentsChanged` variable would be `false`, and so the queries helpers would not replay queries with Sift So we obtained the following result: `files query=> 3 folders and 10 files` and `directories query => 3 folders and 10 files`, resulting to 26 items This shows that with the new implementation, cozy-client is more sensitive to impossible tests configurations By fixing the mock, we now correctly have: `files query=> 10 files` and `directories query => 3 folders` The fix on the `dir_id` is not mandatory here, because there are no intersection between both queries results, but we chose to still add it in order to have a clean test setup
b098b7e
to
1e8b622
Compare
BundleMonFiles updated (6)
Unchanged files (15)
Total files change -152.96KB -2.92% Groups updated (1)
Unchanged groups (2)
Final result: ✅ View report in BundleMon website ➡️ |
Ldoppea
approved these changes
Apr 17, 2025
Thank you a lot for this fix! And as always, awesome commit explanation! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.