Fix Limitation Role #5131#5132
Conversation
Allow to manage Live Query with User that have more than 100 Parse.Roles
Codecov Report
@@ Coverage Diff @@
## master #5132 +/- ##
==========================================
+ Coverage 93.84% 93.84% +<.01%
==========================================
Files 123 123
Lines 8923 8941 +18
==========================================
+ Hits 8374 8391 +17
- Misses 549 550 +1
Continue to review full report at Codecov.
|
|
@Moumouls You should use |
|
@dplewis Got it, i'm currently learning how to do a clean PR for Parse Server :) |
|
@Moumouls A few fixes from me and I'll give it another look through |
Sorry didn’t mean to approve. I’m on mobile
|
@dplewis Auht.js is ok, now a test from |
|
You have a lint issue too |
|
@Moumouls you will need to mock .each as you aren’t using find anymore for that test |
|
That's what I thought! I am not yet very familiar with this type of unit tests |
|
What's the good way to mock the each(callback) {
if (!shouldReturn) {
return Promise.resolve();
}
//Return a role with the name "liveQueryRead" as that is what was set on the ACL
const liveQueryRole = new Parse.Role(
'liveQueryRead',
new Parse.ACL()
);
liveQueryRole.id = 'abcdef1234';
callback(liveQueryRole)
return Promise.resolve();
}, |
|
You neee to ‘build’ with |
|
@Moumouls I'll be pushing a PR soon to introduce a |
…unity#5132) * Fix Limitation Role parse-community#5131 Allow to manage Live Query with User that have more than 100 Parse.Roles * Clean Up * Add Custom Config Support and Test * Fix Auth Test * Switch to Async Function * Fix restWhere * Fix Test * Clean Final Commit * Lint Fix * Need to Fix Test Callback * Fixes broken test * Restore find() method in spy * adds restquery-each * small nit * adds changelog
Allow to manage Live Query on Role based Object for Parse.User that have more than 100 Parse.Role