-
Notifications
You must be signed in to change notification settings - Fork 263
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
[Bug] Some pending properties can be sent to new user incorrectly, when users change #1418
Commits on Apr 29, 2024
-
remove properties model reference from Update User request
* We don't need the reference to the property model for an Update User request, and this reference has gone unused so far * We don't hydrate from the response as the response is not the full user, just the property that was updated. * The request still has a reference to the identity model it is operating on
Configuration menu - View commit details
-
Copy full SHA for c2be80a - Browse repository at this point
Copy the full SHA c2be80aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f062013 - Browse repository at this point
Copy the full SHA f062013View commit details -
[tests] add waiting for background threads to run
* OneSignalCoreMocks now has XCTest dependency * It uses a waiter to allow the test to wait for any async calls to run, because we don't have control over all threads. For example, a test may need to wait for operation repo to run everything in the dispatch queue
Configuration menu - View commit details
-
Copy full SHA for f9ce88e - Browse repository at this point
Copy the full SHA f9ce88eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ab2abe - Browse repository at this point
Copy the full SHA 7ab2abeView commit details -
[tests] extend NSDictionary for testing
* We will need to know if a particular payload exists in a dictionary to confirm what requests are sending
Configuration menu - View commit details
-
Copy full SHA for 9caff5c - Browse repository at this point
Copy the full SHA 9caff5cView commit details -
[tests] add assert helpers to Mock Client
* Adds additional property to track if all requests have been handled by mock responses set * Adds method to use in asserts to confirm if there is only one executed request that contains the payload provided, and the url matches the path provided.f
Configuration menu - View commit details
-
Copy full SHA for f235b8b - Browse repository at this point
Copy the full SHA f235b8bView commit details -
[tests] update schemes for testing
* Change OneSignalUserTests build configs to "Test" * Add OS_TEST preprocessor macro (Test) to OneSignalOSCore which is needed for the reduced flush interval
Configuration menu - View commit details
-
Copy full SHA for bde68d1 - Browse repository at this point
Copy the full SHA bde68d1View commit details -
[tests] Add test for switching users with adding tags
* Starts with anon user, log into 2 users via Identify User and Create User * Add tags to each user
Configuration menu - View commit details
-
Copy full SHA for b89b243 - Browse repository at this point
Copy the full SHA b89b243View commit details -
Add Identity Model ID to Deltas to track which user
* The model on a Delta for property change is the properties model. However, the identity is needed to send the request. * We have been setting the identity model as the current user's when these Deltas become Requests. * However, the timing can be buggy when we flush Deltas when users change. The Operation Repo and Property Executor use a dispatch queue so by the time the request is made, the user may have changed.
Configuration menu - View commit details
-
Copy full SHA for 88e31f5 - Browse repository at this point
Copy the full SHA 88e31f5View commit details -
Have an Identity Model Repo for models still being used
* Introduce OSIdentityModelRepo managed by the User Manager where a dictionary of identity models live * This will hold identity models added when users change * When requests are uncached, their identity models will also be added as they are still being used. * This is a lightweight option over modifying the Identity Model Store (which is an option if we wish to use the model store to manage all identity models)
Configuration menu - View commit details
-
Copy full SHA for f9cf364 - Browse repository at this point
Copy the full SHA f9cf364View commit details -
Uncaching in executors will use the Identity Model Repo
* When Requests are uncached in the executors, hook them up to the same identity model instance via the Identity Model Repo
Configuration menu - View commit details
-
Copy full SHA for a0df196 - Browse repository at this point
Copy the full SHA a0df196View commit details -
Configuration menu - View commit details
-
Copy full SHA for 975076e - Browse repository at this point
Copy the full SHA 975076eView commit details -
[tests] add more to reset User Manager state between tests
* Also move its reset methods into an extension
Configuration menu - View commit details
-
Copy full SHA for ef9d2c6 - Browse repository at this point
Copy the full SHA ef9d2c6View commit details