From c2b068e28f40b0f65ef03ecdc2a0edb01b61440e Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Thu, 14 Sep 2023 13:23:11 +0200 Subject: [PATCH] fix: include strategy variants in the event log (#4716) --- src/lib/services/feature-toggle-service.ts | 2 ++ src/test/e2e/services/feature-toggle-service-v2.e2e.test.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/lib/services/feature-toggle-service.ts b/src/lib/services/feature-toggle-service.ts index 9fdd59d049..fee121e1af 100644 --- a/src/lib/services/feature-toggle-service.ts +++ b/src/lib/services/feature-toggle-service.ts @@ -409,6 +409,7 @@ class FeatureToggleService { disabled: featureStrategy.disabled, constraints: featureStrategy.constraints || [], parameters: featureStrategy.parameters, + variants: featureStrategy.variants || [], sortOrder: featureStrategy.sortOrder, segments: segments.map((segment) => segment.id) ?? [], }; @@ -1285,6 +1286,7 @@ class FeatureToggleService { name: strategy.strategyName, constraints: strategy.constraints || [], parameters: strategy.parameters, + variants: strategy.variants || [], segments: [], title: strategy.title, disabled: strategy.disabled, diff --git a/src/test/e2e/services/feature-toggle-service-v2.e2e.test.ts b/src/test/e2e/services/feature-toggle-service-v2.e2e.test.ts index 6e47e6cfeb..ecfbfa72c5 100644 --- a/src/test/e2e/services/feature-toggle-service-v2.e2e.test.ts +++ b/src/test/e2e/services/feature-toggle-service-v2.e2e.test.ts @@ -145,6 +145,7 @@ test('Should be able to get strategy by id', async () => { const config: Omit = { name: 'default', constraints: [], + variants: [], parameters: {}, title: 'some-title', };