* create an IO bundle * Update styleUtils.ts * [autofix.ci] apply automated fixes * change folder names * [autofix.ci] apply automated fixes * Update test_endpoints.py * refactor: update test IDs for input/output components in specs * test: update test IDs for chat input/output components in decisionFlow.spec.ts * test: update test IDs for input/output components in generalBugs-shard-5.spec.ts * Update styleUtils.ts * 🐛 (typescript_test.yml): increase the maximum shard count to 40 to improve test distribution and efficiency * fix FE Tests Input output component Ids * [autofix.ci] apply automated fixes * ✅ (filterEdge-shard-1.spec.ts): update test to log error message when element is not visible before asserting visibility * ✅ (notifications.spec.ts): update test selectors for better clarity and consistency in the notifications feature test suite * 🐛 (typescript_test.yml): adjust the maximum shard count to 10 to prevent exceeding the limit and optimize test execution. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: deon-sanchez <deon.sanchez@datastax.com> Co-authored-by: Deon Sanchez <69873175+deon-sanchez@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
59 lines
2 KiB
TypeScript
59 lines
2 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
|
|
|
test("chat_io_teste", { tag: ["@release", "@workspace"] }, async ({ page }) => {
|
|
await awaitBootstrapTest(page);
|
|
|
|
await page.waitForSelector('[data-testid="blank-flow"]', {
|
|
timeout: 30000,
|
|
});
|
|
|
|
await page.getByTestId("blank-flow").click();
|
|
await page.waitForSelector('[data-testid="sidebar-search-input"]', {
|
|
state: "visible",
|
|
});
|
|
await page.getByTestId("sidebar-search-input").click();
|
|
await page.getByTestId("sidebar-search-input").fill("chat output");
|
|
await page.waitForSelector('[data-testid="input_outputChat Output"]', {
|
|
timeout: 2000,
|
|
});
|
|
|
|
await page
|
|
.getByTestId("input_outputChat Output")
|
|
.hover()
|
|
.then(async () => {
|
|
await page.getByTestId("add-component-button-chat-output").click();
|
|
});
|
|
|
|
await page.getByTestId("sidebar-search-input").click();
|
|
await page.getByTestId("sidebar-search-input").fill("chat input");
|
|
await page.waitForSelector('[data-testid="input_outputChat Input"]', {
|
|
timeout: 2000,
|
|
});
|
|
|
|
await page
|
|
.getByTestId("input_outputChat Input")
|
|
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
|
targetPosition: { x: 100, y: 100 },
|
|
});
|
|
|
|
await page.waitForSelector('[data-testid="fit_view"]', {
|
|
timeout: 100000,
|
|
});
|
|
|
|
await page.getByTestId("fit_view").click();
|
|
|
|
await page.getByTestId("handle-chatinput-noshownode-message-source").click();
|
|
await page.getByTestId("handle-chatoutput-noshownode-text-target").click();
|
|
|
|
await page.getByText("Playground", { exact: true }).last().click();
|
|
await page.waitForSelector('[data-testid="input-chat-playground"]', {
|
|
timeout: 100000,
|
|
});
|
|
await page.getByTestId("input-chat-playground").click();
|
|
await page.getByTestId("input-chat-playground").fill("teste");
|
|
await page.getByTestId("button-send").first().click();
|
|
const chat_input = await page.getByTestId("div-chat-message").textContent();
|
|
|
|
expect(chat_input).toBe("teste");
|
|
});
|