6
6
} from "../../test-isolation-helper" ;
7
7
import { AgenticChatPage } from "../../pages/agnoPages/AgenticChatPage" ;
8
8
9
+ const appleAsk = "What is the current stock price of AAPL? Please respond in the format of 'The current stock price of Apple Inc. (AAPL) is {{price}}'"
10
+
9
11
test ( "[Agno] Agentic Chat sends and receives a greeting message" , async ( {
10
12
page,
11
13
} ) => {
@@ -40,8 +42,8 @@ test("[Agno] Agentic Chat provides stock price information", async ({
40
42
await chat . agentGreeting . waitFor ( { state : "visible" } ) ;
41
43
42
44
// Ask for AAPL stock price
43
- await chat . sendMessage ( "What is the current stock price of AAPL" ) ;
44
- await chat . assertUserMessageVisible ( "What is the current stock price of AAPL" ) ;
45
+ await chat . sendMessage ( appleAsk ) ;
46
+ await chat . assertUserMessageVisible ( appleAsk ) ;
45
47
await waitForAIResponse ( page ) ;
46
48
47
49
// Check if the response contains the expected stock price information
@@ -63,8 +65,8 @@ test("[Agno] Agentic Chat retains memory of previous questions", async ({
63
65
64
66
// First question
65
67
await chat . sendMessage ( "Hi" ) ;
66
- await chat . sendMessage ( "What is the current stock price of AAPL" ) ;
67
- await chat . assertUserMessageVisible ( "What is the current stock price of AAPL" ) ;
68
+ await chat . sendMessage ( appleAsk ) ;
69
+ await chat . assertUserMessageVisible ( appleAsk ) ;
68
70
await waitForAIResponse ( page ) ;
69
71
await chat . assertAgentReplyContains ( "The current stock price of Apple Inc. (AAPL) is" ) ;
70
72
0 commit comments