File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/frontend/tests/core/integrations Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,14 @@ withEventDeliveryModes(
4040
4141 await disableInspectPanel ( page ) ;
4242
43- await page
44- . getByTestId ( "popover-anchor-input-api_key" )
45- . fill ( process . env . TAVILY_API_KEY || "" ) ;
43+ // TAVILY_API_KEY is auto-loaded as a global variable from the
44+ // environment (see VARIABLES_TO_GET_FROM_ENVIRONMENT in constants.py).
45+ // When loaded, the input is replaced by a badge and fill() would fail.
46+ // Only fill manually when the input is still present.
47+ const tavilyApiKeyInput = page . getByTestId ( "popover-anchor-input-api_key" ) ;
48+ if ( ( await tavilyApiKeyInput . count ( ) ) > 0 ) {
49+ await tavilyApiKeyInput . fill ( process . env . TAVILY_API_KEY || "" ) ;
50+ }
4651
4752 await unselectNodes ( page ) ;
4853
You can’t perform that action at this time.
0 commit comments