228 Commits

Author SHA1 Message Date
Radu Tutueanu
be584856eb Increase timeout to 3s 2017-02-08 16:35:36 +01:00
Radu Tutueanu
f19fd3e5dd Increase bind timeout 2017-02-08 13:52:26 +01:00
Yavor Georgiev
7c1dab7079 Propagate token refresh errors to the session error handler (#843)
* Get a session’s error handler

* Change the signature of all methods to add the callee

* Deserialize rpc callbacks

* Expose the session error handle on its config property

* When a token refresh error occurs and there is a session error handler

propagate the error to the handler
2017-02-07 11:01:26 +01:00
Yavor Georgiev
b2da398559 Fix token refresh and session bugs in chrome debugging (#831) 2017-02-01 23:44:56 +01:00
Yavor Georgiev
9d1d970b1f Sync Session API (#825)
* Add Session class and expose it to JS

* Add error property on the sync config object for the event handler

* tests

* refactor access token refresh

* chrome debugging
2017-02-01 14:18:59 +01:00
Yavor Georgiev
408f5588f8 Add Permissions models and User Management Realm API (#824)
* Add Permissions models and User Management Realm API

* docs and changelog

* fix bad merge

* add test

* fix jsdoc annotation

* rename permissions to management schema
2017-01-31 22:56:09 +01:00
Kristian Dupont
0c9c5ac407 Add missing chrome debugging apis for Sync.User (#801)
* Add user tests

* Add Sync member to Realm

* Add a simple test for addListener

* Introduce browser User class

* Introduce Sync.User proxy

* Fix User.all

* Add User.logout

* Remove some console.log statements

* Update rpc.cpp from tests-folder

* Use user.current from user-methods, not cpp

* remove user.current from two missing places

* Start server in realmjs and react tests

* Add user tests

* Add Sync member to Realm

* Add a simple test for addListener

* Introduce browser User class

* Introduce Sync.User proxy

* Fix User.all

* Add User.logout

* Remove some console.log statements

* Update rpc.cpp from tests-folder

* Use user.current from user-methods, not cpp

* remove user.current from two missing places

* Start server in realmjs and react tests

* Replace needle with node-fetch

* Make AuthError work in the browser

* Allow for persistent callbacks

* Expose _authenticateRealm to native

* Use clear_test_state in roc

* Streamline test inclusion

* Fix login tests

* Promisify testLogin()

* Disable AsyncTests for now

* Mode jasmine timeout to spec/unit_tests.js

* Avoid use of global for fetch module

* Only include user-tests is sync is enabled

* Skip ROS for android tests

* Add some comments about persistent callbacks

* Fix results-test

* Run async-tests in node

* Add a comment about (user object)

* Cache all users in User.current and return promises in fetch

* node_require async-tests so RN doesn't try and package them

* Add missing parenthesis
2017-01-31 14:07:29 +01:00
Kristian Dupont
bd8a27b963 Improve error message for typeerrors (#785)
* Add a test

* Catch TypeErrorException

* Make exception asserts check error type

* Remove commented-out testcase and check for error type

* Test for Error, not TypeError
2017-01-10 13:41:56 +01:00
Mark Rowe
9d858d0329 Update to object store master to pick up the fix for the global notifier. (#778) 2017-01-05 11:56:11 +01:00
Kristian Dupont
4dc0403c58 Make eslint happy 2016-12-29 10:53:51 +01:00
Nabil Hachicha
914866beff Nh/fix 753 (#755)
* Fix Android compilation (Using  EPOLL commit helper)

* Fixe Symbol.iterator on Android

* Fixing testSchema test for Release
2016-12-28 17:16:37 +01:00
Nabil Hachicha
43dabf5cbd Nh/symbol iterator android (#732)
* Fix Symbol.iterator on Android
2016-12-20 18:56:51 +00:00
Kristian Dupont
c1e7ddcda1 Throw when deleting detached object (#694)
* Throw when deleting detached object

* Update error message

* Add user file

* Throw when deleting detached object

* Update error message

* Revert "Add user file"

This reverts commit 2948f4cfc2dfd2d5d75594307b1e89806b817eb7.
2016-12-20 16:28:02 +01:00
Radu Tutueanu
d7c44fa7e9 Use mockery in tests to setup the realm module path(#727)
* Use mockery to set up the realm module path

* Use the right path

* Add mockery to devDependencies

* Remove unnecessary symbolic link
2016-12-09 09:05:15 +01:00
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
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
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
d229cd6130 throw exception when trying to open a realm with an invalid user 2016-11-11 00:14:52 -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
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
Søren Vind
164ea8ec79 Port over remaining tests for Realm.Sync.User 2016-11-10 10:35:36 -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
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
9d0df0de3d Sync and fine grained notifications 2016-10-04 15:07:14 -07:00
Marius Rackwitz
9d25435105 [Tests] Stop using Realm.Types 2016-08-04 10:10:28 -07:00
Scott Kyle
17e7153a59 Very basic multiprocess change notification test 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
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
cd0bb079b7 Implement objectForPrimaryKey() method
Resolves #328
2016-06-03 16:51:32 -07:00
Scott Kyle
af70bb3c63 Fix all linting issues inside JS tests 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