test webhook
This commit is contained in:
parent
227ad4f2e9
commit
e9032c9f11
3 changed files with 147 additions and 2 deletions
|
|
@ -147,7 +147,7 @@ export default function CodeTabsComponent({
|
|||
</div>
|
||||
)}
|
||||
|
||||
{Number(activeTab) < 5 && (
|
||||
{Number(activeTab) < 6 && (
|
||||
<>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
|
@ -172,7 +172,7 @@ export default function CodeTabsComponent({
|
|||
className="api-modal-tabs-content overflow-hidden"
|
||||
key={idx} // Remember to add a unique key prop
|
||||
>
|
||||
{idx < 5 ? (
|
||||
{idx < 6 ? (
|
||||
<div className="flex h-full w-full flex-col">
|
||||
{tab.description && (
|
||||
<div
|
||||
|
|
|
|||
56
src/frontend/tests/end-to-end/generalBugs-shard-2.spec.ts
Normal file
56
src/frontend/tests/end-to-end/generalBugs-shard-2.spec.ts
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
|
||||
test("should use webhook component on tweaks", async ({ page }) => {
|
||||
if (!process?.env?.OPENAI_API_KEY) {
|
||||
//You must set the OPENAI_API_KEY on .env file to run this test
|
||||
expect(false).toBe(true);
|
||||
}
|
||||
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="extended-disclosure"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByTestId("extended-disclosure").click();
|
||||
await page.getByPlaceholder("Search").click();
|
||||
await page.getByPlaceholder("Search").fill("webhook");
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page
|
||||
.getByTestId("dataWebhook Input")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
||||
await page.getByText("Webhook cURL", { exact: true }).click();
|
||||
await page.getByRole("tab", { name: "Webhook cURL" }).click();
|
||||
|
||||
const handle = await page.evaluateHandle(() =>
|
||||
navigator.clipboard.readText(),
|
||||
);
|
||||
const clipboardContent = await handle.jsonValue();
|
||||
expect(clipboardContent.length).toBeGreaterThan(0);
|
||||
await page.getByRole("tab", { name: "Tweaks" }).click();
|
||||
});
|
||||
89
src/frontend/tests/end-to-end/generalBugs-shard-3.spec.ts
Normal file
89
src/frontend/tests/end-to-end/generalBugs-shard-3.spec.ts
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
|
||||
test("should delete rows from table message", async ({ page }) => {
|
||||
if (!process?.env?.OPENAI_API_KEY) {
|
||||
//You must set the OPENAI_API_KEY on .env file to run this test
|
||||
expect(false).toBe(true);
|
||||
}
|
||||
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
|
||||
await page.waitForSelector('[title="fit view"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByTitle("fit view").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
|
||||
await page.getByTestId("dropdown-model_name").click();
|
||||
await page.getByTestId("gpt-4o-0-option").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("button_run_chat output").click();
|
||||
await page.waitForSelector("text=built successfully", { timeout: 30000 });
|
||||
|
||||
await page.getByText("built successfully").last().click({
|
||||
timeout: 15000,
|
||||
});
|
||||
|
||||
await page.getByText("Playground", { exact: true }).click();
|
||||
await page
|
||||
.getByText("No input message provided.", { exact: true })
|
||||
.last()
|
||||
.isVisible();
|
||||
|
||||
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("input-chat-playground")
|
||||
.last()
|
||||
.fill("Say hello as a pirate");
|
||||
await page.getByTestId("icon-LucideSend").last().click();
|
||||
|
||||
await page.waitForSelector("text=matey", {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByText("Close").last().click();
|
||||
await page.getByTestId("user-profile-settings").last().click();
|
||||
await page.getByText("Settings").last().click();
|
||||
await page.getByText("Messages").last().click();
|
||||
|
||||
const label = "Press Space to toggle all rows selection (unchecked)";
|
||||
await page.getByLabel(label).first().click();
|
||||
|
||||
await page.getByTestId("icon-Trash2").first().click();
|
||||
|
||||
await page.waitForSelector("text=No Data Available", { timeout: 30000 });
|
||||
await page.getByText("No Data Available").isVisible();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue