ci: update CI workflows and add CI workflow (#2498)
* chore(workflows): update lint-js.yml and lint-py.yml workflows to include support for workflow_call and workflow_dispatch events with optional branch input for checkout * chore(docs_test.yml): update workflow triggers to include workflow_call and workflow_dispatch events * ci(python_test.yml): update workflow to trigger on workflow_dispatch event and add support for optional branch input parameter to checkout specific branch for testing * chore(typescript_test.yml): remove unnecessary pull_request event types to streamline workflow configuration * feat(ci.yml): add CI workflow for automated testing and linting of backend, frontend, and documentation code * chore: update release.yml to include CI workflow for automated testing and linting * chore(typescript_test.yml): remove unnecessary 'if: always()' condition from merge-reports job * chore(ci): add typescript_test.yml to the list of files included in the frontend job for CI workflow * chore(ci.yml): fix typo in file path for typescript_test.yml in the frontend job of CI workflow * chore(ci.yml): update path-filter job in CI workflow to include frontend tests and fix typo in file path for typescript_test.yml * chore(ci.yml): add concurrency configuration to improve workflow efficiency fix(ci.yml): include tests output in the filter paths job to run frontend tests when needed * chore(ci.yml): update CI workflow to remove lint-frontend job * chore(ci.yml): restructure CI workflow to improve readability and maintainability feat(ci.yml): add separate jobs for frontend tests, backend linting, and docs build to enhance testing coverage feat(ci.yml): introduce a final job 'CI Success' to check the status of all previous jobs and provide a summary of the CI pipeline execution * ci(ci.yml): add dependencies between jobs to ensure proper execution order and avoid unnecessary runs * chore(ci.yml): reformat YAML file for better readability and consistency in indentation feat(ci.yml): add support for running backend tests, frontend tests, linting backend code, and testing docs build in CI workflow feat(ci.yml): introduce a final step 'CI Success' to check the status of all previous jobs and exit with appropriate code based on their results * chore(ci.yml): Remove concurrency configuration and cancel-in-progress option from lint-js, lint-py, python_test, and style-check-py workflows * chore(ci.yml): Update pull_request event types in js_autofix.yml workflow to remove auto_merge_enabled * chore: Remove concurrency configuration and cancel-in-progress option from typescript_test.yml workflow * refactor: change add store key inside test * ♻️ (tests): remove hardcoded API key and use environment variable ✅ (tests): add environment variable check to skip tests if not set * ✅ (store-shard-2.spec.ts): add test skip condition for STORE_API_KEY ✨ (store-shard-2.spec.ts): implement test for sharing component with API key * ✅ (store-shard-2.spec.ts): update navigation step in end-to-end test to click "My Collection" instead of going to home page --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
parent
ef870cbf85
commit
a3bf1c4502
16 changed files with 233 additions and 137 deletions
|
|
@ -1,6 +1,10 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test("should add API-KEY", async ({ page }) => {
|
||||
test("should delete a component", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
@ -8,29 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
|||
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();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test("should add API-KEY", async ({ page }) => {
|
||||
test("should delete a flow", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
@ -8,31 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
|||
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 flow", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.waitForSelector("text=Store", { timeout: 30000 });
|
||||
|
||||
await page.getByText("Store").nth(0).click();
|
||||
|
|
|
|||
79
src/frontend/tests/end-to-end/logs.spec.ts
Normal file
79
src/frontend/tests/end-to-end/logs.spec.ts
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
import { test } from "@playwright/test";
|
||||
|
||||
test("should able to see and interact with logs", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.OPENAI_API_KEY,
|
||||
"OPENAI_API_KEY required to run this test",
|
||||
);
|
||||
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
if (modalTitleElement) {
|
||||
modalCount = await modalTitleElement.count();
|
||||
}
|
||||
} catch (error) {
|
||||
modalCount = 0;
|
||||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("icon-ChevronDown").click();
|
||||
await page.getByText("Logs").click();
|
||||
await page.getByText("No Data Available", { exact: true }).isVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-openai_api_key")
|
||||
.fill(process.env.OPENAI_API_KEY ?? "");
|
||||
|
||||
await page.getByTestId("dropdown-model_name").click();
|
||||
await page.getByTestId("gpt-4o-0-option").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByTestId("button_run_chat output").first().click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
await page
|
||||
.getByText("Chat Output built successfully", { exact: true })
|
||||
.isVisible();
|
||||
await page.getByTestId("icon-ChevronDown").click();
|
||||
await page.getByText("Logs").click();
|
||||
|
||||
await page.getByText("timestamp").first().isVisible();
|
||||
await page.getByText("flow_id").first().isVisible();
|
||||
await page.getByText("source").first().isVisible();
|
||||
await page.getByText("target", { exact: true }).first().isVisible();
|
||||
await page.getByText("target_args", { exact: true }).first().isVisible();
|
||||
await page.getByRole("gridcell").first().isVisible();
|
||||
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page.getByTestId("user-profile-settings").first().click();
|
||||
await page.getByText("Settings", { exact: true }).click();
|
||||
|
||||
await page.getByText("Messages", { exact: true }).click();
|
||||
await page.getByText("index", { exact: true }).last().isVisible();
|
||||
await page.getByText("timestamp", { exact: true }).isVisible();
|
||||
await page.getByText("flow_id", { exact: true }).isVisible();
|
||||
await page.getByText("source", { exact: true }).isVisible();
|
||||
await page.getByText("target", { exact: true }).isVisible();
|
||||
await page.getByText("vertex_id", { exact: true }).isVisible();
|
||||
await page.getByText("status", { exact: true }).isVisible();
|
||||
await page.getByText("error", { exact: true }).isVisible();
|
||||
await page.getByText("outputs", { exact: true }).isVisible();
|
||||
await page.getByText("inputs", { exact: true }).isVisible();
|
||||
|
||||
await page.getByRole("gridcell").first().isVisible();
|
||||
});
|
||||
|
|
@ -1,35 +1,10 @@
|
|||
import { expect, 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 like and add components and flows", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
@ -41,14 +16,12 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
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();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.getByTestId("button-store").click();
|
||||
|
|
@ -99,9 +72,29 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
});
|
||||
|
||||
test("should find a searched Component on Store", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
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(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(1000);
|
||||
|
||||
await page.getByTestId("button-store").click();
|
||||
|
||||
await page.waitForSelector('[data-testid="search-store-input"]', {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("should add API-KEY", async ({ page }) => {
|
||||
test("should filter by tag", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
@ -8,31 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
|||
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 filter by tag", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("button-store").click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
@ -57,7 +46,28 @@ test("should filter by tag", async ({ page }) => {
|
|||
});
|
||||
|
||||
test("should share component with share button", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
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(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.getByText("My Collection").click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
let modalCount = 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("should add API-KEY", async ({ page }) => {
|
||||
test("should order the visualization", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
|
|
@ -8,29 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
|||
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 order the visualization", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByTestId("button-store").click();
|
||||
|
|
@ -51,12 +42,30 @@ test("should order the visualization", async ({ page }) => {
|
|||
});
|
||||
|
||||
test("should filter by type", async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.STORE_API_KEY,
|
||||
"STORE_API_KEY required to run this test",
|
||||
);
|
||||
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(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.getByTestId("button-store").click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByText("Website Content QA").isVisible();
|
||||
|
||||
await page.getByTestId("flows-button-store").click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue