# TYPO3 E2E Test Workflow # # Runs Playwright E2E tests against a deployed environment. # Includes smoke tests and optional visual regression tests. # # Usage: # jobs: # test: # needs: switch-stage # uses: infrastructure/ci-templates/.forgejo/workflows/typo3-e2e-test.yaml@main # with: # test_url: https://myproject.cloonar.dev name: TYPO3 E2E Tests on: workflow_call: inputs: test_url: description: 'URL to test against' required: true type: string e2e_path: description: 'Path to E2E test directory' required: false type: string default: 'tests/e2e' run_visual_tests: description: 'Run visual regression tests' required: false type: boolean default: true jobs: e2e-test: name: E2E Tests runs-on: ubuntu-latest container: image: mcr.microsoft.com/playwright:v1.50.0-noble steps: - uses: actions/checkout@v4 - name: Install dependencies working-directory: ${{ inputs.e2e_path }} run: npm ci - name: Run smoke tests working-directory: ${{ inputs.e2e_path }} env: TEST_URL: ${{ inputs.test_url }} run: npx playwright test smoke - name: Run visual regression tests if: ${{ inputs.run_visual_tests }} working-directory: ${{ inputs.e2e_path }} env: TEST_URL: ${{ inputs.test_url }} run: npx playwright test visual - name: Upload test report if: always() uses: actions/upload-artifact@v4 with: name: playwright-report path: ${{ inputs.e2e_path }}/playwright-report/ retention-days: 7 - name: Upload diff screenshots if: failure() uses: actions/upload-artifact@v4 with: name: visual-diff path: ${{ inputs.e2e_path }}/test-results/ retention-days: 7