Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Given: A segment with IN condition using comma-delimited floats
// When: An evaluation context with an identity that has a float trait matching one of the comma-delimited float values
// Then: The context should be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "float_comma_delim_user",
"key": "key_float_comma_delim_user",
"traits": {
"score": 2.0
}
},
"segments": {
"34": {
"key": "34",
"name": "segment_float_comma_delimited",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "score",
"value": "1.0,2.0,3.0,4.0"
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": [
{
"name": "segment_float_comma_delimited"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Given: A segment with IN condition using comma-delimited integers
// When: An evaluation context with an identity that has a float trait that does not match any of the comma-delimited integer values
// Then: The context should not be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "float_comma_delim_int_user",
"key": "key_float_comma_delim_int_user",
"traits": {
"score": 2.0
}
},
"segments": {
"36": {
"key": "36",
"name": "segment_float_comma_delimited_int_mismatch",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "score",
"value": "1,2,3,4"
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Given: A segment with IN condition using an array of floats
// When: An evaluation context with an identity that has a float trait matching one of the array values
// Then: The context should be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "float_array_user",
"key": "key_float_array_user",
"traits": {
"score": 2.0
}
},
"segments": {
"30": {
"key": "30",
"name": "segment_float_array",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "score",
"value": [
"1.0",
"2.0",
"3.0",
"4.0"
]
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": [
{
"name": "segment_float_array"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
// Given: A segment with IN condition using an array of integers
// When: An evaluation context with an identity that has a float trait that does not match any of the integer array values
// Then: The context should not be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "float_int_array_user",
"key": "key_float_int_array_user",
"traits": {
"score": 2.0
}
},
"segments": {
"32": {
"key": "32",
"name": "segment_float_int_array_mismatch",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "score",
"value": [
"1",
"2",
"3",
"4"
]
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Given: A segment with IN condition using JSON-encoded array of floats
// When: An evaluation context with an identity that has a float trait matching one of the JSON-encoded float values
// Then: The context should be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "float_json_array_user",
"key": "key_float_json_array_user",
"traits": {
"score": 2.0
}
},
"segments": {
"38": {
"key": "38",
"name": "segment_float_json_encoded",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "score",
"value": "[1.0,2.0,3.0,4.0]"
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": [
{
"name": "segment_float_json_encoded"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Given: A segment with IN condition using JSON-encoded array of integers
// When: An evaluation context with an identity that has a float trait that does not match any of the JSON-encoded integer values
// Then: The context should not be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "float_json_int_array_user",
"key": "key_float_json_int_array_user",
"traits": {
"score": 2.0
}
},
"segments": {
"40": {
"key": "40",
"name": "segment_float_json_encoded_int_mismatch",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "score",
"value": "[1,2,3,4]"
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Given: A segment with IN condition using comma-delimited floats
// When: An evaluation context with an identity that has an integer trait that does not match any of the comma-delimited float values
// Then: The context should not be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "int_comma_delim_float_user",
"key": "key_int_comma_delim_float_user",
"traits": {
"level": 2
}
},
"segments": {
"37": {
"key": "37",
"name": "segment_int_comma_delimited_float_mismatch",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "level",
"value": "1.0,2.0,3.0,4.0"
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Given: A segment with IN condition using comma-delimited integers
// When: An evaluation context with an identity that has an integer trait matching one of the comma-delimited integer values
// Then: The context should be considered part of the segment
"$schema": "https://raw.githubusercontent.com/Flagsmith/engine-test-data/refs/tags/v2.0.0/schema.json",
"context": {
"environment": {
"key": "key",
"name": "Environment"
},
"identity": {
"identifier": "int_comma_delim_user",
"key": "key_int_comma_delim_user",
"traits": {
"level": 2
}
},
"segments": {
"35": {
"key": "35",
"name": "segment_int_comma_delimited",
"rules": [
{
"type": "ALL",
"conditions": [
{
"operator": "IN",
"property": "level",
"value": "1,2,3,4"
}
]
}
]
}
}
},
"result": {
"flags": {},
"segments": [
{
"name": "segment_int_comma_delimited"
}
]
}
}
Loading