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

Additional tests for collections in mixed #6648

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from

Commits on Apr 26, 2024

  1. Implement support for flat collections in Mixed (#6364)

    * Differentiate use of 'mixedToBinding()' for query arg validation.
    
    * Refactor 'mixedFromBinding()' to own function and account for List and Dictionary.
    
    * Implement setting a flat list and dictionary in Mixed.
    
    * Implement accessing a flat list and dictionary in Mixed.
    
    * Add tests for storing and accessing flat lists and dictionaries in Mixed.
    
    * Refactor helper in test to not rely on collection position.
    
    * Add tests for Set in Mixed throwing.
    
    * Add tests for updating lists and dictionaries.
    
    * Add tests for removing items in lists and dictionaries.
    
    * Add tests for filtering lists and dictionaries by path.
    
    * Throw if adding a set via property accessors.
    
    * Group tests into separate sub-suites.
    
    * Guard for embedded objects being set as Mixed value.
    
    * Add tests for embedded objects in Mixed throwing.
    
    * Add more filtering tests.
    
    * Add 'at_keys' query tests to uncomment after Core bug fix.
    
    * Add tests for inserting into lists and dictionaries.
    
    * Add tests for notifications on lists.
    
    * Add tests for notifications on dictionaries.
    
    * Add tests for notifications on object when changed prop is list in mixed.
    
    * Add tests for invalidating old list and dictionary.
    
    * Minor updates to names.
    
    * Add tests for notifications on object when changed prop is dictionary in mixed.
    
    * Add tests for creating dictionary via object without prototype.
    
    * Add tests filtering by query path using IN.
    
    * Access array of changes only 1 time in notifications tests.
    
    * Remove unnecessary type assertion.
    
    * Update schema object names in tests.
    
    * Add link to Core bug.
    
    * Add tests for default list and dictionary in schema.
    
    * Add tests for setting lists and dictionaries outside transaction.
    
    * Add tests for spreading Realm and non-Realm objects as Dictionary.
    
    * Add unit tests for 'isPOJO()'.
    
    * Point to updated Core commit and enable related tests.
    
    * Wrap chai's 'instanceOf()' in custom helper to assert type.
    
    * Update helper function name to be consistent with other helpers.
    
    * Add internal docs for 'isQueryArg'.
    
    * Rename unit test file.
    
    * Refactor notification tests into 'observable.ts'.
    
    * Refactor notification tests to use test context.
    
    * Use named import of 'ObjectSchema'.
    
    * Group CRUD tests into subsuites.
    elle-j committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    aa5b287 View commit details
    Browse the repository at this point in the history
  2. RJS-2680: Implement support for Mixed data type with nested collect…

    …ions (#6513)
    
    * Move geospatial helper functions to related file.
    
    * Implement setting nested lists in Mixed.
    
    * Implement setting nested dictionaries in Mixed.
    
    * Implement getting nested lists in Mixed.
    
    * Implement getting nested dictionaries in Mixed.
    
    * Test creating and accessing nested lists and dicts.
    
    * Make previous flat collections tests use the new 'expect' function.
    
    * Test that max nesting level throws.
    
    * Delegate throwing when using a Set to 'mixedToBinding()'.
    
    * Implement setting nested collections on a dictionary via setter.
    
    * Test nested collections on dictionary via setter.
    
    * Minor update to names of tests.
    
    * Combine nested and flat collections tests into same suite.
    
    * Implement setting nested collections on a list via setter.
    
    * Test nested collections on list via setter.
    
    * Refactor common test logic to helper functions.
    
    * Optimize property setter for hot-path and use friendlier err msg.
    
    * Refactor test helper function to build collections of any depth.
    
    * Implement inserting nested collections on a list via 'push()'.
    
    * Test nested collections on a list via 'push()'.
    
    * Test updating dictionary entry to nested collections via setter.
    
    * Test updating nested list/dictionary item via setter.
    
    * Test removing items from collections via 'remove()'.
    
    * Test object notifications when modifying nested collections.
    
    * Group previous notification tests into one test.
    
    * Group collection notifications tests into 'List' and 'Dictionary'.
    
    * Test collection notifications when modifying nested collections.
    
    * Remove collections from test context.
    
    * Test filtering by query path on nested collections.
    
    * Align object schema property names in tests.
    
    * Test filtering with int at_type.
    
    * Implement setting nested collections on a dictionary via 'set()' overloads.
    
    * Test JS Array method 'values()'.
    
    * Test JS Array method 'entries()'.
    
    * Implement getting nested collections on dictionary 'values()' and 'entries()'.
    
    * Test 'values()' and 'entries()' on dictionary with nested collections.
    
    * Remove unnecessary 'fromBinding()' calls.
    
    * Refactor collection helpers from 'PropertyHelpers' into the respective collection file.
    
    * Introduce list/dict sentinels to circumvent extra Core access.
    
    * Rename getter to default.
    
    * Remove redundant 'snapshotGet'.
    
    * Add abstract 'get' and 'set' to 'OrderedCollection'.
    
    * Rename the collection helpers to 'accessor'.
    
    * Move tests into subsuites.
    
    * Fix 'Results.update()'.
    
    * Support nested collections in 'pop()', 'shift()', 'unshift()', 'splice()'.
    
    * Test list 'pop()'.
    
    * Test list 'shift()'.
    
    * Test list 'unshift()'.
    
    * Test list 'splice()'.
    
    * Return 'not found' for collections searched for in 'indexOf()'.
    
    * Test ordered collection 'indexOf()'.
    
    * Support list/dict sentinels in JSI.
    
    * Test references per access.
    
    * Enable skipped tests after Core bug fix.
    
    * Point to updated Core.
    
    * Fix accessor for non-Mixed top-level collection with Mixed items.
    
    * Enable and fix previously skipped test.
    
    * Update 'mixed{}'.
    
    * Update 'mixed<>'.
    
    * Remove now-invalidated test.
    
    * Remove unused injectable from Node bindgen template.
    
    * Replace if-statements with switch.
    
    * Add explicit Results and Set accessors for Mixed.
    
    * Adapt to change in Core treating missing keys as null in queries.
    
    * Rename insertion function.
    
    * Include tests of Dictionary property type with Mixed.
    
    * Test reassigning to new collection and self-assignment.
    
    * Test mixed
    
    * Update 'mixed[]'.
    
    * Test results accessor.
    
    * Update error messages.
    
    * Make accessor helpers an object field rather than spread.
    
    * Suggestions for "nested collections in mixed" (#6566)
    
    * Fix type bundling issue
    
    * Inline functions into "create*Accessor*" functions
    
    * Refactored typeHelpers out of accessors
    
    * Remove leftover 'Symbol_for' in node-wrapper template.
    
    * Test not invalidating new collection.
    
    * Remove test for max nesting level.
    
    The max nesting level in debug in Core has been updated to be the same as for release.
    
    * Remove reliance on issue-fix in certain tests.
    
    * Add key path test for object listener on mixed field.
    
    * Use '.values()' and '.entries()' in iteration.
    
    * Update comments.
    
    * Add CHANGELOG entry.
    
    ---------
    
    Co-authored-by: Kræn Hansen <[email protected]>
    elle-j and kraenhansen committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    f27d77e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aeb1749 View commit details
    Browse the repository at this point in the history
  4. Add links to Core issue.

    elle-j committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    b7d21e7 View commit details
    Browse the repository at this point in the history
  5. Update example in CHANGELOG.

    elle-j committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    c20dede View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1dca996 View commit details
    Browse the repository at this point in the history
  7. Add more links to Core issue.

    elle-j committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    e675112 View commit details
    Browse the repository at this point in the history
  8. Injecting Symbol_for (#6616)

    kraenhansen authored and elle-j committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    ec9f30f View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. Configuration menu
    Copy the full SHA
    42f6814 View commit details
    Browse the repository at this point in the history
  2. Removed previous method

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    5a6b8c4 View commit details
    Browse the repository at this point in the history
  3. Various corrections

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    b960fd5 View commit details
    Browse the repository at this point in the history
  4. Removed only

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    3991bec View commit details
    Browse the repository at this point in the history
  5. Testing

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    5502110 View commit details
    Browse the repository at this point in the history
  6. Corrected types

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    6e4e18c View commit details
    Browse the repository at this point in the history
  7. Various fixes

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    889fcfe View commit details
    Browse the repository at this point in the history
  8. Various fixes

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    0b8ff49 View commit details
    Browse the repository at this point in the history
  9. Fixed equality [skip-ci]

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f303fda View commit details
    Browse the repository at this point in the history
  10. Added list modification

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    883d26c View commit details
    Browse the repository at this point in the history
  11. Adding tests

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    71c341c View commit details
    Browse the repository at this point in the history
  12. Added dictionary tests

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    3bf02b3 View commit details
    Browse the repository at this point in the history
  13. Reinstated tests

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    5808ee6 View commit details
    Browse the repository at this point in the history
  14. Various improvements

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f305970 View commit details
    Browse the repository at this point in the history
  15. Moved function up

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    51bbdf1 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    46150ae View commit details
    Browse the repository at this point in the history
  17. Small fixes

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    ab512bb View commit details
    Browse the repository at this point in the history
  18. Removed todo

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    d2c1a4e View commit details
    Browse the repository at this point in the history
  19. Removed unused

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    105054d View commit details
    Browse the repository at this point in the history
  20. Apply suggestions from code review

    Co-authored-by: LJ <[email protected]>
    papafe and elle-j committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    ba5ec50 View commit details
    Browse the repository at this point in the history
  21. Small corrections

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    b9c7470 View commit details
    Browse the repository at this point in the history
  22. Reinstated tests

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    ba48135 View commit details
    Browse the repository at this point in the history
  23. Small correction

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    89de282 View commit details
    Browse the repository at this point in the history
  24. Logging to file

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    2711dd8 View commit details
    Browse the repository at this point in the history
  25. Improvements

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    e56b233 View commit details
    Browse the repository at this point in the history
  26. Remove unused

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    71e8524 View commit details
    Browse the repository at this point in the history
  27. Removed realm use

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    fa9d2ea View commit details
    Browse the repository at this point in the history
  28. trying to improve testing

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    14e9a32 View commit details
    Browse the repository at this point in the history
  29. Corrected testing

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    2ec8d25 View commit details
    Browse the repository at this point in the history
  30. Removed only

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f7894f4 View commit details
    Browse the repository at this point in the history
  31. Added comment

    papafe committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    8f81629 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Merge branch 'fp/collections-mixed-sync-tests' into fp/collections-mi…

    …xed-sync-tests-additional
    
    * fp/collections-mixed-sync-tests:
      Added comment
      Removed only
      Corrected testing
      trying to improve testing
      Removed realm use
      Remove unused
    
    # Conflicts:
    #	integration-tests/tests/src/tests/sync/mixed.ts
    papafe committed May 1, 2024
    Configuration menu
    Copy the full SHA
    6c51611 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Reinstated missing

    papafe committed May 2, 2024
    Configuration menu
    Copy the full SHA
    4aeb008 View commit details
    Browse the repository at this point in the history
  2. Removed unused

    papafe committed May 2, 2024
    Configuration menu
    Copy the full SHA
    67abfe9 View commit details
    Browse the repository at this point in the history
  3. Small corrections

    papafe committed May 2, 2024
    Configuration menu
    Copy the full SHA
    f0c3ffc View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Removed comment

    papafe committed May 8, 2024
    Configuration menu
    Copy the full SHA
    3c3bde9 View commit details
    Browse the repository at this point in the history