forked from langflow-ai/langflow
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update tests FE (langflow-ai#2493)
* bugfix: update tests FE * ✅ (tests): add end-to-end tests for deleting components and flows ✅ (tsconfig.json): update tsconfig to include new deleteFlows.spec.ts test file * ♻️ (dropdownComponent.spec.ts): remove redundant test cases for showendpoint_url to streamline test suite --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]> (cherry picked from commit 871271e)
- Loading branch information
1 parent
0e81c72
commit 5015565
Showing
6 changed files
with
60 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { test } from "@playwright/test"; | ||
|
||
test("should add API-KEY", async ({ page }) => { | ||
await page.goto("/"); | ||
await page.waitForTimeout(1000); | ||
|
||
await page.getByTestId("button-store").click(); | ||
await page.waitForTimeout(1000); | ||
|
||
await page.getByTestId("api-key-button-store").click(); | ||
await page | ||
.getByPlaceholder("Insert your API Key") | ||
.fill("testtesttesttesttesttest"); | ||
|
||
await page.getByTestId("api-key-save-button-store").click(); | ||
|
||
await page.waitForTimeout(2000); | ||
await page.getByText("Success! Your API Key has been saved.").isVisible(); | ||
|
||
await page | ||
.getByPlaceholder("Insert your API Key") | ||
.fill(process.env.STORE_API_KEY ?? ""); | ||
await page.getByTestId("api-key-save-button-store").click(); | ||
|
||
await page.waitForTimeout(2000); | ||
await page.getByText("Success! Your API Key has been saved.").isVisible(); | ||
|
||
await page.waitForTimeout(2000); | ||
await page.getByText("API Key Error").isHidden(); | ||
}); | ||
|
||
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.waitForSelector('[data-testid="checkbox-component"]', { | ||
timeout: 100000, | ||
}); | ||
|
||
await page.getByTestId("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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters