Commit Graph

642 Commits

Author SHA1 Message Date
Radu Tutueanu 8eb639678e Accept a custom path for the realm module (#725)
* Accept a custom path for the realm module

* Use the correct argument for the realm module path
2016-12-08 13:01:41 +01:00
Kristian Dupont 43d94d1b8b Add checks for removeListener 2016-12-07 16:31:52 +01:00
Kristian Dupont 1d4bb7c2ad Add more tests and fix add_notification 2016-12-07 16:31:52 +01:00
Kristian Dupont bf85c285a0 Add tests for closed-realm access protection 2016-12-07 16:31:52 +01:00
Ari Lazier b9a2c92a8b test fixes 2016-12-06 14:43:07 +01:00
Marius Rackwitz 8964e4d7f9 Only set the path derived from the SyncManager if none was provided (#679)
* Only set the path derived from the SyncManager if none was provided

* Disable synchronizeChangeswithTwoClientsAndOneUser
2016-11-29 10:51:26 +01:00
Adam Lebsack 9900d24181 Merge pull request #664 from realm/ajl/add-tests
Added tests directory to package.json
2016-11-28 13:44:44 +01:00
Adam Lebsack 88e840f315 Merge remote-tracking branch 'origin/master' into ajl/jenkinsfile 2016-11-25 11:33:48 +01:00
Adam Lebsack 5ac6d97833 Added support for React tests on android in docker (phew) 2016-11-24 16:58:16 +01:00
Ari Lazier 19e91c1f7b don't include ios app in the package 2016-11-17 07:35:51 -08:00
Radu Tutueanu 8d5acd7da5 Fix docs and test according to new api 2016-11-16 13:36:41 +01:00
Ari Lazier fabaf5e819 Merge pull request #653 from realm/nh/update_android
Nh/update android
2016-11-15 10:06:20 -08:00
Søren Vind 06d277aacd Bumped version of ESLint, added eslinting of specs, make all linting pass 2016-11-14 10:48:50 -08:00
Marius Rackwitz b01349087c Add a test which synchronizes a change between two clients 2016-11-14 17:36:47 +01:00
Nabil Hachicha a53e802df3 Merge branch 'al-sync-user-tests' of https://github.com/realm/realm-js into al-sync-user-tests 2016-11-14 13:26:54 +00:00
Nabil Hachicha fdf88c2f78 Adding a build type to switch between Core & Core+Sync 2016-11-14 13:26:33 +00:00
Ari Lazier eef8a2de3b property clean up sync state between tests in c++ 2016-11-12 05:26:37 -08:00
Ari Lazier 695d6f9efb suppress garbage debug info 2016-11-11 21:20:04 -08:00
Ari Lazier baa8321453 fix test 2016-11-11 19:33:21 -08:00
Søren Vind 14e75f12bc Documentation for .all and .current 2016-11-11 14:54:12 -08:00
Ari Lazier bb7e98cbbe use latest rn version 2016-11-11 12:01:31 -08:00
Ari Lazier d229cd6130 throw exception when trying to open a realm with an invalid user 2016-11-11 00:14:52 -08:00
Ari Lazier 08ffc3bf15 ccache support 2016-11-10 23:55:26 -08:00
Ari Lazier 81402f890b use yarn and fix for test app package.json 2016-11-10 23:11:31 -08:00
Søren Vind 88aae65721 Test logout, slightly better test scaffolding (so now we run tests to completion on the outer level of callbacks). 2016-11-10 18:06:27 -08:00
Ari Lazier 30679c2470 remove unneeded script phases 2016-11-10 15:54:24 -08:00
Ari Lazier 6d485866f6 all users should return a dictionary 2016-11-10 13:55:22 -08:00
Søren Vind 87b30fb4ec Add tests of Realm.Sync.User.all and Realm.Sync.User.current. Fix both to only return active (logged-in) users. Fix current return values: Throws if >1 user logged in, returns undefined if no logged in. 2016-11-10 12:54:15 -08:00
Søren Vind 448f68a787 Reformat code, 2 spaces 2016-11-10 12:54:15 -08:00
Ari Lazier fb47fb10cc remove sync test code from test app 2016-11-10 11:51:37 -08:00
Søren Vind 164ea8ec79 Port over remaining tests for Realm.Sync.User 2016-11-10 10:35:36 -08:00
Søren Vind f8eba17c48 Make it possible to run test suite with and without sync 2016-11-09 12:50:19 -08:00
Søren Vind d5cd3d7266 Download and start ROS before running tests + Run all tests + Run using node4.4.7 2016-11-08 16:47:20 -08:00
Ari Lazier 8ce8f52105 add test for login 2016-11-08 14:07:04 -08:00
Ari Lazier b2e71a5fb6 test fixes 2016-11-08 09:21:27 -08:00
Ari Lazier fde1c5d00d start implementing sync tests 2016-11-08 08:59:30 -08:00
Ari Lazier 5a49dbc325 make sync work with RealmJS tests 2016-10-27 13:49:41 -07:00
Ari Lazier 92adb669d5 hook up new object store apis 2016-10-26 17:00:46 -07:00
Yavor Georgiev a66198fe46 make tests require the symlinked realm module 2016-10-13 16:09:14 +02:00
Ari Lazier 857369f5a4 download core and sync and get the test app running on sync 2016-10-04 17:27:09 -07:00
Ari Lazier 9d0df0de3d Sync and fine grained notifications 2016-10-04 15:07:14 -07:00
Ari Lazier 1ea107258f don't run npm install multiple times 2016-08-19 10:07:15 -07:00
Yavor Georgiev fb7911e3fa add support for the jest runner’s node environment 2016-08-10 15:50:37 +02:00
Yavor Georgiev 1a98077794 Add tests to ensure realm-js is usable inside mocha and ava tests 2016-08-10 15:47:55 +02:00
Ari Lazier af0ddcdd3d Merge pull request #533 from realm/mr/deprecate-type
Remove usage of Realm.Types in the spec and deprecate it
2016-08-08 12:27:11 -07:00
Ari Lazier 9c8a1ed8ae fixes for RN 0.31.0 2016-08-07 09:33:36 -07:00
Marius Rackwitz 9d25435105 [Tests] Stop using Realm.Types 2016-08-04 10:10:28 -07:00
Ari Lazier 3b75de4554 test app and compile fixes for RN android 0.29.0+ 2016-07-31 14:25:13 -07:00
Ari Lazier d2f733f168 support latest react-native version 2016-07-31 14:23:12 -07:00
Scott Kyle e8ea8e493e Fix for linker error when building for iOS 7
By default, React Native projects target a minimum of iOS 7, but our projects were set to iOS 8 because previously we used a dynamic framework.

When building for an iOS 7 minimum target version, the linker would complain about thread local variables not working on iOS 7. So it was necessary to add even more checks (iOS >= 8 or OS X >= 10.7) before using native thread local variables rather than our shim.

This also changes our projects to target iOS 7 so we can catch these issues quicker in the future.
2016-06-27 12:16:35 -07:00
Scott Kyle 030807e2b9 Fix for failed test stopping tests in ReactTestsApp 2016-06-14 16:57:50 -07:00
Scott Kyle 17e7153a59 Very basic multiprocess change notification test 2016-06-13 17:24:43 -07:00
Scott Kyle b42f5ab285 Allow Node tests to be asynchronous 2016-06-13 17:24:43 -07:00
Scott Kyle 723b50f649 Allow React tests to be async 2016-06-13 17:24:43 -07:00
Scott Kyle 2384cc4036 Reset Realm.defaultPath in testDefaultPath
Or else the rest of the tests use the new default path!
2016-06-13 17:24:43 -07:00
Ari Lazier c7e156a7b8 Merge pull request #488 from realm/al-typos
fixes for typos and added upsert test
2016-06-13 14:51:53 -07:00
Ari Lazier 0a4e0665ae fixes for typos and added upsert test 2016-06-13 14:46:26 -07:00
Ari Lazier 3901bf53dc Merge pull request #479 from realm/al-muti-realm
fix for setting properties to objects from other realms
2016-06-13 14:44:28 -07:00
Ari Lazier 61e74c3059 Merge pull request #472 from realm/sk-primary-key-api
Implement objectForPrimaryKey() method
2016-06-13 14:18:29 -07:00
Scott Kyle cd20d870dd Fix crash from querying with object from another Realm 2016-06-09 15:32:37 -07:00
Ari Lazier 81feca0ce9 fix for setting properties to objects from other realms 2016-06-08 11:22:12 -07:00
Scott Kyle c8df1cddec Update projects to React Native 0.27.1 2016-06-07 18:23:11 -07:00
Scott Kyle cd0bb079b7 Implement objectForPrimaryKey() method
Resolves #328
2016-06-03 16:51:32 -07:00
Scott Kyle ba6e83191b Merge pull request #460 from realm/sk-react-native-26
Update projects to React Native 0.26.2
2016-05-27 16:33:44 -07:00
Scott Kyle b76ed20020 Update projects to React Native 0.26.2
Fixed some minor issues along the way.
2016-05-27 11:30:17 -07:00
Scott Kyle af70bb3c63 Fix all linting issues inside JS tests 2016-05-26 15:47:30 -07:00
Scott Kyle aa09ba3cd4 Factor out some common code in React tests
Now iOS and Android share more code. Also converted to using ES6 modules imports and fixed some other linting issues.
2016-05-26 15:47:30 -07:00
Scott Kyle 48394d9c19 Automatically handle deleting test Realms
No longer leave this up to the test. All testing passes through the runTest() function, so we use that spot to delete the Realms. It also now deletes them beforehand too since a crash in a previous run could leave a Realm in place.
2016-05-26 15:47:30 -07:00
Scott Kyle 58bff5f939 Remove commented Objective-C query tests 2016-05-26 15:46:53 -07:00
Scott Kyle 78a8311ba6 Merge branch '0.13.x'
* 0.13.x:
  [0.13.2] Bump version
  fix for upgrading optional date properties
2016-05-26 14:36:17 -07:00
Ari Lazier 027d4fd153 fix for upgrading optional date properties 2016-05-26 13:30:51 -07:00
Scott Kyle f8ba388d14 Fix crash and other errors with Results snapshots
When deleteAll() is called on a Realm, it calls clear() on all of its Tables, which seems to not update TableViews unless they are synced. The is_row_attached(row_ndx) method still returns true otherwise. A workaround is here until that is fixed.

Fixes #434
2016-05-24 11:52:02 -07:00
Ari Lazier 9e05728dce fix for negative timestamps 2016-05-24 11:45:16 -07:00
Scott Kyle 7740665d7d Merge pull request #449 from realm/sk-crash-fix
Fix crash and other errors with Results snapshots
2016-05-24 11:02:53 -07:00
Scott Kyle 60a58382b4 Add tests where deletion happens before snapshot() 2016-05-24 10:23:36 -07:00
Ari Lazier 604fcc73f2 fix for negative timestamps 2016-05-24 08:23:21 -07:00
Scott Kyle e14e922c39 Fix crash and other errors with Results snapshots
When deleteAll() is called on a Realm, it calls clear() on all of its Tables, which seems to not update TableViews unless they are synced. The is_row_attached(row_ndx) method still returns true otherwise. A workaround is here until that is fixed.

Fixes #434
2016-05-20 13:42:17 -07:00
Ari Lazier fd25afe214 add isValid methods to results and list 2016-05-16 16:01:14 -07:00
Scott Kyle 9370eba229 Merge pull request #436 from realm/sk-react-native-25
Updates for React Native 0.25
2016-05-16 14:22:59 -07:00
Scott Kyle 02b770b79a Fix ESLint errors 2016-05-16 14:15:56 -07:00
Ari Lazier 0f74101074 Merge pull request #423 from realm/al-timestamp
Use new timestamp format
2016-05-16 13:52:31 -07:00
Scott Kyle 55bbcc9e56 Fix ReactTestApp imports for React Native 0.25 2016-05-16 13:24:44 -07:00
Scott Kyle 8db0161ed8 Update projects to React Native 0.25 2016-05-16 13:20:50 -07:00
Scott Kyle 7a26d192ba Merge pull request #427 from realm/sk-object-inheritance
Fix ES6 class inheritance of Realm.Object with Babel
2016-05-16 11:17:45 -07:00
Scott Kyle 5bc72ab2cf Make Date testing work for Node 2016-05-13 16:30:57 -07:00
Scott Kyle c803efd01b Use ".realm" extension in tests for proper cleanup 2016-05-13 15:47:57 -07:00
Ari Lazier 125dd0d1c7 merge it 2016-05-13 15:41:10 -07:00
Ari Lazier 2d2764a4d6 add missing files 2016-05-13 15:31:59 -07:00
Ari Lazier d1dcd4ff3f add additional tests 2016-05-13 15:29:59 -07:00
Scott Kyle 1b21f21c35 Symlink ReactTestApp assets for Android 2016-05-13 15:24:48 -07:00
Ari Lazier e7b341dfdb merge latest from master 2016-05-13 15:05:19 -07:00
Ari Lazier 9c1b923797 fixes for test app 2016-05-13 13:05:39 -07:00
Scott Kyle 323583ed67 Merge pull request #417 from realm/sk-node-6
Fix issues in Node 6
2016-05-12 12:39:31 -07:00
Ari Lazier 194f238c1c add missing realm file 2016-05-12 10:24:11 -07:00
Nabil Hachicha 895c6a3056 Copying embedded Realm files using AssetManager from JNI 2016-05-11 19:56:59 +01:00
Nabil Hachicha 57701db8f4 copy Realm file from assets into default storage folder 2016-05-11 03:30:37 +01:00
Scott Kyle 351543ca09 Rename callback based on PR feedback 2016-05-10 11:37:09 -07:00
Scott Kyle 4300e865c7 Abstracted check for Node v6 2016-05-10 11:34:33 -07:00
Scott Kyle 26d2c169a9 Support ES6 class inheritance from Realm.Object
Unfortunately, this was broken because our native Realm.Object constructor was not presenting itself as a function in JS. This fixes that and adds tests.
2016-05-09 16:49:05 -07:00
Ari Lazier da5a1fb2d8 remove files from test project - they are only needed in the test bundle 2016-05-09 13:44:35 -07:00
Ari Lazier 21b58b6a1e test that conversion actually works 2016-05-09 13:32:10 -07:00
Ari Lazier 9c7b01091f convert old date columns 2016-05-09 13:12:48 -07:00
Scott Kyle fef4be96bd Update tests for changing defaults and constructors 2016-05-06 15:41:17 -07:00
Ari Lazier 28a7efcd1b add test for current date 2016-05-05 17:36:48 -07:00
Scott Kyle 4a5ac413cc Skip test in Node v6 due to v8 regression 2016-05-04 02:15:17 -07:00
Ari Lazier d26924e2f9 allow setting of non-persisted properties 2016-05-03 13:05:48 -07:00
Scott Kyle db1283255f Make React reloads and testing more reliable
Changed where we wait on the previous JS thread, which ultimately makes it more reliable and no longer leak memory on reloads.

Resolves #397
2016-05-02 16:19:29 -07:00
Scott Kyle 933e6070c5 Update test and example apps to use React Native 0.24.1
This might make tests run more reliably on iOS due to some internal changes, mainly "Stop the runloop from invalidate instead of dealloc" (99c7de2).
2016-05-02 16:19:29 -07:00
Scott Kyle 32a8a2ed72 Make migration tests work in Chrome debug mode
All realm operations for the RPC are now done in their own thread so it can be allowed to block on waiting for callback results. The recursive and multi-threaded nature of this makes it pretty tricky, but it works!
2016-04-29 13:55:49 -07:00
Ari Lazier 2b6b0b97f4 Merge pull request #406 from realm/al-workspace
Add workspace and clean up xcproject layout
2016-04-29 13:53:26 -07:00
Ari Lazier 0c05259558 remove old umbrella header 2016-04-29 12:58:25 -07:00
Ari Lazier 2b35360117 add readOnly property 2016-04-28 15:50:43 -07:00
Ari Lazier b9b3812c86 support for read-only realms 2016-04-28 15:42:28 -07:00
Ari Lazier a2ed550dde Merge pull request #383 from realm/al-migration
Basic data migrations
2016-04-28 15:40:27 -07:00
Ari Lazier 0fdb008477 test fixes/additions 2016-04-28 14:08:54 -07:00
Ari Lazier 2c85f032d9 compare non-existent properties to undefined 2016-04-28 13:21:30 -07:00
Ari Lazier a9eaf93acb test dynamic schema access 2016-04-28 13:03:42 -07:00
Ari Lazier baac975413 test schema in migrations 2016-04-28 12:53:04 -07:00
Ari Lazier ef11443e28 test objectTypes 2016-04-28 12:46:59 -07:00
Ari Lazier 79446f957a test and bug fixes 2016-04-28 12:44:48 -07:00
Ari Lazier cff099a4af tests and bugfixes 2016-04-28 12:16:16 -07:00
Scott Kyle 4705b6b3a5 Add test for Results invalidation
This triggers a crash!
2016-04-28 09:39:06 -07:00
Ari Lazier 17e5946af4 support for data migrations 2016-04-27 08:30:59 -07:00
Ari Lazier 27d973151f pr fixes 2016-04-26 16:59:03 -07:00
Ari Lazier b59784670b create RealmObject class and make isValid a member 2016-04-26 16:30:04 -07:00
Ari Lazier 78cb44b1a1 add test for isValid 2016-04-19 17:29:34 -07:00
Ari Lazier 3509caedd5 bugfix for empty results, fix for realm.isValid 2016-04-19 17:29:34 -07:00
Scott Kyle ece554e58f Exit with an error code for failures of node tests 2016-04-19 16:53:49 -07:00
Scott Kyle a05f7e2261 Fix some eslint errors 2016-04-19 01:38:46 -07:00
Scott Kyle 4731610a58 Merge branch 'master' into sk-node
* master:
  add keypath tests
  pr feedback, changelog
  typo
  bug fix
  tests
  support keypath comparisons for types that support it
  support for null queries
  don't require optional or link properties when creating objects
  [0.11.1] Bump version
  Update CHANGELOG with 0.11.1 fixes
  Update changelog script
  Remove changes_available implementation that asserts
  Get correct path to adb from Android Studio
  add some simple tests for Realm.write
  Update apps to use React Native 0.22
2016-04-18 14:19:06 -07:00
Scott Kyle 133289ad85 All tests now pass on Node 2016-04-15 16:06:44 -07:00
Ari Lazier b542fe8c7b tests 2016-04-11 16:01:51 -07:00
Ari Lazier 4ac022ecc9 don't require optional or link properties when creating objects 2016-04-01 11:00:53 -07:00
Scott Kyle 34ece60e69 Merge pull request #335 from realm/sk-react-native-22
Update to use React Native 0.22
2016-03-29 16:08:33 -07:00
Ari Lazier 9d0b890923 add some simple tests for Realm.write 2016-03-29 09:02:36 -07:00
Scott Kyle c9c941aac9 Update apps to use React Native 0.22
React is now a peer dependency, which means we need to add it to our package.json for npm v3 to work properly.
2016-03-24 17:35:46 -07:00
Scott Kyle 02b81ac056 Convert RealmReact to be a static library
We needed to do this due to the way React Native modules work. Our hacky solution for using a framework ended up falling apart due to it relying on symbols not getting stripped from the main application.

This static library is in its own Xcode project because rnpm links in *all* static libraries from a given Xcode project.
2016-03-23 10:50:19 -07:00
Scott Kyle 88f6191a61 Fix disabling of RCTDevMenu for tests on iOS 9.3
After upgrading to Xcode 7.3, the test bundle is being loaded before the rest of the app. We need to ensure +[RCTDevMenu load] is called before we remove it from the set of native modules.
2016-03-22 09:54:06 -07:00
Scott Kyle 0e74362e4c Merge pull request #340 from realm/sk-collection
Make List and Results inherit from Collection
2016-03-21 15:27:18 -07:00
Ari Lazier f13cd0a245 Merge pull request #342 from realm/al-fix-throws
fix for test bug in test harness for queries that should throw
2016-03-21 14:04:22 -07:00
Ari Lazier e84b1eb145 fix for test bug in test harness for queries that should throw 2016-03-21 13:41:00 -07:00
Ari Lazier 4b2e47a861 support encrypted realm when getting schemaVersion 2016-03-21 13:34:12 -07:00
Ari Lazier 836cfc1c6b add chrome debugging, use -1 for not versioned 2016-03-21 13:34:12 -07:00
Ari Lazier 5de63ac401 add tests 2016-03-21 13:34:12 -07:00
Ari Lazier b9475ad772 pr feedback 2016-03-21 11:46:34 -07:00
Scott Kyle 8c66bab8aa Make collection iterators actually iterable
The ES6 spec calls for this so these iterators are usable in for-of loops, with spread operators, etc.
2016-03-20 11:51:16 -07:00
Scott Kyle b5ce02c0ce Make List and Results inherit from Collection
This will allow for easier type checking, documentation, etc.
2016-03-20 11:51:16 -07:00
Ari Lazier b2e4d93732 support for indexed properties 2016-03-18 16:50:55 -07:00
Scott Kyle 92461f2598 Update API docs with encryptionKey 2016-03-17 15:14:56 -07:00
Scott Kyle 9ba477762a Update splice tests to test added behavior 2016-03-17 14:53:42 -07:00
Scott Kyle 7d21e56471 Git ignore Android test XML output
Other rules were redundant
2016-03-16 13:33:59 -07:00
Scott Kyle 401b501aab Explicitly opt-in to building Android module
Fixes #277
2016-03-16 13:01:38 -07:00
Scott Kyle 27073a9e66 Properly configure ESLint for syntax checking
Added a test case to run on CI as well.
2016-03-16 13:01:38 -07:00
Ari Lazier aa08d25ed0 Merge pull request #305 from realm/al-object-store
Latest object store changes and core
2016-03-10 16:03:12 -08:00
Ari Lazier f3c15ff339 Merge pull request #308 from realm/sk-react-native-21
Update projects to use React Native 0.21
2016-03-10 08:34:23 -08:00
Scott Kyle 1a127b425b Merge pull request #289 from realm/sk-accept-constructor
Accept constructor in create() and objects() methods
2016-03-07 12:23:26 -08:00
Scott Kyle cb4002e25c Update ReactTests to React Native 0.21 2016-03-04 13:31:14 -08:00
Ari Lazier 079b09ddeb Merge pull request #307 from realm/al-test-sort
Test sorting all property types
2016-03-04 13:22:30 -08:00
Ari Lazier c42834d052 test strings too 2016-03-04 07:58:25 -08:00
Ari Lazier 621ee36fad test sorting all properties 2016-03-04 07:55:05 -08:00
Ari Lazier 87ee697f53 react native test app fixes 2016-03-03 15:34:56 -08:00
Ari Lazier 386740a459 copy correct test file 2016-03-03 15:09:23 -08:00
Ari Lazier 548d700ffe object store fixes for js binding 2016-03-03 14:45:44 -08:00
Ari Lazier 5f61fd970c support relative paths when opening realms 2016-03-03 13:33:49 -08:00
Scott Kyle 85832f0f02 Rename some functions according to PR feedback 2016-03-03 02:49:37 -08:00
Scott Kyle 37b2c35169 Add Symbol.iterator method to List and Results
Resolves #235
2016-03-02 23:00:53 -08:00
Scott Kyle 1cba02c34d Fix broken iterator methods on Android
Turns out the JSC included with React Native on Android includes a buggy implementation of ArrayIterator that is missing an exposed next() method, so we implement it ourselves instead.
2016-03-02 22:57:36 -08:00
Scott Kyle 4a81b091cb Accept constructor in create() and objects() methods
This will help the linter prevent spelling mistakes and make some code more easily readable.

Resolves #233
2016-03-01 00:46:03 -08:00
Scott Kyle 72bf66e57e Check for some iterator methods before testing them
Some JS engines (like Chrome) are skipping over values() due to a web compatibility reason for right now.
2016-03-01 00:14:18 -08:00
Scott Kyle bceef3c340 Move encryption-tests to right directory
This wasn't caught in a rebase, oops!
2016-02-29 12:39:00 -08:00
Scott Kyle 4ea2e729b4 Support many Array methods on List and Results
Resolves #18
2016-02-29 03:24:58 -08:00
Scott Kyle 236d0a5eed Ensure List and Results constructors throw exception
This was already done from native code, but needed to happen for the browser shim and be tested.
2016-02-29 03:24:58 -08:00
Scott Kyle 44a29d8dd4 Expose List and Results constructors into JS 2016-02-29 03:24:58 -08:00
Scott Kyle a5ec799a7c Copy whole lib module into JS test bundle
This meant we needed to rename tests/lib to tests/js so they folder names would not conflict.
2016-02-29 03:24:58 -08:00
Scott Kyle 154422a3d1 Make realm instances pass instanceof check 2016-02-29 03:24:58 -08:00
Ari Lazier 4177b0fb40 fix for test naming 2016-02-26 11:18:47 -08:00
Ari Lazier e495cc4685 add encryption support 2016-02-26 11:08:59 -08:00
Tim Anglade 7cc2f69736 Merge pull request #264 from realm/km-js-fixlicense
License update
2016-02-21 18:56:59 -08:00
Scott Kyle 52a1fa9196 Automatically forward port 8082 for Android
Fixes #249
2016-02-21 16:57:05 -08:00
Scott Kyle 1ab3a8a985 No longer delete before npm installing local modules
This doesn't appear to have been necessary and seems to sometimes cause an issue because the packager will start and look for a JS file that was just deleted.
2016-02-19 02:03:54 -08:00
Scott Kyle 2e3a3b5db8 Merge pull request #257 from realm/sk-schema-prop
The schema property should be directly on constructor
2016-02-18 16:27:47 -08:00
Karson Miller 84b06fd8e0 missed a couple 2016-02-18 15:30:44 -08:00
Karson Miller 5e9333b699 no message 2016-02-18 15:30:44 -08:00
Scott Kyle a661350e59 Merge branch 'sk-sorted-results'
* sk-sorted-results:
  Add sorted() method to List
  Further improve argument checking for sorted()
  Improve error message in sorted() method
  Change sortedBy API as discussed
  Allow sortedBy to accept array of properties
  Change sortByProperty to return new Results
2016-02-18 15:21:35 -08:00
Scott Kyle 5b2e7b37af Add script to update version in package.json and iOS
This uses agvtool to update the CURRENT_PROJECT_VERSION and DYLIB_CURRENT_VERSION project variables. The Info.plist files have been updated to propagate this value.
2016-02-18 13:58:12 -08:00
Scott Kyle d322d5dd9c Add property test for objects with constructor 2016-02-18 13:50:45 -08:00
Scott Kyle 5332131c14 Add sorted() method to List 2016-02-18 13:41:11 -08:00
Scott Kyle d847fbceb1 Further improve argument checking for sorted() 2016-02-18 12:55:54 -08:00
Scott Kyle 05d84b23a2 Change sortedBy API as discussed
If provided an array, then each member can optionally be an array of [propName, reverse]
2016-02-18 12:47:18 -08:00
Scott Kyle 76865d0da4 Allow sortedBy to accept array of properties
It now optionally accepts an array of properties for both parameters and the tests have been updated to reflect new capabilities.
2016-02-18 11:58:39 -08:00
Scott Kyle 249bcd8f3f Change sortByProperty to return new Results
The method name changed to sortedBy to reflect that it returns a new Results object and to be more succinct. Also, the second optional argument instead reflects descending (or rather, reverse) since it's an anti-pattern to have an optional argument default to true in JS, and this also follows precedences set by other JS libraries and by Python's sorted function.
2016-02-18 11:58:39 -08:00
Scott Kyle b34e52b290 The schema property should be directly on constructor
The constructor is now also called with `this` set as the constructed object.

Fixes #232
2016-02-18 11:10:02 -08:00
Ari Lazier d70de00923 Merge pull request #254 from realm/al-filtered
Add filtered method to List and Results
2016-02-17 21:32:28 -08:00
Ari Lazier b3486c0d0e final fixes 2016-02-17 20:51:03 -08:00
Ari Lazier 6d02614eaa add List.filtered 2016-02-17 20:24:08 -08:00
Ari Lazier d838d61de4 test query refinement 2016-02-17 20:09:39 -08:00
Ari Lazier e91ef42ebb add filtered method 2016-02-17 20:06:42 -08:00
Scott Kyle 1b043eb957 Update everything to use React Native 0.20.0 2016-02-17 14:36:58 -08:00
Scott Kyle 137e4d6288 Increase React test timeout interval for CI 2016-02-15 19:23:59 -08:00
Scott Kyle 5f9f00e038 Make ListViewDataSource test go quicker 2016-02-15 16:56:39 -08:00
Scott Kyle 0188517e74 Add test for ListViewDataSource to React Test App 2016-02-15 14:56:44 -08:00
Scott Kyle 1f030a0618 Make several improvements to how tests run under RN
These changes include timeouts when waiting on notifications.
2016-02-15 14:50:16 -08:00
Scott Kyle 23a7c5b88d Don't build JS bundles for the simulator 2016-02-15 14:50:16 -08:00
Scott Kyle 3e1889d342 Merge branch 'master' into sk-listview-merge
* master: (207 commits)
  Convert to using new React Native MainActivity template
  Create RealmReactPackage for our Android plugin
  Fix doc for Android
  NPM ignore react-native/android folder
  Skip building Android module under Xcode
  Skip building Android module for iOS tests
  gitignore Android downloads folder
  Update README with instructions to run on Android
  Use un-patched RN for Android by installing hook into JSC
  cleanup build system
  Use Realm in node_modules for ReactTests on Android
  Change Demo => ReactTests
  adding a 'publishAndroid' task to generate the AAR with prebuilt .so files
  Adjust POM_NAME
  Use consistent package naming
  Remove old Demo files
  Add copyright to JNI file
  Cleanup platform.hpp
  Make our Android module buildable as a dependency
  Add `npm test` command
  ...
2016-02-15 14:49:31 -08:00
Scott Kyle e594087644 Convert to using new React Native MainActivity template
Adjusted the README to reflect the modern way of doing things.
2016-02-12 11:00:46 -08:00
Scott Kyle 6e4b2440ba Create RealmReactPackage for our Android plugin
Also renamed RealmReactAndroid to RealmReactModule to match the convention used by everyone else.
2016-02-12 09:49:11 -08:00
Scott Kyle 415b45be51 Use un-patched RN for Android by installing hook into JSC
This works by installing some assembly into JSGlobalContextCreateInGroup() that will immediately jump out into our own wrapper function so we always can inject the Realm constructor into the context.
2016-02-11 11:14:09 -08:00
Scott Kyle c9c225c107 Use Realm in node_modules for ReactTests on Android 2016-02-10 17:08:01 -08:00
Scott Kyle 881d4a04c3 Change Demo => ReactTests 2016-02-10 17:03:16 -08:00
Nabil Hachicha 7afdbba2ed adding a 'publishAndroid' task to generate the AAR with prebuilt .so files 2016-02-10 16:11:36 -08:00
Scott Kyle c8f925d019 Use consistent package naming 2016-02-09 13:46:09 -08:00
Scott Kyle 8b652adc19 Remove old Demo files 2016-02-09 03:08:56 -08:00
Nabil Hachicha 97345e62a9 unlocking device after the app is installed 2016-02-03 19:00:21 +00:00
Scott Kyle 31db79e29b Remove realm dependency in realm-tests
This caused an error with NPM v3 and was not necessary for us to have.
2016-01-29 00:48:22 -08:00
Scott Kyle 55e67d9bce Update ReactTests Xcode project 2016-01-29 00:48:22 -08:00
Nabil Hachicha 1e4c905cdc Change package name fixes #204 2016-01-28 15:09:36 +00:00
Scott Kyle f957db3a3a Update run-android.sh scripts 2016-01-26 15:16:49 -08:00
Nabil Hachicha 2eb8238101 fixing adb path 2016-01-26 21:01:00 +00:00
Nabil Hachicha fca40ec16f add reverse adb port for physical device 2016-01-26 20:25:00 +00:00
Nabil Hachicha 18cdeaedd5 update test script 2016-01-26 20:23:26 +00:00
Ari Lazier 01c3d80651 merge master 2016-01-22 15:27:17 -08:00
Nabil Hachicha d784d624dd add sdk manager to download build tool for Android 2016-01-22 22:41:07 +00:00
Ari Lazier 2c0a92aa63 ci script 2016-01-22 12:15:38 -08:00
Nabil Hachicha 707ca1d3c3 Merge branch 'al-android-example' of https://github.com/realm/realm-js into al-android-example 2016-01-22 18:06:18 +00:00
Nabil Hachicha d60ed6c15a exporting tests to junit format to be used by jenkins 2016-01-22 18:05:34 +00:00
Ari Lazier b76766eb63 change package/app name from Demo to ReactNative Test App 2016-01-21 14:36:50 -08:00
Ari Lazier a0145df5e4 Merge pull request #202 from realm/sk-example-update
Update ReactExample Xcode Project
2016-01-21 07:28:59 -08:00
Nabil Hachicha bf80fca2c0 Running chrome debug mode request on UI thread + using Facebook SoLoader instead of the Relinker + cleaning dependencies 2016-01-21 13:36:54 +00:00
Scott Kyle 1bb335c587 Merge pull request #197 from realm/sk-react-native-0.18
Update React Tests to support React Native 0.18
2016-01-19 15:12:51 -08:00
Ari Lazier c4d5b9f5cc merge latest object store 2016-01-19 10:51:43 -08:00
Scott Kyle 92df9bff8c Update to React Native 0.18.0 official release 2016-01-18 23:01:14 -08:00
Scott Kyle 79229cbce3 Delete old JS file 2016-01-15 16:39:32 -08:00
Scott Kyle 337f8d7650 Remove realm dependency in realm-tests
This caused an error with NPM v3 and was not necessary for us to have.
2016-01-15 16:24:53 -08:00
Ari Lazier 5f2a51727b merge in build system improvements 2016-01-15 12:46:58 -08:00
Ari Lazier a086955a8c path/name fixes 2016-01-15 12:34:51 -08:00
Ari Lazier c6e46b9856 remove unneded dependencies 2016-01-15 11:49:22 -08:00
Nabil Hachicha 62017c1739 fix example deps
remove unnecessary requires

reduce dependencies for test projects

using the patched Facebook React Native repo as a dependency

remvoe unecessary/duplicate folder

remove unused dir

remove unused gradle tasks + unecessary duplicate deps

more gradle conf/dependencies cleanup
2016-01-15 16:32:48 +00:00
Scott Kyle e4866c5560 Update ReactExample Xcode project
Added libReact as a target dependency since that seemed to workaround a very weird build issue that would come and go.
2016-01-15 01:33:34 -08:00
Scott Kyle 2f1eca4a9c Merge branch 'master' into al-android-example
* master:
  Fix typo in README
  Improve clarity of schema parsing and serialization
  Add test that checks schema validation
  Update README with new Schema API
  Cleanup some code and comments to make it consistent
  Convert tests to create objects with property objects
  Update example apps with new schema API
  Remove confusion between propTypes and objectTypes
  Simplify object schema info returned from RPC
  RPC now keeps object keys in the same order
  Change schema API to take properties as an object
  Add method to clear mutation listeners in RPC client
  Plug small leak from not releasing a JSStringRef
  Make RJSStringForValue use consistent exception style
  Improve error messages inside RJSUtil
2016-01-14 15:39:45 -08:00
Scott Kyle 741cd4ad19 Update ReactExample Xcode project
Added libReact as a target dependency since that seemed to workaround a very weird build issue that would come and go.
2016-01-13 14:34:39 -08:00
Ari Lazier cd6fd2a2e8 merge changes for v0.18-rc 2016-01-13 14:10:57 -08:00
Ari Lazier 63ffc760bd merge latest from master 2016-01-13 12:46:07 -08:00
Ari Lazier 570607fa86 instantiate and make calls to rpc server 2016-01-13 11:07:54 -08:00
Nabil Hachicha 55bde66ef8 adding NanoHTTP server for chrome debug 2016-01-13 17:56:38 +00:00
Ari Lazier 211f0eddd5 improve exception message 2016-01-11 19:42:20 -08:00
Ari Lazier 1c5f22bd4d fix for query tests 2016-01-11 19:32:46 -08:00
Ari Lazier 2c8696ea57 initialize in the right placE 2016-01-11 19:20:33 -08:00
Ari Lazier b562338b0e code cleanup, build script 2016-01-11 09:42:26 -08:00
Ari Lazier 4735a91f8c run tests 2016-01-08 16:33:53 -08:00
Scott Kyle d7f80e22c8 Update React Tests to support React Native 0.18
We had to shift to using an event-based architecture to communicate with the page from native code.
2016-01-07 14:31:04 -08:00