Skip to content

Commit c32f8bd

Browse files
Modify testing
Signed-off-by: Luis Valdes <[email protected]>
1 parent 5474e4e commit c32f8bd

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

typescript-sdk/apps/dojo/e2e/featurePages/ToolBaseGenUIPage.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,17 @@ export class ToolBaseGenUIPage {
7373
}
7474

7575
async extractMainDisplayHaikuContent(page: Page): Promise<string> {
76+
// Wait for the main haiku display to be visible
77+
await page.waitForSelector('[data-testid="main-haiku-display"]', { state: 'visible' });
78+
7679
const mainDisplayLines = page.locator('[data-testid="main-haiku-line"]');
80+
81+
// Wait for at least 3 haiku lines to be present
82+
await page.waitForFunction(() => {
83+
const elements = document.querySelectorAll('[data-testid="main-haiku-line"]');
84+
return elements.length >= 3;
85+
});
86+
7787
const mainCount = await mainDisplayLines.count();
7888
const lines: string[] = [];
7989

typescript-sdk/integrations/langgraph/examples/python/agents/agentic_chat/agent.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,13 @@
1414
from langgraph.types import Command
1515
from langchain_core.tools import tool
1616

17+
1718
class AgentState(MessagesState):
1819
"""
1920
State of our graph.
2021
"""
2122
tools: List[Any] = []
2223

23-
@tool
24-
def change_background(background: str) -> str: # pylint: disable=unused-argument
25-
"""
26-
Change the background color of the chat. Can be anything that the CSS background attribute accepts. Regular colors, linear of radial gradients etc.
27-
28-
Args:
29-
background: str: The background color to change to. Can be anything that the CSS background attribute accepts. Regular colors, linear of radial gradients etc.
30-
""" # pylint: disable=line-too-long
3124

3225
async def chat_node(state: AgentState, config: Optional[RunnableConfig] = None):
3326
"""
@@ -52,7 +45,6 @@ async def chat_node(state: AgentState, config: Optional[RunnableConfig] = None):
5245
model_with_tools = model.bind_tools(
5346
[
5447
*state.get("tools", []),
55-
change_background,
5648
# your_tool_here
5749
],
5850

0 commit comments

Comments
 (0)