Skip to content
Merged
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
98 changes: 98 additions & 0 deletions specifications/17-dependent-features.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,60 @@
},
"variants": []
}]
},
{
"name": "parent.with.constraint.child.expects.disabled",
"description": "The parent is enabled and has a constraint. The child expects the parent to be disabled.",
"enabled": true,
"dependencies": [{
"feature": "parent.with.constraint",
"enabled": false
}],
"strategies": [{
"name": "flexibleRollout",
"parameters": {
"rollout": "100",
"stickiness": "default",
"groupId": "groupId"
},
"variants": [
{
"name": "child.variant",
"weight": 1,
"payload": {
"type": "string",
"value": "variantValue"
}
}
]
}]
},
{
"name": "parent.with.constraint.child.expects.disabled.variant",
"description": "The parent is enabled and has a constraint. The child expects the parent's variant to be \"disabled\".",
"enabled": true,
"dependencies": [{
"feature": "parent.with.constraint",
"variants": ["disabled"]
}],
"strategies": [{
"name": "flexibleRollout",
"parameters": {
"rollout": "100",
"stickiness": "default",
"groupId": "groupId"
},
"variants": [
{
"name": "child.variant",
"weight": 1,
"payload": {
"type": "string",
"value": "variantValue"
}
}
]
}]
}
]
},
Expand Down Expand Up @@ -780,6 +834,22 @@
"context": {},
"toggleName": "parent.disabled.child.expects.disabled.variant",
"expectedResult": false
},
{
"description": "Child is enabled if the parent is expected to be disabled and the parent's constraint does not match.",
"context": {
"environment": "dev"
},
"toggleName": "parent.with.constraint.child.expects.disabled",
"expectedResult": true
},
{
"description": "Child is disabled when it requires the parent's variant to be \"disabled\" and the parent is off because its constraint does not match.",
"context": {
"environment": "dev"
},
"toggleName": "parent.with.constraint.child.expects.disabled.variant",
"expectedResult": false
}
],
"variantTests": [
Expand Down Expand Up @@ -1012,6 +1082,34 @@
"enabled": true,
"feature_enabled": true
}
},
{
"description": "Child yields its variant when the parent is expected to be disabled and the parent's constraint does not match.",
"context": {
"environment": "dev"
},
"toggleName": "parent.with.constraint.child.expects.disabled",
"expectedResult": {
"name": "child.variant",
"payload": {
"type": "string",
"value": "variantValue"
},
"enabled": true,
"feature_enabled": true
}
},
{
"description": "Child yields a disabled variant when it requires the parent's variant to be \"disabled\" and the parent is off because its constraint does not match.",
"context": {
"environment": "dev"
},
"toggleName": "parent.with.constraint.child.expects.disabled.variant",
"expectedResult": {
"name": "disabled",
"enabled": false,
"feature_enabled": false
}
}
]
}
Loading