From cab167cfa7131b3b7eaffb9925ffa5bb30e0c343 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 13:52:04 +0100 Subject: [PATCH 01/39] [ACS-9102] Local ACS deployment draft --- .github/workflows/deploy-local-acs.yml | 168 +++++++++++++++++++++++++ .github/workflows/pull-request.yml | 8 +- 2 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-local-acs.yml diff --git a/.github/workflows/deploy-local-acs.yml b/.github/workflows/deploy-local-acs.yml new file mode 100644 index 0000000000..eb7f3b5f67 --- /dev/null +++ b/.github/workflows/deploy-local-acs.yml @@ -0,0 +1,168 @@ +name: Deploy local ACS for E2E testing +on: + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + # I think it's not required as we need just an automation to get latest ACS + # build_vars: + # runs-on: ubuntu-latest + # if: >- + # github.event_name == 'push' + # || ( + # && github.actor != 'dependabot[bot]' + # ) + # outputs: + # ver_json: ${{ steps.app_versions.outputs.json }} + # steps: + # - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + # with: + # fetch-depth: 0 + # - name: Get charts + # id: getcharts + # uses: ./.github/actions/charts-as-json + # with: + # charts-root: helm + # - name: Select ACS enterprise versions excluding any deprecated versions + # id: app_versions + # env: + # JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }} + # JQ_FILTER: >- + # [inputs | .charts[] | {name: .name, values: .values[]} + # | del(. | select(.values=="community_values.yaml")) + # | del(. | select(.values=="7.2.N_values.yaml")) + # | select(.name=="alfresco-content-services")] + # run: | + # echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}' + # VERS=$(echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}') + # echo "json=$VERS" >> $GITHUB_OUTPUT + helm_integration: + runs-on: alfrescoPub-ubuntu2204-16G-4CPU + timeout-minutes: 12 + name: Deploy env (name to be updated) + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 + with: + version: "3.14.3" + + - name: Login to Docker Hub + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to Quay.io + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Setup cluster + uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.4.0 + with: + ingress-nginx-ref: controller-v1.8.2 + metrics: "true" + + - name: Set nginx ingress config + run: >- + kubectl -n ingress-nginx patch cm ingress-nginx-controller + -p '{"data": {"allow-snippet-annotations":"true"}}' + + - name: Create registries auth secret + run: >- + kubectl create secret generic regcred + --from-file=.dockerconfigjson=$HOME/.docker/config.json + --type=kubernetes.io/dockerconfigjson + + # to be skipped imo + # - name: Check if cgroup v2 workaround is needed + # if: startsWith(matrix.values, '7.') + # env: + # VALUES_FILE: ${{ matrix.values }} + # id: cgroupv2-workaround-extra-values + # run: | + # if [ ${VALUES_FILE:2:1} -le 2 ]; then + # echo "Enabling cgroupv v2 workaround" + # echo "helm_install_params=--values test/cgroup-v2-workaround-values.yaml" >> "$GITHUB_OUTPUT" + # fi + + # - name: Check if we want additional helm customizations + # id: configurable-extra-values + # run: | + # if [ "${{ matrix.values }}" = "pre-release_values.yaml" ] || [ "${{ matrix.values }}" = "values.yaml" ]; then + # echo "Enabling clustered tests with 2 replicas" + # echo "helm_install_params=--set alfresco-repository.replicaCount=2" >> "$GITHUB_OUTPUT" + # fi + + - name: Add dependency chart repos + run: | + helm repo add self https://alfresco.github.io/alfresco-helm-charts/ + helm repo add elastic https://helm.elastic.co/ + + # Name and value to be fetched by automation?? + - name: Helm install + run: >- + helm dep build ./helm/alfresco-content-services && + helm install acs ./helm/alfresco-content-services + --set global.search.sharedSecret="$(openssl rand -hex 24)" + --set global.known_urls=http://localhost + --set global.alfrescoRegistryPullSecrets=regcred + --values helm/${{ matrix.name }}/${{ matrix.values }} + --values test/enterprise-integration-test-values.yaml + + # what about values here?? + - name: Watch Helm deployment + env: + VALUES_FILE: ${{ matrix.values }} + run: | + kubectl get pods --watch & + KWPID=$! + kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID + if [ "${VALUES_FILE:0:2}" != "7." ] ; then echo -n "Waiting for ESC Reindexing job to complete... " + kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing + echo "Completed." + fi + + - name: Spit cluster status after install + if: always() + run: | + helm ls --all-namespaces --all + helm status acs --show-resources + kubectl describe pod + + - name: Run Newman tests + uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 + id: newman + with: + timeout_minutes: 1 + retry_wait_seconds: 20 + max_attempts: 5 + command: >- + docker run --network=host + -v $(pwd)/test/postman:/etc/postman + -t postman/newman run /etc/postman/helm/acs-test-helm-collection.json + --global-var protocol=http --global-var url=localhost + + - name: Spit cluster status after newman tests + if: always() && steps.newman.outcome != 'skipped' + run: | + kubectl get all --all-namespaces + kubectl describe pod + kubectl events --for deployment/acs-alfresco-repository + + - name: Run helm test + id: helm_test + run: helm test acs + + - name: Spit cluster status after helm test + if: always() && steps.helm_test.outcome != 'skipped' + run: | + kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 + kubectl get all --all-namespaces + kubectl describe pod + kubectl events --for deployment/acs-alfresco-repository diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 6cdbd0c7f0..0571dc6063 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -102,8 +102,12 @@ jobs: if: ${{ github.event_name != 'pull_request' }} run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS + deploy-local-acs: + uses: ./.github/workflows/deploy-local-acs.yml + secrets: inherit + e2es-playwright: - needs: [lint, build, unit-tests] + needs: [lint, build, unit-tests, deploy-local-acs] name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' runs-on: ubuntu-latest strategy: @@ -180,7 +184,7 @@ jobs: finalize: if: ${{ always() }} - needs: [lint, build, unit-tests, e2es-playwright] + needs: [lint, build, unit-tests, deploy-local-acs , e2es-playwright] name: 'Finalize' runs-on: ubuntu-latest steps: From 3b5bf56dcd27489bb69ceef8928321331ad86cf4 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 14:54:50 +0100 Subject: [PATCH 02/39] [ACS-9102] Move ACS deployment to composite action --- .github/actions/deploy-local-acs/action.yml | 99 ++++++++++++ .github/workflows/deploy-local-acs.yml | 168 -------------------- .github/workflows/pull-request.yml | 7 +- 3 files changed, 102 insertions(+), 172 deletions(-) create mode 100644 .github/actions/deploy-local-acs/action.yml delete mode 100644 .github/workflows/deploy-local-acs.yml diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml new file mode 100644 index 0000000000..87d7b0d30e --- /dev/null +++ b/.github/actions/deploy-local-acs/action.yml @@ -0,0 +1,99 @@ +name: Deploy local ACS for E2E testing + +runs: + using: "composite" + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 + with: + version: "3.14.3" + + - name: Login to Docker Hub + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to Quay.io + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Setup cluster + uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.4.0 + with: + ingress-nginx-ref: controller-v1.8.2 + metrics: "true" + + - name: Set nginx ingress config + run: >- + kubectl -n ingress-nginx patch cm ingress-nginx-controller + -p '{"data": {"allow-snippet-annotations":"true"}}' + + - name: Create registries auth secret + run: >- + kubectl create secret generic regcred + --from-file=.dockerconfigjson=$HOME/.docker/config.json + --type=kubernetes.io/dockerconfigjson + + # to be skipped imo + # - name: Check if cgroup v2 workaround is needed + # if: startsWith(matrix.values, '7.') + # env: + # VALUES_FILE: ${{ matrix.values }} + # id: cgroupv2-workaround-extra-values + # run: | + # if [ ${VALUES_FILE:2:1} -le 2 ]; then + # echo "Enabling cgroupv v2 workaround" + # echo "helm_install_params=--values test/cgroup-v2-workaround-values.yaml" >> "$GITHUB_OUTPUT" + # fi + + # - name: Check if we want additional helm customizations + # id: configurable-extra-values + # run: | + # if [ "${{ matrix.values }}" = "pre-release_values.yaml" ] || [ "${{ matrix.values }}" = "values.yaml" ]; then + # echo "Enabling clustered tests with 2 replicas" + # echo "helm_install_params=--set alfresco-repository.replicaCount=2" >> "$GITHUB_OUTPUT" + # fi + + - name: Add dependency chart repos + run: | + helm repo add self https://alfresco.github.io/alfresco-helm-charts/ + helm repo add elastic https://helm.elastic.co/ + + - name: Checkout acs-deployment sources + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: Alfresco/acs-deployment + ref: ${{ env.ACS_DEPLOYMENT_VERSION }} + path: acs-deployment + + # Name and value to be fetched by automation?? + - name: Helm install + run: >- + helm dep build acs-deployment/helm/alfresco-content-services && + helm install acs acs-deployment/helm/alfresco-content-services + --set global.search.sharedSecret="$(openssl rand -hex 24)" + --set global.known_urls=http://localhost + --set global.alfrescoRegistryPullSecrets=regcred + --values helm/${{ matrix.name }}/${{ matrix.values }} + --values test/enterprise-integration-test-values.yaml + + - name: Watch Helm deployment + run: | + kubectl get pods --watch & + KWPID=$! + kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID + echo -n "Waiting for ESC Reindexing job to complete... " + kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing + echo "Completed." + + - name: Spit cluster status after install + if: always() + run: | + helm ls --all-namespaces --all + helm status acs --show-resources + kubectl describe pod diff --git a/.github/workflows/deploy-local-acs.yml b/.github/workflows/deploy-local-acs.yml deleted file mode 100644 index eb7f3b5f67..0000000000 --- a/.github/workflows/deploy-local-acs.yml +++ /dev/null @@ -1,168 +0,0 @@ -name: Deploy local ACS for E2E testing -on: - workflow_call: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -jobs: - # I think it's not required as we need just an automation to get latest ACS - # build_vars: - # runs-on: ubuntu-latest - # if: >- - # github.event_name == 'push' - # || ( - # && github.actor != 'dependabot[bot]' - # ) - # outputs: - # ver_json: ${{ steps.app_versions.outputs.json }} - # steps: - # - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - # with: - # fetch-depth: 0 - # - name: Get charts - # id: getcharts - # uses: ./.github/actions/charts-as-json - # with: - # charts-root: helm - # - name: Select ACS enterprise versions excluding any deprecated versions - # id: app_versions - # env: - # JSON: ${{ toJSON(fromJSON(steps.getcharts.outputs.all)) }} - # JQ_FILTER: >- - # [inputs | .charts[] | {name: .name, values: .values[]} - # | del(. | select(.values=="community_values.yaml")) - # | del(. | select(.values=="7.2.N_values.yaml")) - # | select(.name=="alfresco-content-services")] - # run: | - # echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}' - # VERS=$(echo "${JSON}" | jq -nc '${{ env.JQ_FILTER }}') - # echo "json=$VERS" >> $GITHUB_OUTPUT - helm_integration: - runs-on: alfrescoPub-ubuntu2204-16G-4CPU - timeout-minutes: 12 - name: Deploy env (name to be updated) - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 - with: - version: "3.14.3" - - - name: Login to Docker Hub - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to Quay.io - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Setup cluster - uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.4.0 - with: - ingress-nginx-ref: controller-v1.8.2 - metrics: "true" - - - name: Set nginx ingress config - run: >- - kubectl -n ingress-nginx patch cm ingress-nginx-controller - -p '{"data": {"allow-snippet-annotations":"true"}}' - - - name: Create registries auth secret - run: >- - kubectl create secret generic regcred - --from-file=.dockerconfigjson=$HOME/.docker/config.json - --type=kubernetes.io/dockerconfigjson - - # to be skipped imo - # - name: Check if cgroup v2 workaround is needed - # if: startsWith(matrix.values, '7.') - # env: - # VALUES_FILE: ${{ matrix.values }} - # id: cgroupv2-workaround-extra-values - # run: | - # if [ ${VALUES_FILE:2:1} -le 2 ]; then - # echo "Enabling cgroupv v2 workaround" - # echo "helm_install_params=--values test/cgroup-v2-workaround-values.yaml" >> "$GITHUB_OUTPUT" - # fi - - # - name: Check if we want additional helm customizations - # id: configurable-extra-values - # run: | - # if [ "${{ matrix.values }}" = "pre-release_values.yaml" ] || [ "${{ matrix.values }}" = "values.yaml" ]; then - # echo "Enabling clustered tests with 2 replicas" - # echo "helm_install_params=--set alfresco-repository.replicaCount=2" >> "$GITHUB_OUTPUT" - # fi - - - name: Add dependency chart repos - run: | - helm repo add self https://alfresco.github.io/alfresco-helm-charts/ - helm repo add elastic https://helm.elastic.co/ - - # Name and value to be fetched by automation?? - - name: Helm install - run: >- - helm dep build ./helm/alfresco-content-services && - helm install acs ./helm/alfresco-content-services - --set global.search.sharedSecret="$(openssl rand -hex 24)" - --set global.known_urls=http://localhost - --set global.alfrescoRegistryPullSecrets=regcred - --values helm/${{ matrix.name }}/${{ matrix.values }} - --values test/enterprise-integration-test-values.yaml - - # what about values here?? - - name: Watch Helm deployment - env: - VALUES_FILE: ${{ matrix.values }} - run: | - kubectl get pods --watch & - KWPID=$! - kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID - if [ "${VALUES_FILE:0:2}" != "7." ] ; then echo -n "Waiting for ESC Reindexing job to complete... " - kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing - echo "Completed." - fi - - - name: Spit cluster status after install - if: always() - run: | - helm ls --all-namespaces --all - helm status acs --show-resources - kubectl describe pod - - - name: Run Newman tests - uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 - id: newman - with: - timeout_minutes: 1 - retry_wait_seconds: 20 - max_attempts: 5 - command: >- - docker run --network=host - -v $(pwd)/test/postman:/etc/postman - -t postman/newman run /etc/postman/helm/acs-test-helm-collection.json - --global-var protocol=http --global-var url=localhost - - - name: Spit cluster status after newman tests - if: always() && steps.newman.outcome != 'skipped' - run: | - kubectl get all --all-namespaces - kubectl describe pod - kubectl events --for deployment/acs-alfresco-repository - - - name: Run helm test - id: helm_test - run: helm test acs - - - name: Spit cluster status after helm test - if: always() && steps.helm_test.outcome != 'skipped' - run: | - kubectl logs -l app.kubernetes.io/component=dtas --tail=-1 - kubectl get all --all-namespaces - kubectl describe pod - kubectl events --for deployment/acs-alfresco-repository diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0571dc6063..d7a083e50b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -102,10 +102,6 @@ jobs: if: ${{ github.event_name != 'pull_request' }} run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS - deploy-local-acs: - uses: ./.github/workflows/deploy-local-acs.yml - secrets: inherit - e2es-playwright: needs: [lint, build, unit-tests, deploy-local-acs] name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' @@ -169,6 +165,9 @@ jobs: path: ./dist/content-ce key: cache-dist-${{ github.run_id }} + - name: Deploy local ACS + uses: ./.github/actions/deploy-local-acs + - name: Before e2e uses: ./.github/actions/before-e2e From df03d316356cc3c3eb7bd0c047facdb30b87d4f6 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 14:56:30 +0100 Subject: [PATCH 03/39] [ACS-9102] Remove obsolete checks --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d7a083e50b..867b8ed3bb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -103,7 +103,7 @@ jobs: run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS e2es-playwright: - needs: [lint, build, unit-tests, deploy-local-acs] + needs: [lint, build, unit-tests] name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' runs-on: ubuntu-latest strategy: @@ -183,7 +183,7 @@ jobs: finalize: if: ${{ always() }} - needs: [lint, build, unit-tests, deploy-local-acs , e2es-playwright] + needs: [lint, build, unit-tests, e2es-playwright] name: 'Finalize' runs-on: ubuntu-latest steps: From eddb4b4045e4b950f29f6b0108c8b60dd2b11662 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 15:08:48 +0100 Subject: [PATCH 04/39] [ACS-9102] Proper secrets for ACS deployment --- .github/actions/deploy-local-acs/action.yml | 22 +++++++++++++++++---- .github/workflows/pull-request.yml | 5 +++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index 87d7b0d30e..92448e5f25 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -1,5 +1,19 @@ name: Deploy local ACS for E2E testing +inputs: + docker_username: + description: 'Docker username' + required: true + docker_password: + description: 'Docker password' + required: true + quay_username: + description: 'Quay username' + required: true + quay_password: + description: 'Quay password' + required: true + runs: using: "composite" steps: @@ -12,15 +26,15 @@ runs: - name: Login to Docker Hub uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ inputs.docker_username }} + password: ${{ inputs.docker_password }} - name: Login to Quay.io uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 with: registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} + username: ${{ inputs.quay_username }} + password: ${{ inputs.quay_password }} - name: Setup cluster uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v8.4.0 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 867b8ed3bb..9c29e1392d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -167,6 +167,11 @@ jobs: - name: Deploy local ACS uses: ./.github/actions/deploy-local-acs + with: + docker_username: ${{ secrets.DOCKER_USERNAME }} + docker_password: ${{ secrets.DOCKER_PASSWORD }} + quay_username: ${{ secrets.QUAY_USERNAME }} + quay_password: ${{ secrets.QUAY_PASSWORD }} - name: Before e2e uses: ./.github/actions/before-e2e From 7835348ee84d4df509a3e22c04b032b62c8bd970 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 15:19:44 +0100 Subject: [PATCH 05/39] [ACS-9102] Add required shell property --- .github/actions/deploy-local-acs/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index 92448e5f25..1d3b6d5988 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -43,11 +43,13 @@ runs: metrics: "true" - name: Set nginx ingress config + shell: bash run: >- kubectl -n ingress-nginx patch cm ingress-nginx-controller -p '{"data": {"allow-snippet-annotations":"true"}}' - name: Create registries auth secret + shell: bash run: >- kubectl create secret generic regcred --from-file=.dockerconfigjson=$HOME/.docker/config.json @@ -74,6 +76,7 @@ runs: # fi - name: Add dependency chart repos + shell: bash run: | helm repo add self https://alfresco.github.io/alfresco-helm-charts/ helm repo add elastic https://helm.elastic.co/ From 8cea9d09f6b69dda3c7315977c469cb798473c40 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 15:39:53 +0100 Subject: [PATCH 06/39] [ACS-9102] Use fixed acs deployment version --- .github/actions/deploy-local-acs/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index 1d3b6d5988..c4edb597b0 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -82,11 +82,11 @@ runs: helm repo add elastic https://helm.elastic.co/ - name: Checkout acs-deployment sources - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - repository: Alfresco/acs-deployment - ref: ${{ env.ACS_DEPLOYMENT_VERSION }} - path: acs-deployment + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: Alfresco/acs-deployment + ref: 8.6.1 + path: acs-deployment # Name and value to be fetched by automation?? - name: Helm install From 15793c86303d3692a4160f2a56a64b74d143ee89 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 15:44:13 +0100 Subject: [PATCH 07/39] [ACS-9102] Proper acs deployment tag --- .github/actions/deploy-local-acs/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index c4edb597b0..b6a04dd436 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -85,7 +85,7 @@ runs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: repository: Alfresco/acs-deployment - ref: 8.6.1 + ref: v8.6.1 path: acs-deployment # Name and value to be fetched by automation?? From 35005a9a00422163e4028ea6c584256fe9281922 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 15:51:58 +0100 Subject: [PATCH 08/39] [ACS-9102] Add required shell property --- .github/actions/deploy-local-acs/action.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index b6a04dd436..461bdaa221 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -90,6 +90,7 @@ runs: # Name and value to be fetched by automation?? - name: Helm install + shell: bash run: >- helm dep build acs-deployment/helm/alfresco-content-services && helm install acs acs-deployment/helm/alfresco-content-services @@ -100,16 +101,18 @@ runs: --values test/enterprise-integration-test-values.yaml - name: Watch Helm deployment - run: | - kubectl get pods --watch & - KWPID=$! - kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID - echo -n "Waiting for ESC Reindexing job to complete... " - kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing - echo "Completed." + shell: bash + run: | + kubectl get pods --watch & + KWPID=$! + kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID + echo -n "Waiting for ESC Reindexing job to complete... " + kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing + echo "Completed." - name: Spit cluster status after install if: always() + shell: bash run: | helm ls --all-namespaces --all helm status acs --show-resources From 177a7770f7a11322f6c51482a63410cf115097fe Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 16:05:09 +0100 Subject: [PATCH 09/39] [ACS-9102] Fix helm install params --- .github/actions/deploy-local-acs/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index 461bdaa221..d751699a72 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -97,8 +97,7 @@ runs: --set global.search.sharedSecret="$(openssl rand -hex 24)" --set global.known_urls=http://localhost --set global.alfrescoRegistryPullSecrets=regcred - --values helm/${{ matrix.name }}/${{ matrix.values }} - --values test/enterprise-integration-test-values.yaml + --values acs-deployment/test/enterprise-integration-test-values.yaml - name: Watch Helm deployment shell: bash From 4c2a0b40f7e91a0af5ccb129dbc4ccc661b65fbb Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 16:23:09 +0100 Subject: [PATCH 10/39] [ACS-9102] Remove obsolete checkout --- .github/actions/deploy-local-acs/action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index d751699a72..daa935aec3 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -17,8 +17,6 @@ inputs: runs: using: "composite" steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 with: version: "3.14.3" From 2879b8e0c1b3b2f23e2c9d65f2de76ad79ce84bd Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 16:38:20 +0100 Subject: [PATCH 11/39] [ACS-9102] Use more powerful runner for E2Es --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9c29e1392d..c5a7855b07 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -105,7 +105,7 @@ jobs: e2es-playwright: needs: [lint, build, unit-tests] name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' - runs-on: ubuntu-latest + runs-on: alfrescoPub-ubuntu2204-16G-4CPU strategy: fail-fast: false matrix: From 509bb18df42027b92ed4e61d0a3cd325dfcc8a81 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 3 Jan 2025 16:51:50 +0100 Subject: [PATCH 12/39] [ACS-9102] Introduce temp secrets --- .github/workflows/pull-request.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c5a7855b07..e2bb853d13 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,14 +12,14 @@ concurrency: cancel-in-progress: true env: - BASE_URL: ${{ secrets.PIPELINE_ENV_URL }} - ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }} - ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }} - HR_USER: ${{ secrets.HR_USER }} - HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }} + BASE_URL: ${{ secrets.BASE_URL_LOCAL }} + ADMIN_EMAIL: ${{ secrets.TEMP_ADMIN_USERNAME }} + ADMIN_PASSWORD: ${{ secrets.TEMP_ADMIN_PASSWORD }} + HR_USER: ${{ secrets.TEMP_ADMIN_USERNAME }} + HR_USER_PASSWORD: ${{ secrets.TEMP_ADMIN_PASSWORD }} SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }} SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}} - PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST }} + PLAYWRIGHT_E2E_HOST: ${{ secrets.BASE_URL_LOCAL }} GH_BUILD_NUMBER: ${{ github.run_id }} REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }} From 321ac8161631e0e8321fd8da96fc2047a25802e5 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 3 Jan 2025 17:36:57 +0100 Subject: [PATCH 13/39] test curl localhost --- .github/actions/deploy-local-acs/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index daa935aec3..bcd4bedb2c 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -114,3 +114,4 @@ runs: helm ls --all-namespaces --all helm status acs --show-resources kubectl describe pod + curl -vL http://localhost From 3d8cfb65cc37088a0a27540984bfe9dd288d2d61 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 3 Jan 2025 17:37:46 +0100 Subject: [PATCH 14/39] skip n-1 matrix jobs --- .github/workflows/pull-request.yml | 64 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e2bb853d13..a471ad8e84 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -112,38 +112,38 @@ jobs: e2e-suites: - name: "create-actions" id: 1 - - name: "folder-rules" - id: 2 - - name: "viewer" - id: 3 - - name: "authentication" - id: 4 - - name: "navigation" - id: 5 - - name: "special-permissions" - id: 6 - - name: "pagination" - id: 7 - - name: "list-views" - id: 8 - - name: "share-action" - id: 9 - - name: "copy-move-actions" - id: 10 - - name: "library-actions" - id: 11 - - name: "info-drawer" - id: 12 - - name: "search" - id: 13 - - name: "upload-download-actions" - id: 14 - - name: "favorite-actions" - id: 15 - - name: "delete-actions" - id: 16 - - name: "edit-actions" - id: 17 + # - name: "folder-rules" + # id: 2 + # - name: "viewer" + # id: 3 + # - name: "authentication" + # id: 4 + # - name: "navigation" + # id: 5 + # - name: "special-permissions" + # id: 6 + # - name: "pagination" + # id: 7 + # - name: "list-views" + # id: 8 + # - name: "share-action" + # id: 9 + # - name: "copy-move-actions" + # id: 10 + # - name: "library-actions" + # id: 11 + # - name: "info-drawer" + # id: 12 + # - name: "search" + # id: 13 + # - name: "upload-download-actions" + # id: 14 + # - name: "favorite-actions" + # id: 15 + # - name: "delete-actions" + # id: 16 + # - name: "edit-actions" + # id: 17 steps: - name: Checkout uses: actions/checkout@v4 From a62040c0b053c5d6b9f737c39dfa25b539e659a4 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 3 Jan 2025 17:45:31 +0100 Subject: [PATCH 15/39] test ipv4 first --- .github/workflows/pull-request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a471ad8e84..5bd48af366 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -106,6 +106,8 @@ jobs: needs: [lint, build, unit-tests] name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' runs-on: alfrescoPub-ubuntu2204-16G-4CPU + env: + NODE_OPTIONS: --dns-result-order=ipv4first strategy: fail-fast: false matrix: From b64c592a57ed00346125867536e14d733f6aac92 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 10 Jan 2025 07:47:35 +0100 Subject: [PATCH 16/39] [ACS-9102] Adjust Playwright E2E host --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5bd48af366..37405dae82 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -19,7 +19,7 @@ env: HR_USER_PASSWORD: ${{ secrets.TEMP_ADMIN_PASSWORD }} SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }} SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}} - PLAYWRIGHT_E2E_HOST: ${{ secrets.BASE_URL_LOCAL }} + PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST_LOCAL }} GH_BUILD_NUMBER: ${{ github.run_id }} REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }} From 99d816066bf280d4f3d8580db7eedb05c0c836dc Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 10 Jan 2025 08:08:25 +0100 Subject: [PATCH 17/39] [ACS-9102] Bring back matrix job --- .github/workflows/pull-request.yml | 64 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 37405dae82..06e14be197 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -114,38 +114,38 @@ jobs: e2e-suites: - name: "create-actions" id: 1 - # - name: "folder-rules" - # id: 2 - # - name: "viewer" - # id: 3 - # - name: "authentication" - # id: 4 - # - name: "navigation" - # id: 5 - # - name: "special-permissions" - # id: 6 - # - name: "pagination" - # id: 7 - # - name: "list-views" - # id: 8 - # - name: "share-action" - # id: 9 - # - name: "copy-move-actions" - # id: 10 - # - name: "library-actions" - # id: 11 - # - name: "info-drawer" - # id: 12 - # - name: "search" - # id: 13 - # - name: "upload-download-actions" - # id: 14 - # - name: "favorite-actions" - # id: 15 - # - name: "delete-actions" - # id: 16 - # - name: "edit-actions" - # id: 17 + - name: "folder-rules" + id: 2 + - name: "viewer" + id: 3 + - name: "authentication" + id: 4 + - name: "navigation" + id: 5 + - name: "special-permissions" + id: 6 + - name: "pagination" + id: 7 + - name: "list-views" + id: 8 + - name: "share-action" + id: 9 + - name: "copy-move-actions" + id: 10 + - name: "library-actions" + id: 11 + - name: "info-drawer" + id: 12 + - name: "search" + id: 13 + - name: "upload-download-actions" + id: 14 + - name: "favorite-actions" + id: 15 + - name: "delete-actions" + id: 16 + - name: "edit-actions" + id: 17 steps: - name: Checkout uses: actions/checkout@v4 From 3cbe1f519c2f1da1bcb22906f707237456c0897e Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 10 Jan 2025 10:16:30 +0100 Subject: [PATCH 18/39] disable unnecessary acs components --- .github/acs-deployment-values-override.yaml | 18 +++++++++++++++ .github/actions/deploy-local-acs/action.yml | 25 +++------------------ 2 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 .github/acs-deployment-values-override.yaml diff --git a/.github/acs-deployment-values-override.yaml b/.github/acs-deployment-values-override.yaml new file mode 100644 index 0000000000..f2e7bcd72f --- /dev/null +++ b/.github/acs-deployment-values-override.yaml @@ -0,0 +1,18 @@ +share: + enabled: false +postgresql-sync: + enabled: false +alfresco-sync-service: + enabled: false +alfresco-digital-workspace: + enabled: false +alfresco-control-center: + enabled: false +alfresco-ai-transformer: + enabled: false +elasticsearch-audit: + enabled: false +alfresco-audit-storage: + enabled: false +kibana-audit: + enabled: false diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index bcd4bedb2c..09e398be4b 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -1,4 +1,5 @@ -name: Deploy local ACS for E2E testing +name: deploy-local-acs +description: Deploy local ACS for E2E testing inputs: docker_username: @@ -53,26 +54,6 @@ runs: --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson - # to be skipped imo - # - name: Check if cgroup v2 workaround is needed - # if: startsWith(matrix.values, '7.') - # env: - # VALUES_FILE: ${{ matrix.values }} - # id: cgroupv2-workaround-extra-values - # run: | - # if [ ${VALUES_FILE:2:1} -le 2 ]; then - # echo "Enabling cgroupv v2 workaround" - # echo "helm_install_params=--values test/cgroup-v2-workaround-values.yaml" >> "$GITHUB_OUTPUT" - # fi - - # - name: Check if we want additional helm customizations - # id: configurable-extra-values - # run: | - # if [ "${{ matrix.values }}" = "pre-release_values.yaml" ] || [ "${{ matrix.values }}" = "values.yaml" ]; then - # echo "Enabling clustered tests with 2 replicas" - # echo "helm_install_params=--set alfresco-repository.replicaCount=2" >> "$GITHUB_OUTPUT" - # fi - - name: Add dependency chart repos shell: bash run: | @@ -86,7 +67,6 @@ runs: ref: v8.6.1 path: acs-deployment - # Name and value to be fetched by automation?? - name: Helm install shell: bash run: >- @@ -96,6 +76,7 @@ runs: --set global.known_urls=http://localhost --set global.alfrescoRegistryPullSecrets=regcred --values acs-deployment/test/enterprise-integration-test-values.yaml + --values .github/acs-deployment-values-override.yaml - name: Watch Helm deployment shell: bash From 6b57e261b8053e9b79390a52709264820949b075 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 10 Jan 2025 10:34:12 +0100 Subject: [PATCH 19/39] debug ingress after tests run --- .github/actions/after-e2e/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/after-e2e/action.yml b/.github/actions/after-e2e/action.yml index a918a77aa4..537a4cc53c 100644 --- a/.github/actions/after-e2e/action.yml +++ b/.github/actions/after-e2e/action.yml @@ -7,3 +7,9 @@ runs: - name: Remove storage file shell: bash run: rm -f ./storage-state/AdminUserState.json + + - name: Debug Ingress Controller Logs + shell: bash + if: always() + run: | + kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx From 46ae848e800045e4088cd342750037452553a42b Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 10 Jan 2025 11:37:54 +0100 Subject: [PATCH 20/39] [ACS-9102] Fix folder-rules test suite --- .../src/tests/create-rules.e2e.ts | 41 +++++++++---------- .../src/api/rules-api.ts | 11 ++--- .../components/actions-dropdown.component.ts | 5 +++ 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/e2e/playwright/folder-rules/src/tests/create-rules.e2e.ts b/e2e/playwright/folder-rules/src/tests/create-rules.e2e.ts index 43e3d2d8ea..52c59418dc 100644 --- a/e2e/playwright/folder-rules/src/tests/create-rules.e2e.ts +++ b/e2e/playwright/folder-rules/src/tests/create-rules.e2e.ts @@ -131,24 +131,23 @@ test.describe('Folder Rules Actions', () => { test('[XAT-888] Create a rule with multiple actions', async ({ personalFiles, nodesPage }) => { const checkInValue = 'check In Value'; - const actionValue = ' A site which contains sfdc content [sfdc:site] '; - const autoDeclareOptionsValue = 'For all major and minor versions [ALL]'; + const actionValue = 'Site Container [st:siteContainer]'; + const specialiseTypeValue = 'Action Base Type [act:actionbase]'; const simpleWorkFlow = 'accept reject'; await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` }); await nodesPage.toolbar.clickCreateRuleButton(); await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName); - await nodesPage.actionsDropdown.selectAction(ActionType.HideRecord, 0); - await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 1); - await nodesPage.actionsDropdown.selectAction(ActionType.CheckIn, 2); - await nodesPage.actionsDropdown.insertCheckInActionValues(checkInValue, 2); - await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 3); - await nodesPage.actionsDropdown.insertAddAspectActionValues(actionValue, 3); - await nodesPage.actionsDropdown.selectAction(ActionType.AutoDeclareOptions, 4); - await nodesPage.actionsDropdown.insertAutoDeclareOptionsActionValues(autoDeclareOptionsValue, 4); - await nodesPage.actionsDropdown.selectAction(ActionType.SimpleWorkflow, 5); - await nodesPage.actionsDropdown.insertSimpleWorkflowActionValues(simpleWorkFlow, 5); + await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 0); + await nodesPage.actionsDropdown.selectAction(ActionType.CheckIn, 1); + await nodesPage.actionsDropdown.insertCheckInActionValues(checkInValue, 1); + await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 2); + await nodesPage.actionsDropdown.insertAddAspectActionValues(actionValue, 2); + await nodesPage.actionsDropdown.selectAction(ActionType.SpecialiseType, 3); + await nodesPage.actionsDropdown.insertSpecialiseTypeActionValues(specialiseTypeValue, 3); + await nodesPage.actionsDropdown.selectAction(ActionType.SimpleWorkflow, 4); + await nodesPage.actionsDropdown.insertSimpleWorkflowActionValues(simpleWorkFlow, 4); await nodesPage.manageRulesDialog.createRuleButton.click(); @@ -185,18 +184,18 @@ test.describe('Folder Rules Actions', () => { await nodesPage.toolbar.clickCreateRuleButton(); await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0); - await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 1); - await nodesPage.actionsDropdown.insertAddAspectActionValues('CMM', 1); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Countable', 1); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 2); - await nodesPage.actionsDropdown.insertAddAspectActionValues('folder', 2); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Incomplete', 2); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 3); - await nodesPage.actionsDropdown.insertAddAspectActionValues('site which', 3); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Site container', 3); await nodesPage.manageRulesDialog.createRuleButton.click(); await nodesPage.manageRulesDialog.createRuleButton.waitFor({ state: 'hidden' }); await nodesPage.manageRules.getGroupsList(randomRuleName).click(); - await nodesPage.manageRules.checkAspects(['sc:controlsAreClearance', 'sfdc:objectModel', 'sfdc:folder', 'sfdc:site']); + await nodesPage.manageRules.checkAspects(['cm:generalclassifiable', 'cm:countable', 'sys:incomplete', 'st:siteContainer']); }); test('[XAT-891] Prevent rule creation after clicking on cancel during selecting destination folder', async ({ nodesPage, personalFiles }) => { @@ -204,7 +203,7 @@ test.describe('Folder Rules Actions', () => { await nodesPage.toolbar.clickCreateRuleButton(); await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0); - await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled(); await nodesPage.actionsDropdown.selectAction(ActionType.Copy, 1); await nodesPage.manageRulesDialog.destinationFolderButton.click(); @@ -217,7 +216,7 @@ test.describe('Folder Rules Actions', () => { await nodesPage.toolbar.clickCreateRuleButton(); await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0); - await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled(); await nodesPage.actionsDropdown.selectAction(ActionType.Copy, 1); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled(); @@ -228,7 +227,7 @@ test.describe('Folder Rules Actions', () => { await nodesPage.toolbar.clickCreateRuleButton(); await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0); - await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled(); await nodesPage.actionsDropdown.insertAddAspectActionValues('None', 0); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled(); @@ -239,7 +238,7 @@ test.describe('Folder Rules Actions', () => { await nodesPage.toolbar.clickCreateRuleButton(); await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName); await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0); - await nodesPage.actionsDropdown.insertAddAspectActionValues('Controls', 0); + await nodesPage.actionsDropdown.insertAddAspectActionValues('Classifiable', 0); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled(); await nodesPage.actionsDropdown.selectAction(ActionType.CheckIn, 1); await expect(nodesPage.manageRulesDialog.createRuleButton).toBeEnabled(); diff --git a/projects/aca-playwright-shared/src/api/rules-api.ts b/projects/aca-playwright-shared/src/api/rules-api.ts index add9e79457..8754d3900b 100644 --- a/projects/aca-playwright-shared/src/api/rules-api.ts +++ b/projects/aca-playwright-shared/src/api/rules-api.ts @@ -147,19 +147,19 @@ export class RulesApi { { actionDefinitionId: 'add-features', params: { - 'aspect-name': 'sc:controlsAreClearance' + 'aspect-name': 'cm:auditable' } }, { actionDefinitionId: 'add-features', params: { - 'aspect-name': 'sfdc:objectModel' + 'aspect-name': 'app:configurable' } }, { actionDefinitionId: 'add-features', params: { - 'aspect-name': 'sfdc:folder' + 'aspect-name': 'exif:exif' } } ] @@ -224,10 +224,6 @@ export class ActionTypes { actionDefinitionId: 'specialise-type', params: { 'type-name': 'sys:base' } }); - static readonly RECORDABLEVERSION = new ActionTypes('RECORDABLEVERSION', { - actionDefinitionId: 'recordable-version-config', - params: { version: 'ALL' } - }); static readonly SETPROPERTYVALUE = new ActionTypes('SETPROPERTYVALUE', { actionDefinitionId: 'set-property-value', params: { property: 'dl:ganttPercentComplete', value: 'test' } @@ -235,7 +231,6 @@ export class ActionTypes { static readonly actions = [ ActionTypes.ADDFEATURES.value, ActionTypes.CHECKIN.value, - ActionTypes.RECORDABLEVERSION.value, ActionTypes.SPECIALISETYPE.value, ActionTypes.SETPROPERTYVALUE.value ]; diff --git a/projects/aca-playwright-shared/src/page-objects/components/actions-dropdown.component.ts b/projects/aca-playwright-shared/src/page-objects/components/actions-dropdown.component.ts index 5045916105..e1cc8fbef5 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/actions-dropdown.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/actions-dropdown.component.ts @@ -60,6 +60,7 @@ export class ActionsDropdownComponent extends BaseComponent { private actionAspectNameLocator = '[data-automation-id="header-aspect-name"] .adf-property-field'; private actionCheckInInputLocator = '[data-automation-id="header-description"] input'; private actionAutoDeclareLocator = '[data-automation-id="header-version"] mat-select'; + private actionSpecialiseTypeLocator = '[data-automation-id="header-type-name"] mat-select'; private actionSimpleWorkflowStepInputLocator = '[data-automation-id="header-approve-step"] input'; private actionSimpleWorkflowApproveFolderLocator = `[data-automation-id="header-approve-folder"] mat-icon`; private actionSimpleWorkflowActionChoiceLocator = '[data-automation-id="content-node-selector-actions-choose"]'; @@ -98,6 +99,10 @@ export class ActionsDropdownComponent extends BaseComponent { await this.dropdownSelection(autoDeclareOptionsValue, this.actionAutoDeclareLocator, index); } + async insertSpecialiseTypeActionValues(specialiseTypeValue: string, index: number): Promise { + await this.dropdownSelection(specialiseTypeValue, this.actionSpecialiseTypeLocator, index); + } + async insertSimpleWorkflowActionValues(stepValue: string, index: number): Promise { await this.ruleActionLocator.nth(index).locator(this.actionSimpleWorkflowStepInputLocator).fill(stepValue); await this.ruleActionLocator.nth(index).locator(this.actionSimpleWorkflowApproveFolderLocator).click(); From fd54a0da7fd113a6a7226e97a6b3fcd1904b5f0c Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 10 Jan 2025 15:45:29 +0100 Subject: [PATCH 21/39] [ACS-9102] Fix part of viewer test suite --- .../viewer/src/tests/viewer-action.e2e.ts | 4 +- e2e/playwright/viewer/src/tests/viewer.e2e.ts | 44 ++++++++++++++++--- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts b/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts index ceda713cf1..c0fc25292a 100644 --- a/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts +++ b/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts @@ -191,7 +191,7 @@ test.describe('viewer action file', () => { await personalFiles.uploadNewVersionDialog.uploadButton.waitFor({ state: 'detached' }); await expect(personalFiles.uploadNewVersionDialog.cancelButton).toHaveCount(0); expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not open').toBe(true); - expect(await personalFiles.viewer.fileTitleButtonLocator.innerText()).toContain(docxFile2); + expect(await personalFiles.viewer.getFileTitle()).toContain(docxFile2); expect(await nodesApiAction.getNodeProperty(filePersonalFilesId, 'cm:versionType'), 'File has incorrect version type').toEqual('MAJOR'); expect(await nodesApiAction.getNodeProperty(filePersonalFilesId, 'cm:versionLabel'), 'File has incorrect version label').toEqual('2.0'); }); @@ -207,7 +207,7 @@ test.describe('viewer action file', () => { await expect(personalFiles.uploadNewVersionDialog.cancelButton).toHaveCount(0); await personalFiles.viewer.waitForViewerToOpen(); - expect(await personalFiles.viewer.fileTitleButtonLocator.innerText()).toContain(docxFile); + expect(await personalFiles.viewer.getFileTitle()).toContain(docxFile); await personalFiles.acaHeader.clickViewerMoreActions(); await expect(personalFiles.matMenu.getMenuItemFromHeaderMenu('Cancel Editing'), `'Cancel Editing' button shouldn't be shown`).toBeHidden(); diff --git a/e2e/playwright/viewer/src/tests/viewer.e2e.ts b/e2e/playwright/viewer/src/tests/viewer.e2e.ts index 2283de30ae..f7f97a2efd 100644 --- a/e2e/playwright/viewer/src/tests/viewer.e2e.ts +++ b/e2e/playwright/viewer/src/tests/viewer.e2e.ts @@ -60,7 +60,13 @@ test.describe('viewer file', () => { const randomFolderName = `viewer-${Utils.random()}`; const apiClientFactory = new ApiClientFactory(); await apiClientFactory.setUpAcaBackend('admin'); - await apiClientFactory.createUser({ username }); + try { + await apiClientFactory.createUser({ username }); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } nodesApi = await NodesApi.initialize(username, username); const fileActionApi = await FileActionsApi.initialize(username, username); trashcanApi = await TrashcanApi.initialize(username, username); @@ -77,13 +83,41 @@ test.describe('viewer file', () => { await shareActions.shareFileById(fileDocxId); await favoritesActions.addFavoriteById('file', fileDocxId); - await siteActionsAdmin.createSite(siteAdmin, Site.VisibilityEnum.PRIVATE); + try { + await siteActionsAdmin.createSite(siteAdmin, Site.VisibilityEnum.PRIVATE); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } + docLibId = await siteActionsAdmin.getDocLibId(siteAdmin); - fileAdminId = (await fileActionApiAdmin.uploadFile(TEST_FILES.DOCX.path, fileAdmin, docLibId)).entry.id; - await siteActionsUser.createSite(siteUser, Site.VisibilityEnum.PUBLIC); + try { + fileAdminId = (await fileActionApiAdmin.uploadFile(TEST_FILES.DOCX.path, fileAdmin, docLibId)).entry.id; + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } + + try { + await siteActionsUser.createSite(siteUser, Site.VisibilityEnum.PUBLIC); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } + docLibSiteUserId = await siteActionsUser.getDocLibId(siteUser); - await fileActionApi.uploadFile(TEST_FILES.DOCX.path, fileInSite, docLibSiteUserId); + + try { + await fileActionApi.uploadFile(TEST_FILES.DOCX.path, fileInSite, docLibSiteUserId); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } await Promise.all([ favoritesActions.isFavoriteWithRetry(username, fileDocxId, { expect: true }), From 99eeb70ffd7f7155e0b4a7e3b9cb1fa94c25c705 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Fri, 10 Jan 2025 16:59:12 +0100 Subject: [PATCH 22/39] [ACS-9102] Additional E2E fixes --- e2e/playwright/list-views/src/tests/permissions.e2e.ts | 9 ++++++++- .../list-views/src/tests/recent-files.e2e.ts | 9 ++++++++- .../list-views/src/tests/shared-files.e2e.ts | 10 +++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/e2e/playwright/list-views/src/tests/permissions.e2e.ts b/e2e/playwright/list-views/src/tests/permissions.e2e.ts index 345aa4e52f..a77f2417d5 100755 --- a/e2e/playwright/list-views/src/tests/permissions.e2e.ts +++ b/e2e/playwright/list-views/src/tests/permissions.e2e.ts @@ -43,7 +43,14 @@ test.describe('Special permissions', () => { test.beforeAll(async () => { const apiClientFactory = new ApiClientFactory(); await apiClientFactory.setUpAcaBackend('admin'); - await apiClientFactory.createUser({ username }); + + try { + await apiClientFactory.createUser({ username }); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } }); test.describe('file not displayed if user no longer has permissions on it', () => { diff --git a/e2e/playwright/list-views/src/tests/recent-files.e2e.ts b/e2e/playwright/list-views/src/tests/recent-files.e2e.ts index 99cd9b00ab..4c59c730b9 100755 --- a/e2e/playwright/list-views/src/tests/recent-files.e2e.ts +++ b/e2e/playwright/list-views/src/tests/recent-files.e2e.ts @@ -45,7 +45,14 @@ test.describe('Recent Files', () => { test.setTimeout(timeouts.extendedTest); const apiClientFactory = new ApiClientFactory(); await apiClientFactory.setUpAcaBackend('admin'); - await apiClientFactory.createUser({ username }); + + try { + await apiClientFactory.createUser({ username }); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } nodeActionsUser = await NodesApi.initialize(username, username); siteActionsUser = await SitesApi.initialize(username, username); trashcanApi = await TrashcanApi.initialize(username, username); diff --git a/e2e/playwright/list-views/src/tests/shared-files.e2e.ts b/e2e/playwright/list-views/src/tests/shared-files.e2e.ts index e762d4c080..48a611cd32 100644 --- a/e2e/playwright/list-views/src/tests/shared-files.e2e.ts +++ b/e2e/playwright/list-views/src/tests/shared-files.e2e.ts @@ -44,7 +44,15 @@ test.describe('Shared Files', () => { test.setTimeout(timeouts.extendedTest); const apiClientFactory = new ApiClientFactory(); await apiClientFactory.setUpAcaBackend('admin'); - await apiClientFactory.createUser({ username }); + + try { + await apiClientFactory.createUser({ username }); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } + siteActionsAdmin = await SitesApi.initialize('admin'); const nodesApiAdmin = await NodesApi.initialize('admin'); const shareActionsAdmin = await SharedLinksApi.initialize('admin'); From d5c184e42735696aa698e61fd3d02186475ef196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=9Awiderski?= Date: Mon, 13 Jan 2025 12:04:08 +0100 Subject: [PATCH 23/39] [ACS-9102] fixes for e2es -> empty-list and search --- .../list-views/src/tests/empty-list.e2e.ts | 108 +++++++++--------- .../search/src/tests/search-sorting.e2e.ts | 75 +++++------- .../components/viewer.component.ts | 1 + 3 files changed, 78 insertions(+), 106 deletions(-) diff --git a/e2e/playwright/list-views/src/tests/empty-list.e2e.ts b/e2e/playwright/list-views/src/tests/empty-list.e2e.ts index af406c12fe..1258325475 100755 --- a/e2e/playwright/list-views/src/tests/empty-list.e2e.ts +++ b/e2e/playwright/list-views/src/tests/empty-list.e2e.ts @@ -80,35 +80,14 @@ test.describe('Empty list views', () => { async function openEmptyTab(searchPage: SearchPage, tab: string, emptyStateTitle: string, emptyStateSubtitle: string) { await searchPage.sidenav.openPanel(tab); - expect(await searchPage.dataTable.isEmpty()).toBeTruthy(); - expect(await searchPage.dataTable.getEmptyStateTitle()).toContain(emptyStateTitle); - expect(await searchPage.dataTable.getEmptyStateSubtitle()).toContain(emptyStateSubtitle); - } - - [ - { - tab: SIDEBAR_LABELS.FAVORITE_LIBRARIES, - id: 'C289911', - emptyStateTitle: `No Favorite Libraries`, - emptyStateSubtitle: 'Favorite a library that you want to find easily later.' - }, - { - tab: SIDEBAR_LABELS.RECENT_FILES, - id: 'C213169', - emptyStateTitle: 'No recent files', - emptyStateSubtitle: 'Items you uploaded or edited in the last 30 days are shown here.' - }, - { - tab: SIDEBAR_LABELS.FAVORITES, - id: 'C280133', - emptyStateTitle: 'No favorite files or folders', - emptyStateSubtitle: 'Favorite items that you want to easily find later.' + await searchPage.dataTable.spinnerWaitForReload(); + if (await searchPage.dataTable.isEmpty()) { + expect(await searchPage.dataTable.getEmptyStateTitle()).toContain(emptyStateTitle); + expect(await searchPage.dataTable.getEmptyStateSubtitle()).toContain(emptyStateSubtitle); + } else { + expect(await searchPage.dataTable.getRowsCount()).toEqual(1); } - ].forEach((testCase) => { - test(`[${testCase.id}] empty ${testCase.tab}`, async ({ searchPage }) => { - await openEmptyTab(searchPage, testCase.tab, testCase.emptyStateTitle, testCase.emptyStateSubtitle); - }); - }); + } async function checkPaginationForTabs(searchPage: SearchPage, tab: string, personalFiles: PersonalFilesPage) { await searchPage.sidenav.openPanel(tab); @@ -120,34 +99,49 @@ test.describe('Empty list views', () => { expect(await personalFiles.pagination.isNextButtonPresent()).toBeFalsy(); } - [ - { - tab: SIDEBAR_LABELS.FAVORITES, - id: 'C280111' - }, - { - tab: SIDEBAR_LABELS.MY_LIBRARIES, - id: 'C280084' - }, - { - tab: SIDEBAR_LABELS.FAVORITE_LIBRARIES, - id: 'C291873' - }, - { - tab: SIDEBAR_LABELS.PERSONAL_FILES, - id: 'C280075' - }, - { - tab: SIDEBAR_LABELS.RECENT_FILES, - id: 'C280102' - }, - { - tab: SIDEBAR_LABELS.TRASH, - id: 'C280120' - } - ].forEach((testCase) => { - test(`[${testCase.id}] ${testCase.tab} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { - await checkPaginationForTabs(searchPage, testCase.tab, personalFiles); - }); + test(`[C289911] empty ${SIDEBAR_LABELS.FAVORITE_LIBRARIES}`, async ({ searchPage }) => { + await openEmptyTab( + searchPage, + SIDEBAR_LABELS.FAVORITE_LIBRARIES, + 'No Favorite Libraries', + 'Favorite a library that you want to find easily later.' + ); + }); + + test(`[C213169] empty ${SIDEBAR_LABELS.RECENT_FILES}`, async ({ searchPage }) => { + await openEmptyTab( + searchPage, + SIDEBAR_LABELS.RECENT_FILES, + 'No recent files', + 'Items you uploaded or edited in the last 30 days are shown here.' + ); + }); + + test(`[C280133] empty ${SIDEBAR_LABELS.FAVORITES}`, async ({ searchPage }) => { + await openEmptyTab(searchPage, SIDEBAR_LABELS.FAVORITES, 'No favorite files or folders', 'Favorite items that you want to easily find later.'); + }); + + test(`[C280111] ${SIDEBAR_LABELS.FAVORITES} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { + await checkPaginationForTabs(searchPage, SIDEBAR_LABELS.FAVORITES, personalFiles); + }); + + test(`[C280084] ${SIDEBAR_LABELS.MY_LIBRARIES} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { + await checkPaginationForTabs(searchPage, SIDEBAR_LABELS.MY_LIBRARIES, personalFiles); + }); + + test(`[C291873] ${SIDEBAR_LABELS.FAVORITE_LIBRARIES} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { + await checkPaginationForTabs(searchPage, SIDEBAR_LABELS.FAVORITE_LIBRARIES, personalFiles); + }); + + test(`[C280075] ${SIDEBAR_LABELS.PERSONAL_FILES} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { + await checkPaginationForTabs(searchPage, SIDEBAR_LABELS.PERSONAL_FILES, personalFiles); + }); + + test(`[C280102] ${SIDEBAR_LABELS.RECENT_FILES} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { + await checkPaginationForTabs(searchPage, SIDEBAR_LABELS.RECENT_FILES, personalFiles); + }); + + test(`[C280120] ${SIDEBAR_LABELS.TRASH} - pagination controls not displayed`, async ({ searchPage, personalFiles }) => { + await checkPaginationForTabs(searchPage, SIDEBAR_LABELS.TRASH, personalFiles); }); }); diff --git a/e2e/playwright/search/src/tests/search-sorting.e2e.ts b/e2e/playwright/search/src/tests/search-sorting.e2e.ts index 3969a7c479..87661fadca 100644 --- a/e2e/playwright/search/src/tests/search-sorting.e2e.ts +++ b/e2e/playwright/search/src/tests/search-sorting.e2e.ts @@ -108,60 +108,37 @@ test.describe('Search sorting', () => { expectedSecondFile: string ) { await searchPage.searchWithin(`search-sort *${random}`, 'files'); - await searchPage.searchSortingPicker.sortBy(sortBy, sortOrder); - expect(await searchPage.dataTable.getNthRow(0).textContent()).toContain(expectedFirstFile); expect(await searchPage.dataTable.getNthRow(1).textContent()).toContain(expectedSecondFile); } - [ - { - column: 'Name', - id: 'C277728', - firstFile: fileJpg.name, - secondFile: filePdf.name - }, - { - column: 'Type', - id: 'C277740', - firstFile: filePdf.name, - secondFile: fileJpg.name - }, - { - column: 'Size', - id: 'C277738', - firstFile: filePdf.name, - secondFile: fileJpg.name - }, - { - column: 'Created date', - id: 'C277734', - firstFile: fileJpg.name, - secondFile: filePdf.name - }, - { - column: 'Modified date', - id: 'C277736', - firstFile: fileJpg.name, - secondFile: filePdf.name - }, - { - column: 'Relevance', - id: 'C277727', - firstFile: fileJpg.name, - secondFile: filePdf.name - }, - { - column: 'Modifier', - id: 'C277732', - firstFile: fileJpg.name, - secondFile: filePdf.name - } - ].forEach((testCase) => { - test(`[${testCase.id}] Sort by ${testCase.column}`, async ({ searchPage }) => { - await testSearchSorting(searchPage, testCase.column as SortByType, 'asc', testCase.firstFile, testCase.secondFile); - }); + test(`[C277728] Sort by Name`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Name' as SortByType, 'asc', fileJpg.name, filePdf.name); + }); + + test(`[C277740] Sort by Type`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Type' as SortByType, 'asc', filePdf.name, fileJpg.name); + }); + + test(`[C277738] Sort by Size`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Size' as SortByType, 'asc', filePdf.name, fileJpg.name); + }); + + test(`[C277734] Sort by Created date`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Created date' as SortByType, 'asc', fileJpg.name, filePdf.name); + }); + + test(`[C277736] Sort by Modified date`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Modified date' as SortByType, 'asc', fileJpg.name, filePdf.name); + }); + + test(`[C277727] Sort by Relevance`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Relevance' as SortByType, 'asc', fileJpg.name, filePdf.name); + }); + + test(`[C277732] Sort by Modifier`, async ({ searchPage }) => { + await testSearchSorting(searchPage, 'Modifier' as SortByType, 'asc', fileJpg.name, filePdf.name); }); test('[C277722] Sorting options are displayed', async ({ searchPage }) => { diff --git a/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts index 65bf213fd3..a31ed28aef 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts @@ -94,6 +94,7 @@ export class ViewerComponent extends BaseComponent { async getFileTitle(): Promise { await this.fileTitleButtonLocator.waitFor({ state: 'visible', timeout: timeouts.normal }); + await this.waitForViewerLoaderToFinish(); return this.fileTitleButtonLocator.textContent(); } From 359004bfd79d1c273d58ed8d65ce0fb905cc3183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=9Awiderski?= Date: Mon, 13 Jan 2025 14:21:39 +0100 Subject: [PATCH 24/39] [ACS-9102] more fixes for e2es and github actions artifacts added for easier debugging --- .github/actions/run-e2e-playwright/action.yml | 7 +++++++ .../edit-actions/src/tests/edit-offline.e2e.ts | 2 +- .../search/src/tests/search-sorting.e2e.ts | 2 +- .../viewer/src/tests/viewer-action.e2e.ts | 5 ++++- .../page-objects/components/viewer.component.ts | 2 +- projects/aca-playwright-shared/src/utils/utils.ts | 15 +++++++++++++++ 6 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/actions/run-e2e-playwright/action.yml b/.github/actions/run-e2e-playwright/action.yml index f3b3efa7bc..145bdb077d 100644 --- a/.github/actions/run-e2e-playwright/action.yml +++ b/.github/actions/run-e2e-playwright/action.yml @@ -29,3 +29,10 @@ runs: sleep 90 npx nx run ${{ inputs.options }}-e2e:e2e + - name: Upload E2Es results + if: always() + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact-name }} + path: | + test-results/ diff --git a/e2e/playwright/edit-actions/src/tests/edit-offline.e2e.ts b/e2e/playwright/edit-actions/src/tests/edit-offline.e2e.ts index 844fb587e8..0bc83df68d 100644 --- a/e2e/playwright/edit-actions/src/tests/edit-offline.e2e.ts +++ b/e2e/playwright/edit-actions/src/tests/edit-offline.e2e.ts @@ -74,7 +74,7 @@ test.describe('Edit offline - on Personal Files', () => { await personalFiles.dataTable.selectItems(file1); await personalFiles.acaHeader.clickMoreActions(); await personalFiles.matMenu.clickMenuItem('Edit Offline'); - const [download] = await Promise.all([personalFiles.page.waitForEvent('download')]); + const [download] = await Promise.all([personalFiles.page.waitForEvent('download', { timeout: 5000 })]); expect(download.suggestedFilename()).toBe(file1); }); diff --git a/e2e/playwright/search/src/tests/search-sorting.e2e.ts b/e2e/playwright/search/src/tests/search-sorting.e2e.ts index 87661fadca..dc2c75ec50 100644 --- a/e2e/playwright/search/src/tests/search-sorting.e2e.ts +++ b/e2e/playwright/search/src/tests/search-sorting.e2e.ts @@ -107,7 +107,7 @@ test.describe('Search sorting', () => { expectedFirstFile: string, expectedSecondFile: string ) { - await searchPage.searchWithin(`search-sort *${random}`, 'files'); + await searchPage.searchWithin(`*${random}*`, 'files'); await searchPage.searchSortingPicker.sortBy(sortBy, sortOrder); expect(await searchPage.dataTable.getNthRow(0).textContent()).toContain(expectedFirstFile); expect(await searchPage.dataTable.getNthRow(1).textContent()).toContain(expectedSecondFile); diff --git a/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts b/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts index c0fc25292a..de1103aa98 100644 --- a/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts +++ b/e2e/playwright/viewer/src/tests/viewer-action.e2e.ts @@ -181,7 +181,7 @@ test.describe('viewer action file', () => { test('[C297586] [C307004] Upload new version action - major', async ({ personalFiles, nodesApiAction }) => { await personalFiles.dataTable.performClickFolderOrFileToOpen(filePersonalFiles); - await personalFiles.viewer.waitForViewerToOpen(); + await personalFiles.viewer.waitForViewerToOpen('wait for viewer content'); await Utils.uploadFileNewVersion(personalFiles, docxFile2); @@ -191,6 +191,8 @@ test.describe('viewer action file', () => { await personalFiles.uploadNewVersionDialog.uploadButton.waitFor({ state: 'detached' }); await expect(personalFiles.uploadNewVersionDialog.cancelButton).toHaveCount(0); expect(await personalFiles.viewer.isViewerOpened(), 'Viewer is not open').toBe(true); + await Utils.waitForApiResponse(personalFiles, 'content', 200); + expect(await personalFiles.viewer.getFileTitle()).toContain(docxFile2); expect(await nodesApiAction.getNodeProperty(filePersonalFilesId, 'cm:versionType'), 'File has incorrect version type').toEqual('MAJOR'); expect(await nodesApiAction.getNodeProperty(filePersonalFilesId, 'cm:versionLabel'), 'File has incorrect version label').toEqual('2.0'); @@ -207,6 +209,7 @@ test.describe('viewer action file', () => { await expect(personalFiles.uploadNewVersionDialog.cancelButton).toHaveCount(0); await personalFiles.viewer.waitForViewerToOpen(); + await Utils.waitForApiResponse(personalFiles, 'content', 200); expect(await personalFiles.viewer.getFileTitle()).toContain(docxFile); await personalFiles.acaHeader.clickViewerMoreActions(); diff --git a/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts index a31ed28aef..f5893e0f19 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts @@ -61,7 +61,7 @@ export class ViewerComponent extends BaseComponent { async waitForViewerToOpen(waitForViewerContent?: 'wait for viewer content'): Promise { await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.medium }); if (waitForViewerContent) { - await this.spinnerWaitForReload(); + await this.waitForViewerLoaderToFinish(); } } diff --git a/projects/aca-playwright-shared/src/utils/utils.ts b/projects/aca-playwright-shared/src/utils/utils.ts index da0243319c..7d848697aa 100644 --- a/projects/aca-playwright-shared/src/utils/utils.ts +++ b/projects/aca-playwright-shared/src/utils/utils.ts @@ -179,4 +179,19 @@ export class Utils { static trimArrayElements(arr: string[]): string[] { return arr.map((element) => element.trim()); } + + /** + * Waits for a specific API response. + * + * @param page - The Playwright page object. + * @param urlSubstring - The substring to look for in the URL. + * @param statusCode - The expected status code of the response. + */ + static async waitForApiResponse( + contentPage: LoginPage | MyLibrariesPage | PersonalFilesPage | FavoritesLibrariesPage | SearchPage | SharedPage | TrashPage, + urlSubstring: string, + statusCode: number + ) { + await contentPage.page.waitForResponse((response) => response.url().includes(urlSubstring) && response.status() === statusCode); + } } From bc4699c777ebbdc5f2b03ba171e974cbeb3c0035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=9Awiderski?= Date: Mon, 13 Jan 2025 14:50:06 +0100 Subject: [PATCH 25/39] [ACS-9102] removed artifacts from GHA --- .github/actions/run-e2e-playwright/action.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/actions/run-e2e-playwright/action.yml b/.github/actions/run-e2e-playwright/action.yml index 145bdb077d..7e3d959a14 100644 --- a/.github/actions/run-e2e-playwright/action.yml +++ b/.github/actions/run-e2e-playwright/action.yml @@ -28,11 +28,3 @@ runs: echo "Running playwright tests with options ${{ inputs.options }}" sleep 90 npx nx run ${{ inputs.options }}-e2e:e2e - - - name: Upload E2Es results - if: always() - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.artifact-name }} - path: | - test-results/ From 66f772570686692380bfba20b49ffca18203a352 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 12:35:46 +0100 Subject: [PATCH 26/39] print all logs --- .github/actions/after-e2e/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/after-e2e/action.yml b/.github/actions/after-e2e/action.yml index 537a4cc53c..4cc5c2d6c2 100644 --- a/.github/actions/after-e2e/action.yml +++ b/.github/actions/after-e2e/action.yml @@ -12,4 +12,4 @@ runs: shell: bash if: always() run: | - kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx + kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --tail=-1 From e3c451cdd573c249ff1e12670bc146139a5bbc16 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Tue, 14 Jan 2025 13:14:41 +0100 Subject: [PATCH 27/39] [ACS-9102] Remove outdated secrets --- .github/workflows/pull-request.yml | 12 ++++++------ .../viewer/src/tests/viewer-file-types.e2e.ts | 10 +++++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 06e14be197..d3ba43ea85 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,14 +12,14 @@ concurrency: cancel-in-progress: true env: - BASE_URL: ${{ secrets.BASE_URL_LOCAL }} - ADMIN_EMAIL: ${{ secrets.TEMP_ADMIN_USERNAME }} - ADMIN_PASSWORD: ${{ secrets.TEMP_ADMIN_PASSWORD }} - HR_USER: ${{ secrets.TEMP_ADMIN_USERNAME }} - HR_USER_PASSWORD: ${{ secrets.TEMP_ADMIN_PASSWORD }} + BASE_URL: http://localhost + ADMIN_EMAIL: admin + ADMIN_PASSWORD: admin + HR_USER: admin + HR_USER_PASSWORD: admin SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }} SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}} - PLAYWRIGHT_E2E_HOST: ${{ secrets.PLAYWRIGHT_E2E_HOST_LOCAL }} + PLAYWRIGHT_E2E_HOST: http://localhost:4200 GH_BUILD_NUMBER: ${{ github.run_id }} REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }} REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }} diff --git a/e2e/playwright/viewer/src/tests/viewer-file-types.e2e.ts b/e2e/playwright/viewer/src/tests/viewer-file-types.e2e.ts index 6c84e4e360..a1ee849d84 100644 --- a/e2e/playwright/viewer/src/tests/viewer-file-types.e2e.ts +++ b/e2e/playwright/viewer/src/tests/viewer-file-types.e2e.ts @@ -45,7 +45,15 @@ test.describe('viewer file types', () => { test.beforeAll(async () => { const apiClientFactory = new ApiClientFactory(); await apiClientFactory.setUpAcaBackend('admin'); - await apiClientFactory.createUser({ username }); + + try { + await apiClientFactory.createUser({ username }); + } catch (exception) { + if (JSON.parse(exception.message).error.statusCode !== 409) { + throw new Error(`----- beforeAll failed : ${exception}`); + } + } + nodesApi = await NodesApi.initialize(username, username); fileActionApi = await FileActionsApi.initialize(username, username); trashcanApi = await TrashcanApi.initialize(username, username); From f5a6213b9c8fd7517805ebf4c3650d8737bb821a Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Tue, 14 Jan 2025 13:37:47 +0100 Subject: [PATCH 28/39] [ACS-9102] Remove after-e2e action --- .github/actions/after-e2e/action.yml | 15 --------------- .github/workflows/pull-request.yml | 9 +++++++-- 2 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 .github/actions/after-e2e/action.yml diff --git a/.github/actions/after-e2e/action.yml b/.github/actions/after-e2e/action.yml deleted file mode 100644 index 4cc5c2d6c2..0000000000 --- a/.github/actions/after-e2e/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: "After e2e" -description: "Runs cleanup tasks after e2e run" - -runs: - using: "composite" - steps: - - name: Remove storage file - shell: bash - run: rm -f ./storage-state/AdminUserState.json - - - name: Debug Ingress Controller Logs - shell: bash - if: always() - run: | - kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --tail=-1 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d3ba43ea85..5f13fbc972 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -178,15 +178,20 @@ jobs: - name: Before e2e uses: ./.github/actions/before-e2e - - name: before playwright + - name: Before playwright shell: bash run: npx playwright install chromium + - uses: ./.github/actions/run-e2e-playwright with: options: "${{ matrix.e2e-suites.name }}" artifact-name: ${{ matrix.e2e-suites.name }} test-runner: playwright - - uses: ./.github/actions/after-e2e + + - name: Debug Ingress Controller Logs + shell: bash + run: | + kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --tail=-1 finalize: if: ${{ always() }} From b873b3e0a6768680091358bcb3798e24ecc5053a Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 12:41:16 +0100 Subject: [PATCH 29/39] do not wait for reindexing --- .github/actions/deploy-local-acs/action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index 09e398be4b..2145757268 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -84,8 +84,6 @@ runs: kubectl get pods --watch & KWPID=$! kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID - echo -n "Waiting for ESC Reindexing job to complete... " - kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing echo "Completed." - name: Spit cluster status after install @@ -95,4 +93,3 @@ runs: helm ls --all-namespaces --all helm status acs --show-resources kubectl describe pod - curl -vL http://localhost From 5be82917c254059f006e6d82c8a4d1561b8d16da Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 14:06:38 +0100 Subject: [PATCH 30/39] test on latest runner --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5f13fbc972..295330b3b6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -105,7 +105,7 @@ jobs: e2es-playwright: needs: [lint, build, unit-tests] name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}' - runs-on: alfrescoPub-ubuntu2204-16G-4CPU + runs-on: ubuntu-24.04 env: NODE_OPTIONS: --dns-result-order=ipv4first strategy: From a42815a79b06d9227a43eba58401e0791672f74d Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 14:21:58 +0100 Subject: [PATCH 31/39] Always debug ingress logs --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 295330b3b6..c9263892c2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -189,7 +189,7 @@ jobs: test-runner: playwright - name: Debug Ingress Controller Logs - shell: bash + if: always() run: | kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --tail=-1 From b5a0f764eb566c2f601089b231802b2912b1ce39 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 14:29:19 +0100 Subject: [PATCH 32/39] avoid sleep waiting for app startup --- .github/actions/run-e2e-playwright/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-e2e-playwright/action.yml b/.github/actions/run-e2e-playwright/action.yml index 7e3d959a14..7140b7de75 100644 --- a/.github/actions/run-e2e-playwright/action.yml +++ b/.github/actions/run-e2e-playwright/action.yml @@ -25,6 +25,12 @@ runs: run: | npm start > /dev/null &\ + echo -n "Waiting for the application to be ready..." + while ! curl -sf ${PLAYWRIGHT_E2E_HOST} > /dev/null; do + echo -n "." + sleep 1 + done + echo "\nApplication is ready" + echo "Running playwright tests with options ${{ inputs.options }}" - sleep 90 npx nx run ${{ inputs.options }}-e2e:e2e From 606419e5b88442577530de7154f86fac7f3e15b2 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 14:33:06 +0100 Subject: [PATCH 33/39] cleanup unnecessary action input type --- .github/actions/get-image-tag/action.yml | 1 - .github/actions/git-tag/action.yml | 3 --- .github/actions/publish-libs/action.yml | 5 ----- .github/actions/run-e2e-playwright/action.yml | 3 --- .github/actions/update-library-versions/action.yml | 2 -- 5 files changed, 14 deletions(-) diff --git a/.github/actions/get-image-tag/action.yml b/.github/actions/get-image-tag/action.yml index 8ee539109d..33a5020ac1 100644 --- a/.github/actions/get-image-tag/action.yml +++ b/.github/actions/get-image-tag/action.yml @@ -5,7 +5,6 @@ inputs: branch_name: description: 'Name of the branch the workflow runs on' required: true - type: string runs: using: "composite" diff --git a/.github/actions/git-tag/action.yml b/.github/actions/git-tag/action.yml index 99e0017058..0b37e5d17e 100644 --- a/.github/actions/git-tag/action.yml +++ b/.github/actions/git-tag/action.yml @@ -5,15 +5,12 @@ inputs: github_token: description: 'Github token' required: true - type: string branch_name: description: 'Name of the branch the workflow runs on' required: true - type: string dry-run: description: dry run flag required: true - type: boolean runs: using: "composite" diff --git a/.github/actions/publish-libs/action.yml b/.github/actions/publish-libs/action.yml index 8f308c77d4..a91cdff0e1 100644 --- a/.github/actions/publish-libs/action.yml +++ b/.github/actions/publish-libs/action.yml @@ -5,23 +5,18 @@ inputs: branch_name: description: 'Name of the branch the workflow runs on' required: true - type: string github_token: description: 'Github token' required: true - type: string npm_registry_token: description: 'NPM registry token' required: true - type: string npm_tag: description: 'NPM tag' required: true - type: string dry-run: description: dry run flag required: true - type: boolean runs: using: "composite" diff --git a/.github/actions/run-e2e-playwright/action.yml b/.github/actions/run-e2e-playwright/action.yml index 7140b7de75..db5c2f1ad7 100644 --- a/.github/actions/run-e2e-playwright/action.yml +++ b/.github/actions/run-e2e-playwright/action.yml @@ -5,16 +5,13 @@ inputs: options: description: 'Options' required: true - type: string test-runner: description: 'Test runner' required: false - type: string default: 'Playwright' artifact-name: description: Name of the artifact cache required: true - type: string runs: using: "composite" diff --git a/.github/actions/update-library-versions/action.yml b/.github/actions/update-library-versions/action.yml index 1251349d35..0f277608a7 100644 --- a/.github/actions/update-library-versions/action.yml +++ b/.github/actions/update-library-versions/action.yml @@ -5,11 +5,9 @@ inputs: branch_name: description: 'Name of the branch the workflow runs on' required: true - type: string dry-run: description: dry run flag required: true - type: boolean runs: using: "composite" From 5afb9c75259105fd119227221e088ffac424b180 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 14:45:22 +0100 Subject: [PATCH 34/39] fixup indent --- .github/actions/run-e2e-playwright/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/run-e2e-playwright/action.yml b/.github/actions/run-e2e-playwright/action.yml index db5c2f1ad7..be062b9708 100644 --- a/.github/actions/run-e2e-playwright/action.yml +++ b/.github/actions/run-e2e-playwright/action.yml @@ -22,12 +22,12 @@ runs: run: | npm start > /dev/null &\ - echo -n "Waiting for the application to be ready..." + printf "Waiting for the application to be ready..." while ! curl -sf ${PLAYWRIGHT_E2E_HOST} > /dev/null; do - echo -n "." + printf "." sleep 1 done - echo "\nApplication is ready" + printf "\nApplication is ready.\n" echo "Running playwright tests with options ${{ inputs.options }}" npx nx run ${{ inputs.options }}-e2e:e2e From c72b9fc31cec21d8a2cabf56268b69a985063199 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 15:06:17 +0100 Subject: [PATCH 35/39] test with latest acs alpha --- .github/acs-deployment-values-override.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/acs-deployment-values-override.yaml b/.github/acs-deployment-values-override.yaml index f2e7bcd72f..0050db4f64 100644 --- a/.github/acs-deployment-values-override.yaml +++ b/.github/acs-deployment-values-override.yaml @@ -16,3 +16,6 @@ alfresco-audit-storage: enabled: false kibana-audit: enabled: false +alfresco-repository: + image: + tag: 25.1.0-A.7 From 82705fa213a67e2d546bdfaaff7039b3e8dd8d5f Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 14 Jan 2025 15:20:29 +0100 Subject: [PATCH 36/39] Revert "do not wait for reindexing" This reverts commit 86ca54de33a6b5bf1da65202caac5798b5f88d51. --- .github/actions/deploy-local-acs/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/deploy-local-acs/action.yml b/.github/actions/deploy-local-acs/action.yml index 2145757268..32fe75f5da 100644 --- a/.github/actions/deploy-local-acs/action.yml +++ b/.github/actions/deploy-local-acs/action.yml @@ -84,6 +84,8 @@ runs: kubectl get pods --watch & KWPID=$! kubectl wait --timeout=7m --all=true --for=condition=Available deploy && kill $KWPID + echo -n "Waiting for ESC Reindexing job to complete... " + kubectl wait --timeout=5m --for=condition=complete job/acs-alfresco-search-enterprise-reindexing echo "Completed." - name: Spit cluster status after install From 373acd23612cefda55f5b5511271a635be6701a6 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Wed, 15 Jan 2025 09:07:53 +0100 Subject: [PATCH 37/39] [ACS-9102] Exclude unstable test cases --- e2e/playwright/edit-actions/exclude.tests.json | 4 +++- e2e/playwright/search/exclude.tests.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/playwright/edit-actions/exclude.tests.json b/e2e/playwright/edit-actions/exclude.tests.json index 0967ef424b..daf8ad8cf0 100644 --- a/e2e/playwright/edit-actions/exclude.tests.json +++ b/e2e/playwright/edit-actions/exclude.tests.json @@ -1 +1,3 @@ -{} +{ + "XAT-5304": "https://hyland.atlassian.net/browse/ACS-9154" +} diff --git a/e2e/playwright/search/exclude.tests.json b/e2e/playwright/search/exclude.tests.json index 931f8c3508..7f72bcb98c 100644 --- a/e2e/playwright/search/exclude.tests.json +++ b/e2e/playwright/search/exclude.tests.json @@ -2,5 +2,6 @@ "C290019": "https://hyland.atlassian.net/browse/ACS-6928", "C290018": "https://hyland.atlassian.net/browse/ACS-6928", "C699046-3": "https://hyland.atlassian.net/browse/ACS-7464", - "C699498": "https://hyland.atlassian.net/browse/ACS-7682" + "C699498": "https://hyland.atlassian.net/browse/ACS-7682", + "C277736": "https://hyland.atlassian.net/browse/ACS-9154" } From a98120033478bf7d5aca455920372b571a3c5902 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Wed, 15 Jan 2025 09:29:54 +0100 Subject: [PATCH 38/39] [ACS-9102] Exclude unstable test cases --- e2e/playwright/viewer/exclude.tests.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/playwright/viewer/exclude.tests.json b/e2e/playwright/viewer/exclude.tests.json index 9147f5c5b9..d87b45de1a 100644 --- a/e2e/playwright/viewer/exclude.tests.json +++ b/e2e/playwright/viewer/exclude.tests.json @@ -2,5 +2,6 @@ "XAT-17181": "https://hyland.atlassian.net/browse/ACS-8865", "XAT-17182": "https://hyland.atlassian.net/browse/ACS-8865", "XAT-17184": "https://hyland.atlassian.net/browse/ACS-8865", - "XAT-17185": "https://hyland.atlassian.net/browse/ACS-8865" + "XAT-17185": "https://hyland.atlassian.net/browse/ACS-8865", + "MNT-21058": "https://hyland.atlassian.net/browse/ACS-9154" } From 003acf7faafd491cb0f9adafb353686b04eaaf4d Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Wed, 15 Jan 2025 11:12:37 +0100 Subject: [PATCH 39/39] [ACS-9102] Exclude unstable test cases --- e2e/playwright/list-views/exclude.tests.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/playwright/list-views/exclude.tests.json b/e2e/playwright/list-views/exclude.tests.json index 337469aaa3..1904f02da1 100644 --- a/e2e/playwright/list-views/exclude.tests.json +++ b/e2e/playwright/list-views/exclude.tests.json @@ -1,3 +1,4 @@ { - "C261153": "https://alfresco.atlassian.net/browse/AAE-7517" + "C261153": "https://alfresco.atlassian.net/browse/AAE-7517", + "C589205": "https://hyland.atlassian.net/browse/ACS-9154" }