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
97
.github/workflows/ci.yml
vendored
Normal file
97
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: "(Optional) Branch to checkout"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
path-filter:
|
||||||
|
name: Filter Paths
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
python: ${{ steps.filter.outputs.python }}
|
||||||
|
frontend: ${{ steps.filter.outputs.frontend }}
|
||||||
|
docs: ${{ steps.filter.outputs.docs }}
|
||||||
|
tests: ${{ steps.filter.outputs.tests }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
|
- name: Filter Paths
|
||||||
|
id: filter
|
||||||
|
uses: dorny/paths-filter@v3
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
python:
|
||||||
|
- "src/backend/**"
|
||||||
|
- "src/backend/**.py"
|
||||||
|
- "pyproject.toml"
|
||||||
|
- "poetry.lock"
|
||||||
|
- "**/python_test.yml"
|
||||||
|
tests:
|
||||||
|
- "tests/**"
|
||||||
|
- "src/frontend/tests/**"
|
||||||
|
frontend:
|
||||||
|
- "src/frontend/**"
|
||||||
|
- "**/typescript_test.yml"
|
||||||
|
docs:
|
||||||
|
- "docs/**"
|
||||||
|
|
||||||
|
test-backend:
|
||||||
|
needs: path-filter
|
||||||
|
name: Run Backend Tests
|
||||||
|
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
|
||||||
|
uses: ./.github/workflows/python_test.yml
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
test-frontend:
|
||||||
|
needs: path-filter
|
||||||
|
name: Run Frontend Tests
|
||||||
|
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.frontend == 'true' || needs.path-filter.outputs.tests == 'true' }}
|
||||||
|
uses: ./.github/workflows/typescript_test.yml
|
||||||
|
|
||||||
|
|
||||||
|
lint-backend:
|
||||||
|
needs: path-filter
|
||||||
|
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
|
||||||
|
name: Lint Backend
|
||||||
|
uses: ./.github/workflows/lint-py.yml
|
||||||
|
# Run only if there are python files changed
|
||||||
|
|
||||||
|
test-docs-build:
|
||||||
|
needs: path-filter
|
||||||
|
if: ${{ needs.path-filter.outputs.docs == 'true' }}
|
||||||
|
name: Test Docs Build
|
||||||
|
uses: ./.github/workflows/docs_test.yml
|
||||||
|
|
||||||
|
|
||||||
|
# https://github.com/langchain-ai/langchain/blob/master/.github/workflows/check_diffs.yml
|
||||||
|
ci_success:
|
||||||
|
name: "CI Success"
|
||||||
|
needs: [test-backend, test-frontend, lint-backend, test-docs-build]
|
||||||
|
if: |
|
||||||
|
always()
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
JOBS_JSON: ${{ toJSON(needs) }}
|
||||||
|
RESULTS_JSON: ${{ toJSON(needs.*.result) }}
|
||||||
|
EXIT_CODE: ${{!contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && '0' || '1'}}
|
||||||
|
steps:
|
||||||
|
- name: "CI Success"
|
||||||
|
run: |
|
||||||
|
echo $JOBS_JSON
|
||||||
|
echo $RESULTS_JSON
|
||||||
|
echo "Exiting with $EXIT_CODE"
|
||||||
|
exit $EXIT_CODE
|
||||||
13
.github/workflows/docs_test.yml
vendored
13
.github/workflows/docs_test.yml
vendored
|
|
@ -1,9 +1,13 @@
|
||||||
name: Test Docs Build
|
name: Test Docs Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_call:
|
||||||
paths:
|
workflow_dispatch:
|
||||||
- "docs/**"
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: "(Optional) Branch to checkout"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_VERSION: "21"
|
NODE_VERSION: "21"
|
||||||
|
|
@ -17,7 +21,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
id: setup-node
|
id: setup-node
|
||||||
|
|
|
||||||
2
.github/workflows/js_autofix.yml
vendored
2
.github/workflows/js_autofix.yml
vendored
|
|
@ -2,7 +2,7 @@ name: autofix.ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened, auto_merge_enabled]
|
types: [opened, synchronize, reopened]
|
||||||
paths:
|
paths:
|
||||||
- "src/frontend/**"
|
- "src/frontend/**"
|
||||||
|
|
||||||
|
|
|
||||||
15
.github/workflows/lint-js.yml
vendored
15
.github/workflows/lint-js.yml
vendored
|
|
@ -1,13 +1,14 @@
|
||||||
name: Lint Frontend
|
name: Lint Frontend
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_call:
|
||||||
paths:
|
workflow_dispatch:
|
||||||
- "src/frontend/**"
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: "(Optional) Branch to checkout"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_VERSION: "21"
|
NODE_VERSION: "21"
|
||||||
|
|
@ -22,6 +23,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|
|
||||||
14
.github/workflows/lint-py.yml
vendored
14
.github/workflows/lint-py.yml
vendored
|
|
@ -1,14 +1,16 @@
|
||||||
name: Lint Python
|
name: Lint Python
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_call:
|
||||||
types: [opened, synchronize, reopened, auto_merge_enabled]
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch:
|
||||||
|
description: "(Optional) Branch to checkout"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: "1.8.2"
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
|
@ -22,6 +24,8 @@ jobs:
|
||||||
- "3.10"
|
- "3.10"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||||
uses: "./.github/actions/poetry_caching"
|
uses: "./.github/actions/poetry_caching"
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
14
.github/workflows/python_test.yml
vendored
14
.github/workflows/python_test.yml
vendored
|
|
@ -2,15 +2,15 @@ name: Python tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
pull_request:
|
workflow_dispatch:
|
||||||
types: [opened, synchronize, reopened, auto_merge_enabled]
|
inputs:
|
||||||
branches: [main]
|
branch:
|
||||||
|
description: "(Optional) Branch to checkout"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: "1.8.2"
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: ${{ !contains(github.workflow, 'Release')}}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -26,6 +26,8 @@ jobs:
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||||
uses: "./.github/actions/poetry_caching"
|
uses: "./.github/actions/poetry_caching"
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
|
@ -20,17 +20,13 @@ env:
|
||||||
POETRY_VERSION: "1.8.2"
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_frontend:
|
ci:
|
||||||
name: Call Typescript Test Workflow
|
name: CI
|
||||||
uses: langflow-ai/langflow/.github/workflows/typescript_test.yml@main
|
uses: ./.github/workflows/ci.yml
|
||||||
|
|
||||||
test_backend:
|
|
||||||
name: Call Python Test Workflow
|
|
||||||
uses: langflow-ai/langflow/.github/workflows/python_test.yml@main
|
|
||||||
|
|
||||||
release-base:
|
release-base:
|
||||||
name: Release Langflow Base
|
name: Release Langflow Base
|
||||||
needs: [test_backend, test_frontend]
|
needs: [ci]
|
||||||
if: inputs.release_package == true
|
if: inputs.release_package == true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
|
|
||||||
4
.github/workflows/style-check-py.yml
vendored
4
.github/workflows/style-check-py.yml
vendored
|
|
@ -4,9 +4,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened, auto_merge_enabled]
|
types: [opened, synchronize, reopened, auto_merge_enabled]
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: "1.8.2"
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
|
||||||
6
.github/workflows/typescript_test.yml
vendored
6
.github/workflows/typescript_test.yml
vendored
|
|
@ -8,12 +8,7 @@ on:
|
||||||
description: "(Optional) Branch to checkout"
|
description: "(Optional) Branch to checkout"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened, auto_merge_enabled]
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: ${{ !contains(github.workflow, 'Release')}}
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: "1.8.3"
|
POETRY_VERSION: "1.8.3"
|
||||||
|
|
@ -120,7 +115,6 @@ jobs:
|
||||||
merge-reports:
|
merge-reports:
|
||||||
needs: setup-and-test
|
needs: setup-and-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { test } from "@playwright/test";
|
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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
|
@ -8,29 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.getByTestId("api-key-button-store").click();
|
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
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
|
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
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.waitForTimeout(2000);
|
||||||
await page.getByText("Store").nth(0).click();
|
await page.getByText("Store").nth(0).click();
|
||||||
await page.getByTestId("install-Basic RAG").click();
|
await page.getByTestId("install-Basic RAG").click();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { test } from "@playwright/test";
|
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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
|
@ -8,31 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.getByTestId("api-key-button-store").click();
|
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
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
|
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
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.waitForSelector("text=Store", { timeout: 30000 });
|
||||||
|
|
||||||
await page.getByText("Store").nth(0).click();
|
await page.getByText("Store").nth(0).click();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
import { test } from "@playwright/test";
|
import { test } from "@playwright/test";
|
||||||
|
|
||||||
test("should able to see and interact with logs", async ({ page }) => {
|
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.goto("/");
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
|
|
@ -20,7 +25,6 @@ test("should able to see and interact with logs", async ({ page }) => {
|
||||||
await page.waitForTimeout(5000);
|
await page.waitForTimeout(5000);
|
||||||
modalCount = await page.getByTestId("modal-title")?.count();
|
modalCount = await page.getByTestId("modal-title")?.count();
|
||||||
}
|
}
|
||||||
await page.waitForTimeout(1000);
|
|
||||||
|
|
||||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
@ -1,35 +1,10 @@
|
||||||
import { expect, test } from "@playwright/test";
|
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("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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
|
@ -41,14 +16,12 @@ test("should like and add components and flows", async ({ page }) => {
|
||||||
await page
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
|
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
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.waitForTimeout(2000);
|
||||||
|
|
||||||
await page.getByTestId("button-store").click();
|
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("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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
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.getByTestId("button-store").click();
|
||||||
|
|
||||||
await page.waitForSelector('[data-testid="search-store-input"]', {
|
await page.waitForSelector('[data-testid="search-store-input"]', {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { expect, test } from "@playwright/test";
|
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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
|
@ -8,31 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.getByTestId("api-key-button-store").click();
|
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
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
|
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
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.getByTestId("button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
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("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.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);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
let modalCount = 0;
|
let modalCount = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { expect, test } from "@playwright/test";
|
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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
|
@ -8,29 +12,16 @@ test("should add API-KEY", async ({ page }) => {
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.getByTestId("api-key-button-store").click();
|
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
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
|
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
await page.getByText("Success! Your API Key has been saved.").isVisible();
|
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.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.getByTestId("button-store").click();
|
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("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.goto("/");
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.getByTestId("button-store").click();
|
await page.getByTestId("button-store").click();
|
||||||
await page.waitForTimeout(1000);
|
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.getByText("Website Content QA").isVisible();
|
||||||
|
|
||||||
await page.getByTestId("flows-button-store").click();
|
await page.getByTestId("flows-button-store").click();
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@
|
||||||
"tests/end-to-end/tweaks_test.spec.ts",
|
"tests/end-to-end/tweaks_test.spec.ts",
|
||||||
"tests/end-to-end/twoEdges.spec.ts",
|
"tests/end-to-end/twoEdges.spec.ts",
|
||||||
"tests/end-to-end/userSettings.spec.ts",
|
"tests/end-to-end/userSettings.spec.ts",
|
||||||
"tests/end-to-end/store.spec.ts"
|
"tests/end-to-end/store.spec.ts",
|
||||||
|
"tests/end-to-end/logs.spec.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue