From 4792e569f050ef3c556558b131d9b15dc929363e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 8 Apr 2025 10:13:03 -0300 Subject: [PATCH] tests: add "direct" event delivery method in tests (#7436) * feat: implement direct event delivery method on the frontend - Updated buildFlow function to include eventDelivery parameter, allowing for "direct" event delivery mode. - Modified NodeStatus and IOModal components to utilize the new eventDelivery setting. - Expanded flowStore and buildUtils to support event delivery options, improving flexibility in event handling. - Added "direct" option to event delivery types in enums for better configurability. - Updated tests to cover new event delivery modes. * Update src/frontend/src/controllers/API/api.tsx * Update src/frontend/src/utils/buildUtils.ts * refactor: remove "direct" from event delivery modes in tests - Updated the event delivery modes in the withEventDeliveryModes utility to exclude "direct", aligning with recent changes in event handling behavior. - This change simplifies the testing setup and ensures consistency with the current application logic. * feat: add "direct" to event delivery modes in tests - Expanded the event delivery modes in the withEventDeliveryModes utility to include "direct", enhancing the testing coverage for this delivery method. - This update ensures that tests reflect the latest event handling capabilities and improves the robustness of the testing framework. --------- Co-authored-by: Cristhian Zanforlin Lousa --- src/frontend/tests/utils/withEventDeliveryModes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/tests/utils/withEventDeliveryModes.ts b/src/frontend/tests/utils/withEventDeliveryModes.ts index 85b95c542..b791b28aa 100644 --- a/src/frontend/tests/utils/withEventDeliveryModes.ts +++ b/src/frontend/tests/utils/withEventDeliveryModes.ts @@ -17,7 +17,7 @@ export function withEventDeliveryModes( testFn: TestFunction, { timeout = 10000 }: { timeout?: number } = {}, ) { - const eventDeliveryModes = ["streaming", "polling"] as const; + const eventDeliveryModes = ["streaming", "polling", "direct"] as const; for (const [index, eventDelivery] of eventDeliveryModes.entries()) { test(`${title} - ${eventDelivery}`, config, async ({ page }) => {