feat: create an IO Category (#8229)
* 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>
This commit is contained in:
parent
6582f06a21
commit
dc222d93f5
62 changed files with 130 additions and 138 deletions
|
|
@ -56,8 +56,7 @@ test(
|
|||
});
|
||||
|
||||
const disclosureTestIds = [
|
||||
"disclosure-inputs",
|
||||
"disclosure-outputs",
|
||||
"disclosure-i/o",
|
||||
"disclosure-data",
|
||||
"disclosure-models",
|
||||
"disclosure-helpers",
|
||||
|
|
@ -72,7 +71,7 @@ test(
|
|||
];
|
||||
|
||||
const elementTestIds = [
|
||||
"outputsChat Output",
|
||||
"input_outputChat Output",
|
||||
"dataAPI Request",
|
||||
"vectorstoresAstra DB",
|
||||
"langchain_utilitiesTool Calling Agent",
|
||||
|
|
@ -84,7 +83,12 @@ test(
|
|||
];
|
||||
|
||||
await Promise.all(
|
||||
disclosureTestIds.map((id) => expect(page.getByTestId(id)).toBeVisible()),
|
||||
disclosureTestIds.map((id) => {
|
||||
if (!expect(page.getByTestId(id)).toBeVisible()) {
|
||||
console.error(`${id} is not visible`);
|
||||
}
|
||||
return expect(page.getByTestId(id)).toBeVisible();
|
||||
}),
|
||||
);
|
||||
|
||||
await Promise.all(
|
||||
|
|
@ -118,9 +122,12 @@ test(
|
|||
];
|
||||
|
||||
await Promise.all(
|
||||
visibleModelSpecsTestIds.map((id) =>
|
||||
expect(page.getByTestId(id)).toBeVisible(),
|
||||
),
|
||||
visibleModelSpecsTestIds.map((id) => {
|
||||
if (!expect(page.getByTestId(id)).toBeVisible()) {
|
||||
console.error(`${id} is not visible`);
|
||||
}
|
||||
return expect(page.getByTestId(id)).toBeVisible();
|
||||
}),
|
||||
);
|
||||
|
||||
const chainInputElements1 = await page
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ test(
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
.getByTestId("input_outputChat Output")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 940, y: 100 },
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ test(
|
|||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("text input");
|
||||
await page.waitForSelector("data-testid=inputsText Input", {
|
||||
await page.waitForSelector("data-testid=input_outputText Input", {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("inputsText Input")
|
||||
.getByTestId("input_outputText Input")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
|
||||
await page.getByTestId("zoom_out").click();
|
||||
|
|
|
|||
|
|
@ -7,18 +7,18 @@ test(
|
|||
async ({ page }) => {
|
||||
await awaitBootstrapTest(page);
|
||||
await page.getByTestId("blank-flow").click();
|
||||
await page.waitForSelector('[data-testid="disclosure-inputs"]', {
|
||||
await page.waitForSelector('[data-testid="disclosure-i/o"]', {
|
||||
timeout: 3000,
|
||||
state: "visible",
|
||||
});
|
||||
|
||||
await page.getByTestId("disclosure-inputs").click();
|
||||
await page.waitForSelector('[data-testid="inputsText Input"]', {
|
||||
await page.getByTestId("disclosure-i/o").click();
|
||||
await page.waitForSelector('[data-testid="input_outputText Input"]', {
|
||||
timeout: 3000,
|
||||
state: "visible",
|
||||
});
|
||||
await page
|
||||
.getByTestId("inputsText Input")
|
||||
.getByTestId("input_outputText Input")
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("add-component-button-text-input").click();
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").fill("chat output");
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
await page.waitForSelector('[data-testid="input_outputChat Output"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
.getByTestId("input_outputChat Output")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 400, y: 400 },
|
||||
});
|
||||
|
|
|
|||
|
|
@ -74,18 +74,18 @@ test(
|
|||
// Add two chat outputs
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("chat output");
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
await page.waitForSelector('[data-testid="input_outputChat Output"]', {
|
||||
timeout: 1000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
.getByTestId("input_outputChat Output")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 700, y: 200 },
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
.getByTestId("input_outputChat Output")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 700, y: 400 },
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").fill("text output");
|
||||
|
||||
await page
|
||||
.getByTestId("outputsText Output")
|
||||
.getByTestId("input_outputText Output")
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("add-component-button-text-output").click();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,9 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("text output");
|
||||
|
||||
await page.getByTestId("outputsText Output").waitFor({ state: "visible" });
|
||||
await page
|
||||
.getByTestId("input_outputText Output")
|
||||
.waitFor({ state: "visible" });
|
||||
await page.getByTestId("add-component-button-text-output").click();
|
||||
|
||||
await page.waitForSelector('[data-testid="title-Text Output"]', {
|
||||
|
|
|
|||
|
|
@ -33,20 +33,20 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").fill("chat output");
|
||||
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
.getByTestId("input_outputChat Output")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 0, y: 0 },
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
.getByTestId("input_outputChat Output")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("chat input");
|
||||
|
||||
await page
|
||||
.getByTestId("inputsChat Input")
|
||||
.getByTestId("input_outputChat Input")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'), {
|
||||
targetPosition: { x: 100, y: 100 },
|
||||
});
|
||||
|
|
@ -137,11 +137,11 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("chat output");
|
||||
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
await page.waitForSelector('[data-testid="input_outputChat Output"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
await page
|
||||
.locator('//*[@id="outputsChat Output"]')
|
||||
.locator('//*[@id="input_outputChat Output"]')
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue