From e404f067d3f1f1bcbf66b6eb765fe1e9a9b8d19a Mon Sep 17 00:00:00 2001 From: emidhun Date: Wed, 16 Apr 2025 14:34:45 +0530 Subject: [PATCH 01/35] test commit --- .github/workflows/cypress-appbuilder.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index bb1bc569c0..28b68e1b97 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -3,7 +3,6 @@ name: Cypress App-Builder on: pull_request_target: types: [labeled, unlabeled, closed] - workflow_dispatch: env: @@ -101,7 +100,6 @@ jobs: run: | npm run --prefix server db:create npm run --prefix server db:reset - npm run --prefix server db:seed - name: sleep 5 run: sleep 5 @@ -140,7 +138,7 @@ jobs: dir: "./cypress-tests" - name: App builder - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 with: working-directory: ./cypress-tests config: "baseUrl=http://localhost:8082" From 0c74d429c1d3349a0e4845326c9e66949e524681 Mon Sep 17 00:00:00 2001 From: emidhun Date: Wed, 16 Apr 2025 14:50:31 +0530 Subject: [PATCH 02/35] test commit --- .github/workflows/cypress-appbuilder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 28b68e1b97..5fe491d267 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -151,7 +151,7 @@ jobs: name: screenshots path: cypress-tests/cypress/screenshots - Cypress-App-builder-Subpath: + Cypress-App-builder-Subpath: runs-on: ubuntu-22.04 if: ${{ github.event.action == 'labeled' && github.event.label.name == 'run-cypress-app-builder-subpath' }} From ce19672625044b2071f4060ba391867c7e074a26 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 11:31:22 +0530 Subject: [PATCH 03/35] test commit-2 --- .github/workflows/cypress-appbuilder.yml | 86 ++++++++---------------- 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 28b68e1b97..7ce862bb0e 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -8,6 +8,7 @@ on: env: PR_NUMBER: ${{ github.event.number }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + TOOLJET_HOST: http://localhost:8082 jobs: Cypress-App-Builder: @@ -32,42 +33,34 @@ jobs: }} steps: - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 18.18.2 - - - name: Set up Git authentication for private submodules + # Step 1: Set up Git authentication for private submodules + - name: Set up Git Authentication for Private Submodules run: | git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" - - name: Checkout with Submodules + # Step 2: Checkout the repository with submodules + - name: Checkout Repository with Submodules uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} + submodules: recursive - - name: Checking out the correct branch for submodules EE + # Step 3: Ensure correct branch for submodules (EE edition only) + - name: Checkout Correct Branch for Submodules (EE Edition) if: matrix.edition == 'ee' run: | git submodule update --init --recursive git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - - - name: Set up Docker - uses: docker-practice/actions-setup-docker@master - - - name: Run PosgtreSQL Database Docker Container - run: | - sudo docker network create tooljet - sudo docker run -d --name postgres --network tooljet -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_PORT=5432 -d postgres:13 - - - name: Checkout - uses: actions/checkout@v3 + # Step 4: Set up Node.js + - name: Setup Node.js + uses: actions/setup-node@v2 with: - ref: ${{ github.event.pull_request.head.ref }} + node-version: 18.18.2 - - name: Install and build dependencies + # Step 5: Install dependencies and build + - name: Install and Build Dependencies run: | npm cache clean --force npm install @@ -75,10 +68,10 @@ jobs: npm install --prefix frontend npm run build:plugins - - name: Set up environment variables + # Step 6: Set up environment variables + - name: Set up Environment Variables run: | - echo "TOOLJET_EDITION=${{ matrix.edition == 'ee' && 'EE' || 'CE' }}" >> .env - echo "TOOLJET_HOST=http://localhost:8082" >> .env + echo "TOOLJET_HOST=${{ env.TOOLJET_HOST }}" >> .env echo "LOCKBOX_MASTER_KEY=cd97331a419c09387bef49787f7da8d2a81d30733f0de6bed23ad8356d2068b2" >> .env echo "SECRET_KEY_BASE=7073b9a35a15dd20914ae17e36a693093f25b74b96517a5fec461fc901c51e011cd142c731bee48c5081ec8bac321c1f259ef097ef2a16f25df17a3798c03426" >> .env echo "PG_DB=tooljet_development" >> .env @@ -87,49 +80,24 @@ jobs: echo "PG_PASS=postgres" >> .env echo "PG_PORT=5432" >> .env echo "ENABLE_TOOLJET_DB=true" >> .env - echo "TOOLJET_DB=tooljet" >> .env - echo "TOOLJET_DB_USER=postgres" >> .env - echo "TOOLJET_DB_HOST=localhost" >> .env - echo "TOOLJET_DB_PASS=postgres" >> .env echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env - echo "PGRST_HOST=localhost:3001" >> .env - echo "TOOLJET_DB_STATEMENT_TIMEOUT=60000" >> .env - echo "TOOLJET_DB_RECONFIG=true" >> .env - - name: Set up database + # Step 7: Set up database + - name: Set up Database run: | npm run --prefix server db:create npm run --prefix server db:reset - - name: sleep 5 - run: sleep 5 - - - name: Run PostgREST Docker Container - run: | - sudo docker run -d --name postgrest --network tooljet -p 3001:3000 \ - -e PGRST_DB_URI="postgres://postgres:postgres@postgres:5432/tooljet" -e PGRST_DB_ANON_ROLE="postgres" -e PGRST_JWT_SECRET="r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" -e PGRST_DB_PRE_CONFIG=postgrest.pre_config \ - postgrest/postgrest:v12.2.0 - - - name: Run plugins compilation in watch mode - run: cd plugins && npm start & - - - name: Run the server - run: cd server && npm run start:dev & - - - name: Run the client - run: cd frontend && npm start & - - - name: Wait for the server to be ready + # Step 8: Wait for the server to be ready + - name: Wait for Server run: | timeout 1500 bash -c ' - until curl --silent --fail http://localhost:8082; do + until curl --silent --fail ${{ env.TOOLJET_HOST }}; do sleep 5 done' - - name: docker logs - run: sudo docker logs postgrest - - - name: Create Cypress environment file + # Step 9: Create Cypress environment file + - name: Create Cypress Environment File id: create-json uses: jsdaniell/create-json@1.1.2 with: @@ -137,13 +105,15 @@ jobs: json: ${{ secrets.CYPRESS_SECRETS }} dir: "./cypress-tests" - - name: App builder + # Step 10: Run Cypress Tests + - name: Run Cypress Tests uses: cypress-io/github-action@v6 with: working-directory: ./cypress-tests - config: "baseUrl=http://localhost:8082" + config: "baseUrl=${{ env.TOOLJET_HOST }}" config-file: cypress-app-builder.config.js + # Step 11: Capture Screenshots - name: Capture Screenshots uses: actions/upload-artifact@v4 if: always() From d8444c7f527733e7e481d5287d767f1255cbf4e2 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 11:38:09 +0530 Subject: [PATCH 04/35] test commit-3 --- .github/workflows/cypress-appbuilder.yml | 69 ++++++++++++------------ 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 7ce862bb0e..563b0b5532 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -11,55 +11,37 @@ env: TOOLJET_HOST: http://localhost:8082 jobs: - Cypress-App-Builder: + # Job 1: Setup Submodules + setup-submodules: runs-on: ubuntu-22.04 - - if: | - github.event.action == 'labeled' && - ( - github.event.label.name == 'run-cypress' || - github.event.label.name == 'run-ce-app-builder' || - github.event.label.name == 'run-ee-app-builder' - ) - - strategy: - matrix: - edition: >- - ${{ - contains(github.event.pull_request.labels.*.name, 'run-cypress') && fromJson('["ce", "ee"]') || - contains(github.event.pull_request.labels.*.name, 'run-ce-app-builder') && fromJson('["ce"]') || - contains(github.event.pull_request.labels.*.name, 'run-ee-app-builder') && fromJson('["ee"]') || - fromJson('[]') - }} - steps: - # Step 1: Set up Git authentication for private submodules - name: Set up Git Authentication for Private Submodules run: | git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" - # Step 2: Checkout the repository with submodules - name: Checkout Repository with Submodules uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} submodules: recursive - # Step 3: Ensure correct branch for submodules (EE edition only) - name: Checkout Correct Branch for Submodules (EE Edition) - if: matrix.edition == 'ee' + if: contains(github.event.pull_request.labels.*.name, 'run-ee-app-builder') run: | git submodule update --init --recursive git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - # Step 4: Set up Node.js + # Job 2: Setup Dependencies + setup-dependencies: + runs-on: ubuntu-22.04 + needs: setup-submodules + steps: - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 18.18.2 - # Step 5: Install dependencies and build - name: Install and Build Dependencies run: | npm cache clean --force @@ -68,7 +50,18 @@ jobs: npm install --prefix frontend npm run build:plugins - # Step 6: Set up environment variables + - name: Set up Docker + uses: docker-practice/actions-setup-docker@master + + - name: Start PostgreSQL Container + run: | + sudo docker network create tooljet || true + sudo docker run -d --name postgres --network tooljet -p 5432:5432 \ + -e POSTGRES_PASSWORD=postgres \ + -e POSTGRES_USER=postgres \ + -e POSTGRES_DB=tooljet_development \ + postgres:13 + - name: Set up Environment Variables run: | echo "TOOLJET_HOST=${{ env.TOOLJET_HOST }}" >> .env @@ -82,21 +75,23 @@ jobs: echo "ENABLE_TOOLJET_DB=true" >> .env echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env - # Step 7: Set up database + # Job 3: Setup Cypress + setup-cypress: + runs-on: ubuntu-22.04 + needs: setup-dependencies + steps: - name: Set up Database run: | npm run --prefix server db:create npm run --prefix server db:reset - # Step 8: Wait for the server to be ready - - name: Wait for Server + - name: Wait for the Server to be Ready run: | timeout 1500 bash -c ' until curl --silent --fail ${{ env.TOOLJET_HOST }}; do sleep 5 done' - # Step 9: Create Cypress environment file - name: Create Cypress Environment File id: create-json uses: jsdaniell/create-json@1.1.2 @@ -105,7 +100,11 @@ jobs: json: ${{ secrets.CYPRESS_SECRETS }} dir: "./cypress-tests" - # Step 10: Run Cypress Tests + # Job 4: Run Cypress Tests + run-cypress: + runs-on: ubuntu-22.04 + needs: setup-cypress + steps: - name: Run Cypress Tests uses: cypress-io/github-action@v6 with: @@ -113,7 +112,11 @@ jobs: config: "baseUrl=${{ env.TOOLJET_HOST }}" config-file: cypress-app-builder.config.js - # Step 11: Capture Screenshots + # Job 5: Save Artifacts + save-artifacts: + runs-on: ubuntu-22.04 + needs: run-cypress + steps: - name: Capture Screenshots uses: actions/upload-artifact@v4 if: always() From 497aabd95aa518c9c9227391368adfb6f83eea78 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 12:21:21 +0530 Subject: [PATCH 05/35] test commit-4 --- .github/workflows/cypress-appbuilder.yml | 37 ++++++++++-------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 563b0b5532..db53a8c417 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -11,20 +11,23 @@ env: TOOLJET_HOST: http://localhost:8082 jobs: - # Job 1: Setup Submodules - setup-submodules: + cypress-appbuilder: runs-on: ubuntu-22.04 + steps: + # Step 1: Set up Git Authentication for Private Submodules - name: Set up Git Authentication for Private Submodules run: | git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" + # Step 2: Checkout Repository with Submodules - name: Checkout Repository with Submodules uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} submodules: recursive + # Step 3: Checkout Correct Branch for Submodules (EE Edition) - name: Checkout Correct Branch for Submodules (EE Edition) if: contains(github.event.pull_request.labels.*.name, 'run-ee-app-builder') run: | @@ -32,16 +35,13 @@ jobs: git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - # Job 2: Setup Dependencies - setup-dependencies: - runs-on: ubuntu-22.04 - needs: setup-submodules - steps: + # Step 4: Setup Node.js - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 18.18.2 + # Step 5: Install and Build Dependencies - name: Install and Build Dependencies run: | npm cache clean --force @@ -50,9 +50,11 @@ jobs: npm install --prefix frontend npm run build:plugins + # Step 6: Set up Docker - name: Set up Docker uses: docker-practice/actions-setup-docker@master + # Step 7: Start PostgreSQL Container - name: Start PostgreSQL Container run: | sudo docker network create tooljet || true @@ -62,6 +64,7 @@ jobs: -e POSTGRES_DB=tooljet_development \ postgres:13 + # Step 8: Set up Environment Variables - name: Set up Environment Variables run: | echo "TOOLJET_HOST=${{ env.TOOLJET_HOST }}" >> .env @@ -75,16 +78,13 @@ jobs: echo "ENABLE_TOOLJET_DB=true" >> .env echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env - # Job 3: Setup Cypress - setup-cypress: - runs-on: ubuntu-22.04 - needs: setup-dependencies - steps: + # Step 9: Set up Database - name: Set up Database run: | npm run --prefix server db:create npm run --prefix server db:reset + # Step 10: Wait for the Server to be Ready - name: Wait for the Server to be Ready run: | timeout 1500 bash -c ' @@ -92,6 +92,7 @@ jobs: sleep 5 done' + # Step 11: Create Cypress Environment File - name: Create Cypress Environment File id: create-json uses: jsdaniell/create-json@1.1.2 @@ -100,11 +101,7 @@ jobs: json: ${{ secrets.CYPRESS_SECRETS }} dir: "./cypress-tests" - # Job 4: Run Cypress Tests - run-cypress: - runs-on: ubuntu-22.04 - needs: setup-cypress - steps: + # Step 12: Run Cypress Tests - name: Run Cypress Tests uses: cypress-io/github-action@v6 with: @@ -112,11 +109,7 @@ jobs: config: "baseUrl=${{ env.TOOLJET_HOST }}" config-file: cypress-app-builder.config.js - # Job 5: Save Artifacts - save-artifacts: - runs-on: ubuntu-22.04 - needs: run-cypress - steps: + # Step 13: Capture Screenshots - name: Capture Screenshots uses: actions/upload-artifact@v4 if: always() From f6895c7c002e7ff27a4e952fed4597291101434c Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 14:11:55 +0530 Subject: [PATCH 06/35] Revert "test commit-4" This reverts commit 497aabd95aa518c9c9227391368adfb6f83eea78. --- .github/workflows/cypress-appbuilder.yml | 37 ++++++++++++++---------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index db53a8c417..563b0b5532 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -11,23 +11,20 @@ env: TOOLJET_HOST: http://localhost:8082 jobs: - cypress-appbuilder: + # Job 1: Setup Submodules + setup-submodules: runs-on: ubuntu-22.04 - steps: - # Step 1: Set up Git Authentication for Private Submodules - name: Set up Git Authentication for Private Submodules run: | git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" - # Step 2: Checkout Repository with Submodules - name: Checkout Repository with Submodules uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} submodules: recursive - # Step 3: Checkout Correct Branch for Submodules (EE Edition) - name: Checkout Correct Branch for Submodules (EE Edition) if: contains(github.event.pull_request.labels.*.name, 'run-ee-app-builder') run: | @@ -35,13 +32,16 @@ jobs: git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - # Step 4: Setup Node.js + # Job 2: Setup Dependencies + setup-dependencies: + runs-on: ubuntu-22.04 + needs: setup-submodules + steps: - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 18.18.2 - # Step 5: Install and Build Dependencies - name: Install and Build Dependencies run: | npm cache clean --force @@ -50,11 +50,9 @@ jobs: npm install --prefix frontend npm run build:plugins - # Step 6: Set up Docker - name: Set up Docker uses: docker-practice/actions-setup-docker@master - # Step 7: Start PostgreSQL Container - name: Start PostgreSQL Container run: | sudo docker network create tooljet || true @@ -64,7 +62,6 @@ jobs: -e POSTGRES_DB=tooljet_development \ postgres:13 - # Step 8: Set up Environment Variables - name: Set up Environment Variables run: | echo "TOOLJET_HOST=${{ env.TOOLJET_HOST }}" >> .env @@ -78,13 +75,16 @@ jobs: echo "ENABLE_TOOLJET_DB=true" >> .env echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env - # Step 9: Set up Database + # Job 3: Setup Cypress + setup-cypress: + runs-on: ubuntu-22.04 + needs: setup-dependencies + steps: - name: Set up Database run: | npm run --prefix server db:create npm run --prefix server db:reset - # Step 10: Wait for the Server to be Ready - name: Wait for the Server to be Ready run: | timeout 1500 bash -c ' @@ -92,7 +92,6 @@ jobs: sleep 5 done' - # Step 11: Create Cypress Environment File - name: Create Cypress Environment File id: create-json uses: jsdaniell/create-json@1.1.2 @@ -101,7 +100,11 @@ jobs: json: ${{ secrets.CYPRESS_SECRETS }} dir: "./cypress-tests" - # Step 12: Run Cypress Tests + # Job 4: Run Cypress Tests + run-cypress: + runs-on: ubuntu-22.04 + needs: setup-cypress + steps: - name: Run Cypress Tests uses: cypress-io/github-action@v6 with: @@ -109,7 +112,11 @@ jobs: config: "baseUrl=${{ env.TOOLJET_HOST }}" config-file: cypress-app-builder.config.js - # Step 13: Capture Screenshots + # Job 5: Save Artifacts + save-artifacts: + runs-on: ubuntu-22.04 + needs: run-cypress + steps: - name: Capture Screenshots uses: actions/upload-artifact@v4 if: always() From 18839d4ef15d52dcc017c4b8273e31aa38e31913 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 14:12:08 +0530 Subject: [PATCH 07/35] Revert "test commit-3" This reverts commit d8444c7f527733e7e481d5287d767f1255cbf4e2. --- .github/workflows/cypress-appbuilder.yml | 69 ++++++++++++------------ 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 563b0b5532..7ce862bb0e 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -11,37 +11,55 @@ env: TOOLJET_HOST: http://localhost:8082 jobs: - # Job 1: Setup Submodules - setup-submodules: + Cypress-App-Builder: runs-on: ubuntu-22.04 + + if: | + github.event.action == 'labeled' && + ( + github.event.label.name == 'run-cypress' || + github.event.label.name == 'run-ce-app-builder' || + github.event.label.name == 'run-ee-app-builder' + ) + + strategy: + matrix: + edition: >- + ${{ + contains(github.event.pull_request.labels.*.name, 'run-cypress') && fromJson('["ce", "ee"]') || + contains(github.event.pull_request.labels.*.name, 'run-ce-app-builder') && fromJson('["ce"]') || + contains(github.event.pull_request.labels.*.name, 'run-ee-app-builder') && fromJson('["ee"]') || + fromJson('[]') + }} + steps: + # Step 1: Set up Git authentication for private submodules - name: Set up Git Authentication for Private Submodules run: | git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" + # Step 2: Checkout the repository with submodules - name: Checkout Repository with Submodules uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} submodules: recursive + # Step 3: Ensure correct branch for submodules (EE edition only) - name: Checkout Correct Branch for Submodules (EE Edition) - if: contains(github.event.pull_request.labels.*.name, 'run-ee-app-builder') + if: matrix.edition == 'ee' run: | git submodule update --init --recursive git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - # Job 2: Setup Dependencies - setup-dependencies: - runs-on: ubuntu-22.04 - needs: setup-submodules - steps: + # Step 4: Set up Node.js - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 18.18.2 + # Step 5: Install dependencies and build - name: Install and Build Dependencies run: | npm cache clean --force @@ -50,18 +68,7 @@ jobs: npm install --prefix frontend npm run build:plugins - - name: Set up Docker - uses: docker-practice/actions-setup-docker@master - - - name: Start PostgreSQL Container - run: | - sudo docker network create tooljet || true - sudo docker run -d --name postgres --network tooljet -p 5432:5432 \ - -e POSTGRES_PASSWORD=postgres \ - -e POSTGRES_USER=postgres \ - -e POSTGRES_DB=tooljet_development \ - postgres:13 - + # Step 6: Set up environment variables - name: Set up Environment Variables run: | echo "TOOLJET_HOST=${{ env.TOOLJET_HOST }}" >> .env @@ -75,23 +82,21 @@ jobs: echo "ENABLE_TOOLJET_DB=true" >> .env echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env - # Job 3: Setup Cypress - setup-cypress: - runs-on: ubuntu-22.04 - needs: setup-dependencies - steps: + # Step 7: Set up database - name: Set up Database run: | npm run --prefix server db:create npm run --prefix server db:reset - - name: Wait for the Server to be Ready + # Step 8: Wait for the server to be ready + - name: Wait for Server run: | timeout 1500 bash -c ' until curl --silent --fail ${{ env.TOOLJET_HOST }}; do sleep 5 done' + # Step 9: Create Cypress environment file - name: Create Cypress Environment File id: create-json uses: jsdaniell/create-json@1.1.2 @@ -100,11 +105,7 @@ jobs: json: ${{ secrets.CYPRESS_SECRETS }} dir: "./cypress-tests" - # Job 4: Run Cypress Tests - run-cypress: - runs-on: ubuntu-22.04 - needs: setup-cypress - steps: + # Step 10: Run Cypress Tests - name: Run Cypress Tests uses: cypress-io/github-action@v6 with: @@ -112,11 +113,7 @@ jobs: config: "baseUrl=${{ env.TOOLJET_HOST }}" config-file: cypress-app-builder.config.js - # Job 5: Save Artifacts - save-artifacts: - runs-on: ubuntu-22.04 - needs: run-cypress - steps: + # Step 11: Capture Screenshots - name: Capture Screenshots uses: actions/upload-artifact@v4 if: always() From b520e43fb6ea3ccb787f7ff10b77dd2e2d412059 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 14:12:11 +0530 Subject: [PATCH 08/35] Revert "test commit-2" This reverts commit ce19672625044b2071f4060ba391867c7e074a26. --- .github/workflows/cypress-appbuilder.yml | 88 ++++++++++++++++-------- 1 file changed, 59 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 7ce862bb0e..28b68e1b97 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -8,7 +8,6 @@ on: env: PR_NUMBER: ${{ github.event.number }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - TOOLJET_HOST: http://localhost:8082 jobs: Cypress-App-Builder: @@ -33,34 +32,42 @@ jobs: }} steps: - # Step 1: Set up Git authentication for private submodules - - name: Set up Git Authentication for Private Submodules + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.18.2 + + - name: Set up Git authentication for private submodules run: | git config --global url."https://x-access-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" - # Step 2: Checkout the repository with submodules - - name: Checkout Repository with Submodules + - name: Checkout with Submodules uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} - submodules: recursive - # Step 3: Ensure correct branch for submodules (EE edition only) - - name: Checkout Correct Branch for Submodules (EE Edition) + - name: Checking out the correct branch for submodules EE if: matrix.edition == 'ee' run: | git submodule update --init --recursive git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - # Step 4: Set up Node.js - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 18.18.2 - # Step 5: Install dependencies and build - - name: Install and Build Dependencies + - name: Set up Docker + uses: docker-practice/actions-setup-docker@master + + - name: Run PosgtreSQL Database Docker Container + run: | + sudo docker network create tooljet + sudo docker run -d --name postgres --network tooljet -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_PORT=5432 -d postgres:13 + + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Install and build dependencies run: | npm cache clean --force npm install @@ -68,10 +75,10 @@ jobs: npm install --prefix frontend npm run build:plugins - # Step 6: Set up environment variables - - name: Set up Environment Variables + - name: Set up environment variables run: | - echo "TOOLJET_HOST=${{ env.TOOLJET_HOST }}" >> .env + echo "TOOLJET_EDITION=${{ matrix.edition == 'ee' && 'EE' || 'CE' }}" >> .env + echo "TOOLJET_HOST=http://localhost:8082" >> .env echo "LOCKBOX_MASTER_KEY=cd97331a419c09387bef49787f7da8d2a81d30733f0de6bed23ad8356d2068b2" >> .env echo "SECRET_KEY_BASE=7073b9a35a15dd20914ae17e36a693093f25b74b96517a5fec461fc901c51e011cd142c731bee48c5081ec8bac321c1f259ef097ef2a16f25df17a3798c03426" >> .env echo "PG_DB=tooljet_development" >> .env @@ -80,24 +87,49 @@ jobs: echo "PG_PASS=postgres" >> .env echo "PG_PORT=5432" >> .env echo "ENABLE_TOOLJET_DB=true" >> .env + echo "TOOLJET_DB=tooljet" >> .env + echo "TOOLJET_DB_USER=postgres" >> .env + echo "TOOLJET_DB_HOST=localhost" >> .env + echo "TOOLJET_DB_PASS=postgres" >> .env echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env + echo "PGRST_HOST=localhost:3001" >> .env + echo "TOOLJET_DB_STATEMENT_TIMEOUT=60000" >> .env + echo "TOOLJET_DB_RECONFIG=true" >> .env - # Step 7: Set up database - - name: Set up Database + - name: Set up database run: | npm run --prefix server db:create npm run --prefix server db:reset - # Step 8: Wait for the server to be ready - - name: Wait for Server + - name: sleep 5 + run: sleep 5 + + - name: Run PostgREST Docker Container + run: | + sudo docker run -d --name postgrest --network tooljet -p 3001:3000 \ + -e PGRST_DB_URI="postgres://postgres:postgres@postgres:5432/tooljet" -e PGRST_DB_ANON_ROLE="postgres" -e PGRST_JWT_SECRET="r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" -e PGRST_DB_PRE_CONFIG=postgrest.pre_config \ + postgrest/postgrest:v12.2.0 + + - name: Run plugins compilation in watch mode + run: cd plugins && npm start & + + - name: Run the server + run: cd server && npm run start:dev & + + - name: Run the client + run: cd frontend && npm start & + + - name: Wait for the server to be ready run: | timeout 1500 bash -c ' - until curl --silent --fail ${{ env.TOOLJET_HOST }}; do + until curl --silent --fail http://localhost:8082; do sleep 5 done' - # Step 9: Create Cypress environment file - - name: Create Cypress Environment File + - name: docker logs + run: sudo docker logs postgrest + + - name: Create Cypress environment file id: create-json uses: jsdaniell/create-json@1.1.2 with: @@ -105,15 +137,13 @@ jobs: json: ${{ secrets.CYPRESS_SECRETS }} dir: "./cypress-tests" - # Step 10: Run Cypress Tests - - name: Run Cypress Tests + - name: App builder uses: cypress-io/github-action@v6 with: working-directory: ./cypress-tests - config: "baseUrl=${{ env.TOOLJET_HOST }}" + config: "baseUrl=http://localhost:8082" config-file: cypress-app-builder.config.js - # Step 11: Capture Screenshots - name: Capture Screenshots uses: actions/upload-artifact@v4 if: always() From b2e291b458198155528a66b20c6009131de213b1 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 15:34:43 +0530 Subject: [PATCH 09/35] Add seeding --- .github/workflows/cypress-appbuilder.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 28b68e1b97..ded986ab3a 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -226,8 +226,17 @@ jobs: sleep 5 done' - - name: Seeding - run: docker exec Tooljet-app npm run db:seed:prod + - name: Seeding (Setup Super Admin) + run: | + curl 'http://localhost:3000/api/onboarding/setup-super-admin' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "companyName": "ToolJet" + "name": "The Developer", + "workspaceName": "Tooljet'\''s workspace", + "email": "dev@tooljet.io", + "password": "password" + }' - name: Create Cypress environment file id: create-json From afcf4fef7f656f3c4934256734ee4b560f463816 Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 15:58:48 +0530 Subject: [PATCH 10/35] Add seeding for all cases --- .github/workflows/cypress-appbuilder.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index ded986ab3a..f4241c1df6 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -126,6 +126,18 @@ jobs: sleep 5 done' + - name: Seeding (Setup Super Admin) + run: | + curl 'http://localhost:3000/api/onboarding/setup-super-admin' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "companyName": "ToolJet" + "name": "The Developer", + "workspaceName": "Tooljet'\''s workspace", + "email": "dev@tooljet.io", + "password": "password" + }' + - name: docker logs run: sudo docker logs postgrest From f0c5e5faa316e2614e496275d8721a468263d76e Mon Sep 17 00:00:00 2001 From: emidhun Date: Mon, 21 Apr 2025 16:20:35 +0530 Subject: [PATCH 11/35] Fix typo --- .github/workflows/cypress-appbuilder.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index f4241c1df6..ef1ae4e3c4 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -131,13 +131,13 @@ jobs: curl 'http://localhost:3000/api/onboarding/setup-super-admin' \ -H 'Content-Type: application/json' \ --data-raw '{ - "companyName": "ToolJet" + "companyName": "ToolJet", "name": "The Developer", "workspaceName": "Tooljet'\''s workspace", "email": "dev@tooljet.io", "password": "password" }' - + - name: docker logs run: sudo docker logs postgrest @@ -243,7 +243,7 @@ jobs: curl 'http://localhost:3000/api/onboarding/setup-super-admin' \ -H 'Content-Type: application/json' \ --data-raw '{ - "companyName": "ToolJet" + "companyName": "ToolJet",, "name": "The Developer", "workspaceName": "Tooljet'\''s workspace", "email": "dev@tooljet.io", From 6a4edb95345ccadea74c2b68d4cf2e9414620a22 Mon Sep 17 00:00:00 2001 From: emidhun Date: Tue, 22 Apr 2025 15:28:41 +0530 Subject: [PATCH 12/35] temp 1 --- .github/workflows/cypress-appbuilder.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index ef1ae4e3c4..6299501ae8 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -47,13 +47,11 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} - name: Checking out the correct branch for submodules EE - if: matrix.edition == 'ee' run: | git submodule update --init --recursive git submodule foreach --recursive ' git checkout ${{ env.BRANCH_NAME }} 2>/dev/null || git checkout main' - - name: Set up Docker uses: docker-practice/actions-setup-docker@master @@ -77,7 +75,7 @@ jobs: - name: Set up environment variables run: | - echo "TOOLJET_EDITION=${{ matrix.edition == 'ee' && 'EE' || 'CE' }}" >> .env + echo "TOOLJET_EDITION=${{ matrix.edition == 'ee' && 'ee' || 'ce' }}" >> .env echo "TOOLJET_HOST=http://localhost:8082" >> .env echo "LOCKBOX_MASTER_KEY=cd97331a419c09387bef49787f7da8d2a81d30733f0de6bed23ad8356d2068b2" >> .env echo "SECRET_KEY_BASE=7073b9a35a15dd20914ae17e36a693093f25b74b96517a5fec461fc901c51e011cd142c731bee48c5081ec8bac321c1f259ef097ef2a16f25df17a3798c03426" >> .env From 5974dbc60a2396b12a4a50f29b634b5bb8b52e8f Mon Sep 17 00:00:00 2001 From: emidhun Date: Tue, 22 Apr 2025 15:54:27 +0530 Subject: [PATCH 13/35] temp 2 --- .github/workflows/cypress-appbuilder.yml | 63 ++++++++++++------------ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/cypress-appbuilder.yml b/.github/workflows/cypress-appbuilder.yml index 6299501ae8..a4de1aba20 100644 --- a/.github/workflows/cypress-appbuilder.yml +++ b/.github/workflows/cypress-appbuilder.yml @@ -47,6 +47,7 @@ jobs: ref: ${{ github.event.pull_request.head.ref }} - name: Checking out the correct branch for submodules EE + if: matrix.edition == 'ee' run: | git submodule update --init --recursive git submodule foreach --recursive ' @@ -55,16 +56,6 @@ jobs: - name: Set up Docker uses: docker-practice/actions-setup-docker@master - - name: Run PosgtreSQL Database Docker Container - run: | - sudo docker network create tooljet - sudo docker run -d --name postgres --network tooljet -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_PORT=5432 -d postgres:13 - - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - - name: Install and build dependencies run: | npm cache clean --force @@ -73,49 +64,57 @@ jobs: npm install --prefix frontend npm run build:plugins + - name: Local development setup + run: | + sudo docker network create tooljet + sudo docker run -d --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_PORT=5432 -d postgres:13 + + - name: Run PostgREST Docker Container + run: | + sudo docker run -d --name postgrest --network tooljet -p 3001:3000 \ + -e PGRST_DB_URI="postgres://postgres:postgres@localhost:5432/tooljet" \ + -e PGRST_DB_ANON_ROLE="postgres" \ + -e PGRST_JWT_SECRET="r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" \ + -e PGRST_DB_PRE_CONFIG=postgrest.pre_config \ + postgrest/postgrest:v12.2.0 + - name: Set up environment variables run: | - echo "TOOLJET_EDITION=${{ matrix.edition == 'ee' && 'ee' || 'ce' }}" >> .env + echo "TOOLJET_EDITION=${{ matrix.edition == 'ee' && 'ee' || 'ce' }}" >> .env echo "TOOLJET_HOST=http://localhost:8082" >> .env echo "LOCKBOX_MASTER_KEY=cd97331a419c09387bef49787f7da8d2a81d30733f0de6bed23ad8356d2068b2" >> .env - echo "SECRET_KEY_BASE=7073b9a35a15dd20914ae17e36a693093f25b74b96517a5fec461fc901c51e011cd142c731bee48c5081ec8bac321c1f259ef097ef2a16f25df17a3798c03426" >> .env + echo "SECRET_KEY_BASE=7073b9a35a15dd20914ae17e36a693093f25b74b96517a5fec461fc901c51e011cd142c731bee48c5081ec8bac321c1f259ef097ef2a16f25df17a3798c03426" >> .env echo "PG_DB=tooljet_development" >> .env echo "PG_USER=postgres" >> .env echo "PG_HOST=localhost" >> .env echo "PG_PASS=postgres" >> .env echo "PG_PORT=5432" >> .env echo "ENABLE_TOOLJET_DB=true" >> .env - echo "TOOLJET_DB=tooljet" >> .env + echo "TOOLJET_DB=tooljet_db" >> .env echo "TOOLJET_DB_USER=postgres" >> .env echo "TOOLJET_DB_HOST=localhost" >> .env echo "TOOLJET_DB_PASS=postgres" >> .env - echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env - echo "PGRST_HOST=localhost:3001" >> .env echo "TOOLJET_DB_STATEMENT_TIMEOUT=60000" >> .env echo "TOOLJET_DB_RECONFIG=true" >> .env + echo "PGRST_JWT_SECRET=r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" >> .env + echo "PGRST_HOST=localhost:3001" >> .env + echo "PGRST_DB_PRE_CONFIG=postgrest.pre_config" >> .env + echo "PGRST_DB_URI=postgres://postgres:postgres@localhost:5432/tooljet" >> .env + echo "ENABLE_MARKETPLACE_FEATURE=true" >> .env + echo "ENABLE_MARKETPLACE_DEV_MODE=true" >> .env + echo "ENABLE_PRIVATE_APP_EMBED=true" >> .env - name: Set up database run: | npm run --prefix server db:create npm run --prefix server db:reset + sleep 5 - - name: sleep 5 - run: sleep 5 - - - name: Run PostgREST Docker Container + - name: Start services run: | - sudo docker run -d --name postgrest --network tooljet -p 3001:3000 \ - -e PGRST_DB_URI="postgres://postgres:postgres@postgres:5432/tooljet" -e PGRST_DB_ANON_ROLE="postgres" -e PGRST_JWT_SECRET="r9iMKoe5CRMgvJBBtp4HrqN7QiPpUToj" -e PGRST_DB_PRE_CONFIG=postgrest.pre_config \ - postgrest/postgrest:v12.2.0 - - - name: Run plugins compilation in watch mode - run: cd plugins && npm start & - - - name: Run the server - run: cd server && npm run start:dev & - - - name: Run the client - run: cd frontend && npm start & + cd plugins && npm start & + cd server && npm run start:dev & + cd frontend && npm start & - name: Wait for the server to be ready run: | @@ -158,7 +157,7 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: screenshots + name: screenshots-appbuilder-${{ matrix.edition }} path: cypress-tests/cypress/screenshots Cypress-App-builder-Subpath: From fcd6752283d07ca9bb057ed6ceff87b50cdcc4b1 Mon Sep 17 00:00:00 2001 From: emidhun Date: Wed, 23 Apr 2025 13:33:10 +0530 Subject: [PATCH 14/35] temp 3 --- cypress-tests/cypress-app-builder.config.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress-tests/cypress-app-builder.config.js b/cypress-tests/cypress-app-builder.config.js index 7dc482d59d..186a1fd239 100644 --- a/cypress-tests/cypress-app-builder.config.js +++ b/cypress-tests/cypress-app-builder.config.js @@ -19,9 +19,9 @@ module.exports = defineConfig({ trashAssetsBeforeRuns: true, e2e: { - setupNodeEvents (on, config) { + setupNodeEvents(on, config) { on("task", { - readPdf (pathToPdf) { + readPdf(pathToPdf) { return new Promise((resolve) => { const pdfPath = path.resolve(pathToPdf); let dataBuffer = fs.readFileSync(pdfPath); @@ -33,7 +33,7 @@ module.exports = defineConfig({ }); on("task", { - readXlsx (filePath) { + readXlsx(filePath) { return new Promise((resolve, reject) => { try { let dataBuffer = fs.readFileSync(filePath); @@ -48,7 +48,7 @@ module.exports = defineConfig({ }); on("task", { - deleteFolder (folderName) { + deleteFolder(folderName) { return new Promise((resolve, reject) => { rmdir(folderName, { maxRetries: 10, recursive: true }, (err) => { if (err) { @@ -62,7 +62,7 @@ module.exports = defineConfig({ }); on("task", { - dbConnection ({ dbconfig, sql }) { + dbConnection({ dbconfig, sql }) { const client = new pg.Pool(dbconfig); return client.query(sql); }, @@ -76,7 +76,7 @@ module.exports = defineConfig({ experimentalRunAllSpecs: true, baseUrl: "http://localhost:8082", specPattern: [ - "cypress/e2e/happyPath/appbuilder/commonTestcases/**/*.cy.js", + "cypress/e2e/happyPath/appbuilder/commonTestcases/!(*components)/**/*.cy.js", "cypress/e2e/happyPath/appbuilder/ceTestcases/**/*.cy.js" ], numTestsKeptInMemory: 1, From 599dbce7934fbe3aa9eeab608668b62976b9605e Mon Sep 17 00:00:00 2001 From: emidhun Date: Wed, 23 Apr 2025 14:01:34 +0530 Subject: [PATCH 15/35] Add data-cy --- .../appbuilder/commonTestcases/componentsBasics/button.cy.js | 2 +- .../appbuilder/commonTestcases/componentsBasics/checkbox.cy.js | 2 +- .../appbuilder/commonTestcases/componentsBasics/dropdown.cy.js | 2 +- .../commonTestcases/componentsBasics/multiselect.cy.js | 2 +- .../commonTestcases/componentsBasics/numberInput.cy.js | 2 +- .../commonTestcases/componentsBasics/passwordInput.cy.js | 2 +- .../appbuilder/commonTestcases/componentsBasics/textInput.cy.js | 2 +- .../commonTestcases/componentsBasics/toggleSwitch.cy.js | 2 +- frontend/src/AppBuilder/QueryPanel/QueryPanel.jsx | 1 + 9 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/button.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/button.cy.js index 08a7eda733..22cf3cc5a4 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/button.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/button.cy.js @@ -76,7 +76,7 @@ describe('Button Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Button-App`); cy.openApp(); cy.dragAndDropWidget("Button", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/checkbox.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/checkbox.cy.js index c45895a1c4..2f3cf01076 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/checkbox.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/checkbox.cy.js @@ -84,7 +84,7 @@ describe('Checkbox Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Checkbox-App`); cy.openApp(); cy.dragAndDropWidget("Checkbox", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/dropdown.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/dropdown.cy.js index f13cc17059..53dcf30a54 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/dropdown.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/dropdown.cy.js @@ -93,7 +93,7 @@ describe('Dropdown Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Dropdown-App`); cy.openApp(); cy.dragAndDropWidget("Dropdown", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/multiselect.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/multiselect.cy.js index 85f2cb72e9..a917ef77e6 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/multiselect.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/multiselect.cy.js @@ -96,7 +96,7 @@ describe('Multiselect Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Multiselect-App`); cy.openApp(); cy.dragAndDropWidget("Multiselect", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/numberInput.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/numberInput.cy.js index 6d957b1804..4c7853e7d2 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/numberInput.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/numberInput.cy.js @@ -87,7 +87,7 @@ describe('Number Input Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Numberinput-App`); cy.openApp(); cy.dragAndDropWidget("Number Input", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/passwordInput.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/passwordInput.cy.js index 18db9dc07f..25f5ad02e4 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/passwordInput.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/passwordInput.cy.js @@ -87,7 +87,7 @@ describe('Password Input Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Passwordinput-App`); cy.openApp(); cy.dragAndDropWidget("Password Input", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/textInput.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/textInput.cy.js index caec00b2cd..9b0df38c29 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/textInput.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/textInput.cy.js @@ -95,7 +95,7 @@ describe('Text Input Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Textinput-App`); cy.openApp(); cy.dragAndDropWidget("Text Input", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/toggleSwitch.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/toggleSwitch.cy.js index 2dabba3d06..b1cef7c43d 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/toggleSwitch.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/componentsBasics/toggleSwitch.cy.js @@ -80,7 +80,7 @@ describe('ToggleSwitch Component Tests', () => { cy.apiCreateApp(`${fake.companyName}-Toggle-App`); cy.openApp(); cy.dragAndDropWidget("Toggle Switch", 50, 50); - cy.get('[data-cy="query-manager-collapse-button"]').click(); + cy.get('[data-cy="query-manager-toggle-button"]').click(); }); it('should verify all the exposed values on inspector', () => { diff --git a/frontend/src/AppBuilder/QueryPanel/QueryPanel.jsx b/frontend/src/AppBuilder/QueryPanel/QueryPanel.jsx index ea8623b0c1..0a31cb5286 100644 --- a/frontend/src/AppBuilder/QueryPanel/QueryPanel.jsx +++ b/frontend/src/AppBuilder/QueryPanel/QueryPanel.jsx @@ -169,6 +169,7 @@ export const QueryPanel = ({ darkMode }) => { }} >