diff --git a/.github/workflows/test-integration-webtest.yml b/.github/workflows/test-integration-webtest.yml index 56c2c0e07..d783f6c05 100644 --- a/.github/workflows/test-integration-webtest.yml +++ b/.github/workflows/test-integration-webtest.yml @@ -58,3 +58,12 @@ jobs: working-directory: spdashboard run: | ${DOCKER_COMPOSE_PHP} sh -c 'composer webtest' + + - name: Upload test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results + path: spdashboard/var/log + retention-days: 2 + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml deleted file mode 100644 index 614e58887..000000000 --- a/.github/workflows/test-integration.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Run integration tests - -on: - pull_request: - push: - branches: [main] - -jobs: - build: - # Due to the cgroups 1 issue on the openconext container, we do not - # use the new ubuntu platform yet. As they started using cgroups v2 - runs-on: ubuntu-latest - timeout-minutes: 30 - env: - DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-ci.yml - DOCKER_COMPOSE_PHP: docker compose -f docker-compose.yml -f docker-compose-ci.yml exec -T spdashboard - DOCKER_COMPOSE_CYPRESS: docker compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress - DOCKER_RUN_SPD_AS_WWW: docker exec --user 33:33 spdashboard-spdashboard-1 - - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - path: spdashboard - - - name: Checkout openconext-devconf - uses: actions/checkout@v4 - with: - path: OpenConext-devconf - repository: OpenConext/OpenConext-devconf - - - name: Bootstrap the openconext environment - working-directory: spdashboard - run: bash ../OpenConext-devconf/core/scripts/init.sh - - - name: Start the docker images for testing - working-directory: spdashboard - run: ${DOCKER_COMPOSE} up -d - - - name: Instantiate the env file - run: cp spdashboard/.env.dist spdashboard/.env - - - name: Import the certificate on the Cypress docker machine - working-directory: spdashboard - run: ${DOCKER_COMPOSE_CYPRESS} sh /e2e/docker/conf/cypress_import_cert.sh - - - name: Run composer - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} /usr/bin/composer install -n --prefer-dist -o --ignore-platform-reqs - - - name: Run yarn - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} yarn install - - - name: Create front end dependencies (yarn encore production) - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} yarn run encore production - - - name: Delete the database if present - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} rm -f /tmp/spdashboard-webtests.sqlite - - - name: Get the database up and running - working-directory: spdashboard - run: | - ${DOCKER_RUN_SPD_AS_WWW} bin/console doctrine:schema:create - env: - APP_ENV: test - - - name: Run Copy Paste Detector - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} sh -c 'composer jscpd' - continue-on-error: true - - - name: Run CI tests - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} sh -c 'composer check' - - - name: Run JS tests - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_PHP} sh -c 'composer jest' - - - name: Run Cypress tests - working-directory: spdashboard - run: | - ${DOCKER_COMPOSE_CYPRESS} cypress run --browser chrome -C ./ci/qa/cypress.config.ts - continue-on-error: true diff --git a/tests/webtests/EditServiceTest.php b/tests/webtests/EditServiceTest.php index 6b908b538..7f48632dc 100644 --- a/tests/webtests/EditServiceTest.php +++ b/tests/webtests/EditServiceTest.php @@ -75,6 +75,7 @@ public function test_privacy_questions_admin_toggle() $form->setValues($formData); self::$pantherClient->executeScript("document.getElementsByClassName('service-form').item(0).submit();"); self::$pantherClient->wait(3); + self::$pantherClient->takeScreenshot('var/ss.png'); self::assertOnPage('Your changes were saved!'); // Step 2: Surfnet can't access the privacy questions