Fix: update broken test generalBugs-shard-12.spec (#5060)
* fix broken test * [autofix.ci] apply automated fixes
This commit is contained in:
parent
e4cf3e2b9b
commit
276722283b
1 changed files with 21 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { expect, test } from "@playwright/test";
|
import { expect, test } from "@playwright/test";
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"user should be able to connect RetrieverTool to another components",
|
"user should be able to connect RetrieverTool into another components",
|
||||||
{ tag: ["@release"] },
|
{ tag: ["@release"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
|
|
@ -23,7 +23,9 @@ test(
|
||||||
|
|
||||||
while (modalCount === 0) {
|
while (modalCount === 0) {
|
||||||
await page.getByText("New Flow", { exact: true }).click();
|
await page.getByText("New Flow", { exact: true }).click();
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForSelector('[data-testid="modal-title"]', {
|
||||||
|
timeout: 3000,
|
||||||
|
});
|
||||||
modalCount = await page.getByTestId("modal-title").count();
|
modalCount = await page.getByTestId("modal-title").count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,7 +36,9 @@ test(
|
||||||
await page.getByTestId("sidebar-search-input").click();
|
await page.getByTestId("sidebar-search-input").click();
|
||||||
await page.getByTestId("sidebar-search-input").fill("retriever");
|
await page.getByTestId("sidebar-search-input").fill("retriever");
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForSelector('[data-testid="sidebar-options-trigger"]', {
|
||||||
|
timeout: 30000,
|
||||||
|
});
|
||||||
|
|
||||||
await page.getByTestId("sidebar-options-trigger").click();
|
await page.getByTestId("sidebar-options-trigger").click();
|
||||||
await page
|
await page
|
||||||
|
|
@ -56,8 +60,6 @@ test(
|
||||||
await page.getByTestId("fit_view").click();
|
await page.getByTestId("fit_view").click();
|
||||||
await page.getByTestId("zoom_out").click();
|
await page.getByTestId("zoom_out").click();
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByTestId("zoom_out").click();
|
await page.getByTestId("zoom_out").click();
|
||||||
await page
|
await page
|
||||||
.locator('//*[@id="react-flow-id"]')
|
.locator('//*[@id="react-flow-id"]')
|
||||||
|
|
@ -70,27 +72,32 @@ test(
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
|
|
||||||
await page.getByTestId("sidebar-search-input").click();
|
await page.getByTestId("sidebar-search-input").click();
|
||||||
await page.getByTestId("sidebar-search-input").fill("chroma");
|
await page.getByTestId("sidebar-search-input").fill("Vectara");
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForSelector(
|
||||||
|
'[data-testid="vectorstoresVectara Self Query Retriever for Vectara Vector Store"]',
|
||||||
|
{
|
||||||
|
timeout: 30000,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
modelElement = await page.getByTestId("vectorstoresChroma DB");
|
modelElement = page.getByTestId(
|
||||||
targetElement = await page.locator('//*[@id="react-flow-id"]');
|
"vectorstoresVectara Self Query Retriever for Vectara Vector Store",
|
||||||
|
);
|
||||||
|
targetElement = page.locator('//*[@id="react-flow-id"]');
|
||||||
await modelElement.dragTo(targetElement);
|
await modelElement.dragTo(targetElement);
|
||||||
|
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
await page.mouse.down();
|
await page.mouse.down();
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByTestId("fit_view").click();
|
await page.getByTestId("fit_view").click();
|
||||||
await page.getByTestId("fit_view").click();
|
await page.getByTestId("fit_view").click();
|
||||||
|
|
||||||
//connection
|
//connection
|
||||||
const chromaDbOutput = await page
|
const vectaraOutput = page
|
||||||
.getByTestId("handle-chroma-shownode-retriever-right")
|
.getByTestId("handle-vectaraselfqueryretriver-shownode-retriever-right")
|
||||||
.nth(0);
|
.nth(0);
|
||||||
await chromaDbOutput.hover();
|
await vectaraOutput.hover();
|
||||||
await page.mouse.down();
|
await page.mouse.down();
|
||||||
const retrieverToolInput = await page
|
const retrieverToolInput = await page
|
||||||
.getByTestId("handle-retrievertool-shownode-retriever-left")
|
.getByTestId("handle-retrievertool-shownode-retriever-left")
|
||||||
|
|
@ -98,8 +105,6 @@ test(
|
||||||
await retrieverToolInput.hover();
|
await retrieverToolInput.hover();
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
|
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
expect(await page.locator(".react-flow__edge-interaction").count()).toBe(1);
|
expect(await page.locator(".react-flow__edge-interaction").count()).toBe(1);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue