From 45eff83a8ad5b9936d6a787b42863a6476516b5c Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Tue, 21 May 2024 13:40:14 +0200 Subject: [PATCH] test: fix flaky lifecycle test (#7093) --- .../features/feature-lifecycle/feature-lifecycle.e2e.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/features/feature-lifecycle/feature-lifecycle.e2e.test.ts b/src/lib/features/feature-lifecycle/feature-lifecycle.e2e.test.ts index 5d15fd25ff..56d05cb8e7 100644 --- a/src/lib/features/feature-lifecycle/feature-lifecycle.e2e.test.ts +++ b/src/lib/features/feature-lifecycle/feature-lifecycle.e2e.test.ts @@ -98,7 +98,8 @@ const uncompleteFeature = async (featureName: string, expectedCode = 200) => { function reachedStage(feature: string, stage: StageName) { return new Promise((resolve) => featureLifecycleService.on(STAGE_ENTERED, (event) => { - if (event.stage === stage) resolve(stage); + if (event.stage === stage && event.feature === feature) + resolve(stage); }), ); }