-
Notifications
You must be signed in to change notification settings - Fork 5.9k
/
Copy pathgeneralBugs-shard-12.spec.ts
91 lines (75 loc) · 2.63 KB
/
generalBugs-shard-12.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import { expect, test } from "@playwright/test";
import { addLegacyComponents } from "../../utils/add-legacy-components";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
test(
"user should be able to connect RetrieverTool into another components",
{ tag: ["@release"] },
async ({ page }) => {
await awaitBootstrapTest(page);
await page.waitForSelector('[data-testid="blank-flow"]', {
timeout: 30000,
});
await page.getByTestId("blank-flow").click();
await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("retriever");
await page.waitForSelector('[data-testid="sidebar-options-trigger"]', {
timeout: 30000,
});
await addLegacyComponents(page);
let modelElement = await page.getByTestId(
"langchain_utilitiesRetrieverTool",
);
let targetElement = await page.locator('//*[@id="react-flow-id"]');
await modelElement.dragTo(targetElement);
await page.mouse.up();
await page.mouse.down();
await page.getByTestId("fit_view").click();
await page.getByTestId("zoom_out").click();
await page.getByTestId("zoom_out").click();
await page
.locator('//*[@id="react-flow-id"]')
.hover()
.then(async () => {
await page.mouse.down();
await page.mouse.move(-300, 100);
});
await page.mouse.up();
await page.getByTestId("sidebar-search-input").click();
await page.getByTestId("sidebar-search-input").fill("Vectara");
await page.waitForSelector(
'[data-testid="vectorstoresVectara Self Query Retriever for Vectara Vector Store"]',
{
timeout: 30000,
},
);
await page
.getByTestId(
"vectorstoresVectara Self Query Retriever for Vectara Vector Store",
)
.hover()
.then(async () => {
await page
.getByTestId(
"add-component-button-vectara-self-query-retriever-for-vectara-vector-store",
)
.click();
});
await page.waitForSelector('[data-testid="fit_view"]', {
timeout: 5000,
state: "visible",
});
await page.getByTestId("fit_view").click();
//connection
const vectaraOutput = page
.getByTestId("handle-vectaraselfqueryretriver-shownode-retriever-right")
.nth(0);
await vectaraOutput.hover();
await page.mouse.down();
const retrieverToolInput = await page
.getByTestId("handle-retrievertool-shownode-retriever-left")
.nth(0);
await retrieverToolInput.hover();
await page.mouse.up();
expect(await page.locator(".react-flow__edge-interaction").count()).toBe(1);
},
);