diff --git a/gherkin/contextEnrichment.feature b/gherkin/contextEnrichment.feature new file mode 100644 index 0000000..95ec8f5 --- /dev/null +++ b/gherkin/contextEnrichment.feature @@ -0,0 +1,49 @@ +@contextEnrichment +Feature: Context Enrichment + + Background: + And a stable flagd provider + + @in-process @rpc + Scenario: Use enriched context + Given a String-flag with key "flagd-context-aware" and a default value "not" + When the flag was evaluated with details + Then the resolved details value should be "INTERNAL" + + @grace @in-process + Scenario: Use enriched context on connection error for IN-PROCESS + Given a String-flag with key "flagd-context-aware" and a default value "not" + And a stale event handler + And a ready event handler + When the flag was evaluated with details + Then the resolved details value should be "INTERNAL" + When the connection is lost for 6s + And a stale event was fired + When the flag was evaluated with details + Then the resolved details value should be "INTERNAL" + When a ready event was fired + + @grace @rpc + Scenario: Use enriched context on connection error for RPC + Given a String-flag with key "flagd-context-aware" and a default value "not" + And a stale event handler + And a ready event handler + When the flag was evaluated with details + Then the resolved details value should be "INTERNAL" + When the connection is lost for 6s + And a stale event was fired + When the flag was evaluated with details + Then the resolved details value should be "not" + When a ready event was fired + + @rpc @caching + Scenario: Use enriched context on RPC connection will not cache the value + Given a String-flag with key "flagd-context-aware" and a default value "not" + And a change event handler + And a ready event handler + When the flag was modified + And a change event was fired + And the flag was evaluated with details + Then the reason should be "TARGETING_MATCH" + When the flag was evaluated with details + Then the reason should be "TARGETING_MATCH" diff --git a/gherkin/targeting.feature b/gherkin/targeting.feature index 0499558..17411ed 100644 --- a/gherkin/targeting.feature +++ b/gherkin/targeting.feature @@ -144,20 +144,3 @@ Feature: Targeting rules | missing-variant-targeting-flag | 3 | | non-string-variant-targeting-flag | 2 | | empty-targeting-flag | 1 | - - @contextEnrichment - Scenario: Use enriched context - Given a String-flag with key "flagd-context-aware" and a default value "not" - When the flag was evaluated with details - Then the resolved details value should be "INTERNAL" - - @contextEnrichment @grace - Scenario: Use enriched context on connection error - Given a String-flag with key "flagd-context-aware" and a default value "not" - And a stale event handler - When the flag was evaluated with details - Then the resolved details value should be "INTERNAL" - When the connection is lost for 6s - And a stale event was fired - When the flag was evaluated with details - Then the resolved details value should be "INTERNAL"