Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
**/.claude/settings.local.json
.vscode/
.idea/
mastra.db*

.DS_Store
test-results/
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[ADK Middleware] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/adk-middleware/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[Agno] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/agno/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[MastraAgentLocal] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/langgraph-fastapi/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[MastraAgentLocal] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/langgraph/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[LlamaIndex] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/llama-index/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[MastraAgentLocal] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/mastra-agent-local/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { test, expect } from "@playwright/test";

test("[Mastra] Backend Tool Rendering displays weather cards", async ({ page }) => {
// Set shorter default timeout for this test
test.setTimeout(30000); // 30 seconds total

await page.goto("/mastra/feature/backend_tool_rendering");

// Verify suggestion buttons are visible
await expect(page.getByRole("button", { name: "Weather in San Francisco" })).toBeVisible({
timeout: 5000,
});

// Click first suggestion and verify weather card appears
await page.getByRole("button", { name: "Weather in San Francisco" }).click();

// Wait for either test ID or fallback to "Current Weather" text
const weatherCard = page.getByTestId("weather-card");
const currentWeatherText = page.getByText("Current Weather");

// Try test ID first, fallback to text
try {
await expect(weatherCard).toBeVisible({ timeout: 10000 });
} catch (e) {
// Fallback to checking for "Current Weather" text
await expect(currentWeatherText.first()).toBeVisible({ timeout: 10000 });
}

// Verify weather content is present (use flexible selectors)
const hasHumidity = await page
.getByText("Humidity")
.isVisible()
.catch(() => false);
const hasWind = await page
.getByText("Wind")
.isVisible()
.catch(() => false);
const hasCityName = await page
.locator("h3")
.filter({ hasText: /San Francisco/i })
.isVisible()
.catch(() => false);

// At least one of these should be true
expect(hasHumidity || hasWind || hasCityName).toBeTruthy();

// Click second suggestion
await page.getByRole("button", { name: "Weather in New York" }).click();
await page.waitForTimeout(2000);

// Verify at least one weather-related element is still visible
const weatherElements = await page.getByText(/Weather|Humidity|Wind|Temperature/i).count();
expect(weatherElements).toBeGreaterThan(0);
});
Loading
Loading