tests: new tests folders organization (#3716)
* new tests folders organizations * 📝 (nightly_build.yml): update tests_folder path from "tests/scheduled" to "tests/core" to reflect the correct location of the tests folder * renaming test folder * changing e2e to integrations folder * 📝 (frontend/tsconfig.json): update test file paths to reflect changes in folder structure for better organization and clarity * change assets folder * 📝 (frontend): update file paths to remove redundant 'core' directory in test assets * 📝 (Document QA.spec.ts, Vector Store.spec.ts, fileUploadComponent.spec.ts): Update file paths to correctly reference test assets in integration and unit tests. * github suggestions
This commit is contained in:
parent
cc52f5f00d
commit
6061951cba
87 changed files with 60 additions and 55 deletions
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
|
@ -68,7 +68,7 @@ test("user must be able to send an image on chat", async ({ page }) => {
|
|||
await page.getByText("Playground", { exact: true }).click();
|
||||
|
||||
// Read the image file as a binary string
|
||||
const filePath = "tests/end-to-end/assets/chain.png";
|
||||
const filePath = "tests/assets/chain.png";
|
||||
const fileContent = readFileSync(filePath, "base64");
|
||||
|
||||
// Create the DataTransfer and File objects within the browser context
|
||||
|
|
@ -78,10 +78,7 @@ test("add a flow into a folder by drag and drop", async ({ page }) => {
|
|||
timeout: 50000,
|
||||
});
|
||||
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/collection.json",
|
||||
"utf-8",
|
||||
);
|
||||
const jsonContent = readFileSync("tests/assets/collection.json", "utf-8");
|
||||
|
||||
// Wait for the target element to be available before evaluation
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ test.describe("save component tests", () => {
|
|||
|
||||
// Read your file into a buffer.
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/flow_group_test.json",
|
||||
"tests/assets/flow_group_test.json",
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
|
|
@ -64,7 +64,9 @@ test("Document QA", async ({ page }) => {
|
|||
const fileChooserPromise = page.waitForEvent("filechooser");
|
||||
await page.getByTestId("icon-FileSearch2").click();
|
||||
const fileChooser = await fileChooserPromise;
|
||||
await fileChooser.setFiles(path.join(__dirname, "/assets/test_file.txt"));
|
||||
await fileChooser.setFiles(
|
||||
path.join(__dirname, "../../assets/test_file.txt"),
|
||||
);
|
||||
await page.getByText("test_file.txt").isVisible();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
|
@ -96,7 +96,9 @@ test("Vector Store RAG", async ({ page }) => {
|
|||
const fileChooserPromise = page.waitForEvent("filechooser");
|
||||
await page.getByTestId("icon-FileSearch2").last().click();
|
||||
const fileChooser = await fileChooserPromise;
|
||||
await fileChooser.setFiles(path.join(__dirname, "/assets/test_file.txt"));
|
||||
await fileChooser.setFiles(
|
||||
path.join(__dirname, "../../assets/test_file.txt"),
|
||||
);
|
||||
await page.getByText("test_file.txt").isVisible();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
|
@ -54,7 +54,7 @@ test("should be able to upload a file", async ({ page }) => {
|
|||
await page.getByTestId("icon-FileSearch2").click();
|
||||
const fileChooser = await fileChooserPromise;
|
||||
await fileChooser.setFiles(
|
||||
path.join(__dirname, "../end-to-end/assets/test_file.txt"),
|
||||
path.join(__dirname, "../../assets/test_file.txt"),
|
||||
);
|
||||
await page.getByText("test_file.txt").isVisible();
|
||||
|
||||
|
|
@ -25,10 +25,7 @@ test.describe("drag and drop test", () => {
|
|||
|
||||
await page.locator("span").filter({ hasText: "My Collection" }).isVisible();
|
||||
// Read your file into a buffer.
|
||||
const jsonContent = readFileSync(
|
||||
"tests/end-to-end/assets/collection.json",
|
||||
"utf-8",
|
||||
);
|
||||
const jsonContent = readFileSync("tests/assets/collection.json", "utf-8");
|
||||
|
||||
// Create the DataTransfer and File
|
||||
const dataTransfer = await page.evaluateHandle((data) => {
|
||||
Loading…
Add table
Add a link
Reference in a new issue