ref: Delete Diet analysis template (#8787)

Delete Diet abalysis template
This commit is contained in:
Edwin Jose 2025-06-30 15:04:14 -05:00 committed by GitHub
commit 2ae66976f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 1321 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,57 +0,0 @@
import { expect, test } from "@playwright/test";
import * as dotenv from "dotenv";
import path from "path";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
import { initialGPTsetup } from "../../utils/initialGPTsetup";
import { withEventDeliveryModes } from "../../utils/withEventDeliveryModes";
withEventDeliveryModes(
"Diet Analysis",
{ tag: ["@release", "@starter-projects"] },
async ({ page }) => {
test.skip(
!process?.env?.NOVITA_API_KEY,
"NOVITA_API_KEY required to run this test",
);
if (!process.env.CI) {
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
}
await awaitBootstrapTest(page);
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Diet Analysis" }).click();
await page
.getByTestId("popover-anchor-input-api_key")
.last()
.fill(process.env.NOVITA_API_KEY ?? "");
await page.getByTestId("playground-btn-flow-io").click();
await page
.getByTestId("input-chat-playground")
.last()
.fill(
"I ate a lot of junk food yesterday. What should I do today to improve my diet?",
);
await page.getByTestId("button-send").last().click();
const stopButton = page.getByRole("button", { name: "Stop" });
await stopButton.waitFor({ state: "visible", timeout: 30000 });
if (await stopButton.isVisible()) {
await expect(stopButton).toBeHidden({ timeout: 120000 });
}
const output = await page
.getByTestId("div-chat-message")
.last()
.innerText();
expect(output.toLowerCase()).toContain("healthy");
expect(output.toLowerCase()).toContain("hydrate");
expect(output.length).toBeGreaterThan(500);
},
);