fix tests on CI
This commit is contained in:
parent
f1aa857ae1
commit
694fa549dd
36 changed files with 36 additions and 9 deletions
60
src/frontend/tests/end-to-end/deleteComponentFlows.spec.ts
Normal file
60
src/frontend/tests/end-to-end/deleteComponentFlows.spec.ts
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test("should delete a flow", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("Store").nth(0).click();
|
||||
|
||||
await page.getByText("API Key", { exact: true }).click();
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key", { exact: true })
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByText("Save").last().click();
|
||||
await page.waitForTimeout(8000);
|
||||
await page.getByText("Store").nth(0).click();
|
||||
|
||||
await page.getByTestId("install-Website Content QA").click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.getByText("My Collection").nth(0).click();
|
||||
await page.getByText("Website Content QA").first().isVisible();
|
||||
|
||||
await page.getByLabel("checkbox-component").last().waitFor({
|
||||
state: "visible",
|
||||
timeout: 30000, // Timeout of 30 seconds
|
||||
});
|
||||
|
||||
await page.getByLabel("checkbox-component").first().click();
|
||||
|
||||
await page.getByTestId("icon-Trash2").click();
|
||||
await page
|
||||
.getByText("Are you sure you want to delete the selected component?")
|
||||
.isVisible();
|
||||
await page.getByText("Delete").nth(1).click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Successfully").first().isVisible();
|
||||
});
|
||||
|
||||
test("should delete a component", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("Store").nth(0).click();
|
||||
await page.getByTestId("install-Basic RAG").click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.getByText("My Collection").nth(0).click();
|
||||
await page.getByText("Components").first().click();
|
||||
await page.getByText("Basic RAG").first().isVisible();
|
||||
|
||||
await page.getByLabel("checkbox-component").last().waitFor({
|
||||
state: "visible",
|
||||
timeout: 30000, // Timeout of 30 seconds
|
||||
});
|
||||
|
||||
await page.getByLabel("checkbox-component").first().click();
|
||||
await page.getByTestId("icon-Trash2").click();
|
||||
await page
|
||||
.getByText("Are you sure you want to delete the selected component?")
|
||||
.isVisible();
|
||||
await page.getByText("Delete").nth(1).click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Successfully").first().isVisible();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue