-
Notifications
You must be signed in to change notification settings - Fork 20
feat(OptimizelyConfig): Add new fields to OptimizelyConfig #266
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
98dcba5
Added new Optimizely config fields
mnoman09 41e684b
Added delivery rules
mnoman09 c6ad489
Added optimizelyAudience and rollout featureVariables fix
mnoman09 9973794
Added new line at end
mnoman09 665c553
Added audiences and fixed tests
mnoman09 3c04342
Net 3.5 deserializing fix
mnoman09 1c0bf1a
Used string builder instead of string
mnoman09 ef6218b
Added OptimizelyProjectConfigTest file in tests
mnoman09 9fc9d54
Moved getEvent After GetFeaturesMap
mnoman09 53fbc69
Resolved comments and refactored logic
mnoman09 c8ccfca
Fixed space was added before NOT condition in audiences
mnoman09 b85ae86
Resolved comments
mnoman09 22a2039
Resolved unitTest issue
mnoman09 9ace97f
removed two additional tests for testing
mnoman09 621e62c
Merge branch 'master' into mnoman/optimizelyConfigNewFields
mnoman09 ce2505b
Audience array merge fix Unit test fix
mnoman09 b362593
Condition simplified
mnoman09 cb47e3c
Added OptimizelyEvent and OptimizelyAttribute Class
mnoman09 8ba7fe5
Added $opt_dummy_audience in datafile to verify that it is getting ig…
mnoman09 62ed97f
Added serializedAudiences Tests cases
mnoman09 c685c61
refactored little bit.
msohailhussain 7351048
Refactored comments
mnoman09 f1e684f
added unit tests for multiple experiment and removed sdk and env key.
msohailhussain b5d3383
Setting sdkKey and environment key default value as empty string
mnoman09 1e9d40f
fixed sorting issue
msohailhussain 6a8dafa
corrected sequence of audiences
msohailhussain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
369 changes: 308 additions & 61 deletions
369
OptimizelySDK.Tests/OptimizelyConfigTests/OptimizelyConfigTest.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{ | ||
"version": "4", | ||
"rollouts": [], | ||
"typedAudiences": [ | ||
{ | ||
"id": "20415611520", | ||
"conditions": [ | ||
"and", | ||
[ | ||
"or", | ||
[ | ||
"or", | ||
{ | ||
"value": true, | ||
"type": "custom_attribute", | ||
"name": "hiddenLiveEnabled", | ||
"match": "exact" | ||
} | ||
] | ||
] | ||
], | ||
"name": "test1" | ||
}, | ||
{ | ||
"id": "20406066925", | ||
"conditions": [ | ||
"and", | ||
[ | ||
"or", | ||
[ | ||
"or", | ||
{ | ||
"value": false, | ||
"type": "custom_attribute", | ||
"name": "hiddenLiveEnabled", | ||
"match": "exact" | ||
} | ||
] | ||
] | ||
], | ||
"name": "test2" | ||
} | ||
], | ||
"anonymizeIP": true, | ||
"projectId": "20430981610", | ||
"variables": [], | ||
"featureFlags": [ | ||
{ | ||
"experimentIds": ["9300000007569"], | ||
"rolloutId": "", | ||
"variables": [], | ||
"id": "3045", | ||
"key": "flag1" | ||
}, | ||
{ | ||
"experimentIds": ["9300000007573"], | ||
"rolloutId": "", | ||
"variables": [], | ||
"id": "3046", | ||
"key": "flag2" | ||
} | ||
], | ||
"experiments": [ | ||
{ | ||
"status": "Running", | ||
"audienceConditions": ["or", "20415611520"], | ||
"audienceIds": ["20415611520"], | ||
"variations": [ | ||
{ | ||
"variables": [], | ||
"id": "8045", | ||
"key": "variation1", | ||
"featureEnabled": true | ||
} | ||
], | ||
"forcedVariations": {}, | ||
"key": "targeted_delivery", | ||
"layerId": "9300000007569", | ||
"trafficAllocation": [{ "entityId": "8045", "endOfRange": 10000 }], | ||
"id": "9300000007569" | ||
}, | ||
{ | ||
"status": "Running", | ||
"audienceConditions": ["or", "20406066925"], | ||
"audienceIds": ["20406066925"], | ||
"variations": [ | ||
{ | ||
"variables": [], | ||
"id": "8048", | ||
"key": "variation2", | ||
"featureEnabled": true | ||
} | ||
], | ||
"forcedVariations": {}, | ||
"key": "targeted_delivery", | ||
"layerId": "9300000007573", | ||
"trafficAllocation": [{ "entityId": "8048", "endOfRange": 10000 }], | ||
"id": "9300000007573" | ||
} | ||
], | ||
"audiences": [ | ||
{ | ||
"id": "20415611520", | ||
"conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", | ||
"name": "test1" | ||
}, | ||
{ | ||
"id": "20406066925", | ||
"conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", | ||
"name": "test2" | ||
}, | ||
{ | ||
"conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", | ||
"id": "$opt_dummy_audience", | ||
"name": "Optimizely-Generated Audience for Backwards Compatibility" | ||
} | ||
], | ||
"groups": [], | ||
"attributes": [{ "id": "20408641883", "key": "hiddenLiveEnabled" }], | ||
"botFiltering": false, | ||
"accountId": "17882702980", | ||
"events": [], | ||
"revision": "25", | ||
"sendFlagDecisions": true | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.