File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 166166 ]
167167 }
168168 },
169+ "fractional-as-condition-flag" : {
170+ "state" : " ENABLED" ,
171+ "variants" : {
172+ "big" : " hundreds" ,
173+ "small" : " ones" ,
174+ "fallback" : " zero"
175+ },
176+ "defaultVariant" : " fallback" ,
177+ "targeting" : {
178+ "if" : [
179+ {
180+ "fractional" : [
181+ [ false , 0 ],
182+ [ true , 100 ]
183+ ]
184+ },
185+ " big" , " small"
186+ ]
187+ }
188+ },
169189 "starts-ends-flag" : {
170190 "state" : " ENABLED" ,
171191 "variants" : {
Original file line number Diff line number Diff line change @@ -186,6 +186,13 @@ Feature: Targeting rules
186186 | user1 | premium | red |
187187 | user1 | basic | blue |
188188
189+ @fractional @fractional-nested
190+ Scenario : Fractional as condition
191+ Given a String-flag with key "fractional-as-condition-flag" and a default value "zero"
192+ And a context containing a targeting key with value "some-targeting-key"
193+ When the flag was evaluated with details
194+ Then the resolved details value should be "hundreds"
195+
189196 @string
190197 Scenario Outline : Substring operators
191198 Given a String-flag with key "starts-ends-flag" and a default value "fallback"
You can’t perform that action at this time.
0 commit comments