Skip to content

Commit e246925

Browse files
committed
fix(e2e): handle dynamic parameters in fillParameters function
With dynamic parameters now being the default, parameters with default values may not be visible in the UI. The fillParameters function now checks if a parameter field exists before trying to interact with it, allowing tests to work with both classic and dynamic parameter flows. Fixes the failing e2e test 'update workspace with ephemeral parameter enabled'.
1 parent c4f4fe5 commit e246925

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

site/e2e/helpers.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,19 @@ const fillParameters = async (
898898
);
899899
}
900900

901+
// In dynamic parameter flow, parameters with default values may not be visible
902+
// Check if the parameter field exists before trying to interact with it
903+
const parameterSelector = `[data-testid='parameter-field-${richParameter.name}']`;
904+
const parameterExists = await page.locator(parameterSelector).count() > 0;
905+
906+
if (!parameterExists) {
907+
// Parameter is not visible (likely due to dynamic parameter flow)
908+
// This is expected behavior when the parameter has a default value
909+
continue;
910+
}
911+
901912
const parameterLabel = await page.waitForSelector(
902-
`[data-testid='parameter-field-${richParameter.name}']`,
913+
parameterSelector,
903914
{ state: "visible" },
904915
);
905916

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy