Skip to content

Commit 72b4560

Browse files
committed
chore: revert several test changes
1 parent a01024d commit 72b4560

File tree

13 files changed

+44
-1
lines changed

13 files changed

+44
-1
lines changed

typescript-sdk/apps/dojo/e2e/pages/langGraphFastAPIPages/AgenticChatPage.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Page, Locator, expect } from "@playwright/test";
22

33
export class AgenticChatPage {
44
readonly page: Page;
5+
readonly openChatButton: Locator;
56
readonly agentGreeting: Locator;
67
readonly chatInput: Locator;
78
readonly sendButton: Locator;
@@ -11,6 +12,9 @@ export class AgenticChatPage {
1112

1213
constructor(page: Page) {
1314
this.page = page;
15+
this.openChatButton = page.getByRole("button", {
16+
name: /chat/i,
17+
});
1418
this.agentGreeting = page
1519
.getByText("Hi, I'm an agent. Want to chat?");
1620
this.chatInput = page
@@ -32,6 +36,14 @@ export class AgenticChatPage {
3236
.locator(".copilotKitUserMessage");
3337
}
3438

39+
async openChat() {
40+
try {
41+
await this.openChatButton.click({ timeout: 3000 });
42+
} catch (error) {
43+
// Chat might already be open
44+
}
45+
}
46+
3547
async sendMessage(message: string) {
3648
await this.chatInput.click();
3749
await this.chatInput.fill(message);

typescript-sdk/apps/dojo/e2e/tests/agnoTests/agenticChatPage.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[Agno] Agentic Chat sends and receives a greeting message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi");
2122

@@ -35,6 +36,7 @@ test("[Agno] Agentic Chat provides stock price information", async ({
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Ask for AAPL stock price
@@ -56,6 +58,7 @@ test("[Agno] Agentic Chat retains memory of previous questions", async ({
5658
);
5759

5860
const chat = new AgenticChatPage(page);
61+
await chat.openChat();
5962
await chat.agentGreeting.waitFor({ state: "visible" });
6063

6164
// First question
@@ -84,6 +87,7 @@ test("[Agno] Agentic Chat retains memory of user messages during a conversation"
8487
);
8588

8689
const chat = new AgenticChatPage(page);
90+
await chat.openChat();
8791
await chat.agentGreeting.click();
8892

8993
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/crewAITests/agenticChatPage.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[CrewAI] Agentic Chat sends and receives a message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi, I am duaa");
2122

@@ -35,6 +36,7 @@ test.fixme("[CrewAI] Agentic Chat changes background on message and reset", asyn
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Store initial background color
@@ -81,6 +83,7 @@ test("[CrewAI] Agentic Chat retains memory of user messages during a conversatio
8183
);
8284

8385
const chat = new AgenticChatPage(page);
86+
await chat.openChat();
8487
await chat.agentGreeting.click();
8588

8689
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/langgraphFastAPITests/agenticChatPage.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[LangGraph FastAPI] Agentic Chat sends and receives a message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi, I am duaa");
2122

@@ -35,6 +36,7 @@ test("[LangGraph FastAPI] Agentic Chat changes background on message and reset",
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Store initial background color
@@ -46,7 +48,6 @@ test("[LangGraph FastAPI] Agentic Chat changes background on message and reset",
4648
await chat.assertUserMessageVisible(
4749
"Hi change the background color to blue"
4850
);
49-
5051
await waitForAIResponse(page);
5152

5253
const backgroundBlue = await chat.getBackground();
@@ -82,6 +83,7 @@ test("[LangGraph FastAPI] Agentic Chat retains memory of user messages during a
8283
);
8384

8485
const chat = new AgenticChatPage(page);
86+
await chat.openChat();
8587
await chat.agentGreeting.click();
8688

8789
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/langgraphTests/agenticChatPage.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[LangGraph] Agentic Chat sends and receives a message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi, I am duaa");
2122

@@ -35,6 +36,7 @@ test("[LangGraph] Agentic Chat changes background on message and reset", async (
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Store initial background color
@@ -76,6 +78,7 @@ test("[LangGraph] Agentic Chat retains memory of user messages during a conversa
7678
);
7779

7880
const chat = new AgenticChatPage(page);
81+
await chat.openChat();
7982
await chat.agentGreeting.click();
8083

8184
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/llamaIndexTests/agenticChatPage.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[LlamaIndex] Agentic Chat sends and receives a message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi, I am duaa");
2122

@@ -35,6 +36,7 @@ test("[LlamaIndex] Agentic Chat changes background on message and reset", async
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Store initial background color
@@ -81,6 +83,7 @@ test("[LlamaIndex] Agentic Chat retains memory of user messages during a convers
8183
);
8284

8385
const chat = new AgenticChatPage(page);
86+
await chat.openChat();
8487
await chat.agentGreeting.click();
8588

8689
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/mastraAgentLocalTests/agenticChatPage.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[MastraAgentLocal] Agentic Chat sends and receives a message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi, I am duaa");
2122

@@ -35,6 +36,7 @@ test("[MastraAgentLocal] Agentic Chat changes background on message and reset",
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Store initial background color
@@ -81,6 +83,7 @@ test("[MastraAgentLocal] Agentic Chat retains memory of user messages during a c
8183
);
8284

8385
const chat = new AgenticChatPage(page);
86+
await chat.openChat();
8487
await chat.agentGreeting.click();
8588

8689
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/mastraTests/agenticChatPage.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[Mastra] Agentic Chat sends and receives a greeting message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi");
2122

@@ -35,6 +36,7 @@ test("[Mastra] Agentic Chat provides weather information", async ({
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Ask for Islamabad weather
@@ -56,6 +58,7 @@ test("[Mastra] Agentic Chat retains memory of previous questions", async ({
5658
);
5759

5860
const chat = new AgenticChatPage(page);
61+
await chat.openChat();
5962
await chat.agentGreeting.waitFor({ state: "visible" });
6063

6164
// First question about weather
@@ -83,6 +86,7 @@ test("[Mastra] Agentic Chat retains memory of user messages during a conversatio
8386
);
8487

8588
const chat = new AgenticChatPage(page);
89+
await chat.openChat();
8690
await chat.agentGreeting.click();
8791

8892
await chat.sendMessage("Hey there");

typescript-sdk/apps/dojo/e2e/tests/middlewareStarterTests/agenticChatPage.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ test("[Middleware Starter] Testing Agentic Chat", async ({
1515
);
1616

1717
const chat = new AgenticChatPage(page);
18+
await chat.openChat();
1819
await chat.agentGreeting.waitFor({ state: "visible" });
1920
await chat.sendMessage("Hey there");
2021
await chat.assertUserMessageVisible("Hey there");

typescript-sdk/apps/dojo/e2e/tests/pydanticAITests/agenticChatPage.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test("[PydanticAI] Agentic Chat sends and receives a message", async ({
1616

1717
const chat = new AgenticChatPage(page);
1818

19+
await chat.openChat();
1920
await chat.agentGreeting.isVisible;
2021
await chat.sendMessage("Hi, I am duaa");
2122

@@ -35,6 +36,7 @@ test("[PydanticAI] Agentic Chat changes background on message and reset", async
3536

3637
const chat = new AgenticChatPage(page);
3738

39+
await chat.openChat();
3840
await chat.agentGreeting.waitFor({ state: "visible" });
3941

4042
// Store initial background color
@@ -81,6 +83,7 @@ test("[PydanticAI] Agentic Chat retains memory of user messages during a convers
8183
);
8284

8385
const chat = new AgenticChatPage(page);
86+
await chat.openChat();
8487
await chat.agentGreeting.click();
8588

8689
await chat.sendMessage("Hey there");

0 commit comments

Comments
 (0)