From b9af310abf0d1f4b48d2aed7a843ef985ad067a4 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 25 Nov 2024 19:43:34 -0300 Subject: [PATCH] fix: starter-project was broken in main (#4842) * fix broken test * ci: Enhance TypeScript test workflow with debug output and refined release condition --------- Co-authored-by: Gabriel Luiz Freitas Almeida --- .github/workflows/typescript_test.yml | 7 ++++--- .../core/integrations/starter-projects.spec.ts | 15 +++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/typescript_test.yml b/.github/workflows/typescript_test.yml index 7fee9de13..bbe16ea75 100644 --- a/.github/workflows/typescript_test.yml +++ b/.github/workflows/typescript_test.yml @@ -74,6 +74,7 @@ jobs: id: set-matrix run: | # Start with input suites if provided, otherwise empty array + echo "Changes filter output: ${{ steps.filter.outputs }}" SUITES='${{ inputs.suites }}' echo "Initial suites: $SUITES" TEST_GREP="" @@ -81,15 +82,15 @@ jobs: RELEASE="${{ inputs.release || 'false' }}" echo "Release build: $RELEASE" - # if release OR steps.filter.outputs.frontend-tests is true - if [[ "$RELEASE" == "true" || "${{ steps.filter.outputs.frontend-tests }}" == "true" ]]; then + # Only set to release if it's explicitly a release build + if [[ "$RELEASE" == "true" ]]; then SUITES='["release"]' echo "Release build detected - setting suites to: $SUITES" # No grep pattern for release - run all tests TEST_GREP="" else # If input suites were not provided, determine based on changes - if [[ "$SUITES" == "[]" ]]; then + if [[ "$SUITES" == "[]" ]]; then echo "No input suites provided - determining from changes" TAGS=() # Add suites and tags based on changed files diff --git a/src/frontend/tests/core/integrations/starter-projects.spec.ts b/src/frontend/tests/core/integrations/starter-projects.spec.ts index df86902a0..c15501d76 100644 --- a/src/frontend/tests/core/integrations/starter-projects.spec.ts +++ b/src/frontend/tests/core/integrations/starter-projects.spec.ts @@ -66,12 +66,6 @@ test( modalCount = 0; } - while (modalCount === 0) { - await page.getByText("New Flow", { exact: true }).click(); - await page.waitForTimeout(3000); - modalCount = await page.getByTestId("modal-title")?.count(); - } - while (modalCount === 0) { await page.getByText("New Flow", { exact: true }).click(); await page.waitForSelector('[data-testid="modal-title"]', { @@ -80,6 +74,15 @@ test( modalCount = await page.getByTestId("modal-title")?.count(); } + await page.getByTestId("side_nav_options_all-templates").click(); + await page + .getByRole("heading", { name: "Vector Store RAG" }) + .first() + .click(); + await page.waitForSelector('[data-testid="fit_view"]', { + timeout: 100000, + }); + await page.getByTestId("fit_view").click(); await page.getByTestId("zoom_out").click();