@@ -401,16 +401,17 @@ jobs:
401401 run : task frontend:test:e2e:install -- chromium
402402 - name : Start Spring Boot backend (background)
403403 env :
404- # Match the admin/admin credentials hard-coded in the live test helpers.
405- # Without these the backend falls back to the default admin/stirling user
406- # (see InitialSecuritySetup.createDefaultAdminUser) and every login fails.
407- SECURITY_INITIALLOGIN_USERNAME : admin
408- SECURITY_INITIALLOGIN_PASSWORD : admin
409404 # Suppress the analytics opt-in modal that fires on first admin login when
410405 # enableAnalytics is null (see Onboarding.tsx). The modal renders a Mantine
411406 # overlay that intercepts pointer events on every tool page until dismissed,
412407 # which causes every "click run button" assertion in the live suite to fail.
413408 SYSTEM_ENABLEANALYTICS : " false"
409+ # NOTE: SECURITY_INITIALLOGIN_USERNAME/PASSWORD are intentionally NOT set.
410+ # The live-setup project's bootstrap spec performs the real first-login
411+ # flow against the backend's default admin/stirling user, exercising the
412+ # forced-password-change UI and leaving the DB at admin/adminadmin for
413+ # the rest of the live suite. This is both real coverage of the first-
414+ # login flow and a stronger seed than env-var-driven user creation.
414415 run : |
415416 nohup ./gradlew :stirling-pdf:bootRun > /tmp/backend.log 2>&1 &
416417 echo $! > /tmp/backend.pid
@@ -458,6 +459,130 @@ jobs:
458459 path : frontend/playwright-report/
459460 retention-days : 7
460461
462+ playwright-e2e-enterprise :
463+ # Enterprise suite — exercises premium-key gated features (audit, teams,
464+ # analytics export) plus full OAuth + SAML logins via the Keycloak compose
465+ # stacks under testing/compose. Skipped automatically when the secret is
466+ # absent (forks, dependabot) so the job is opt-in for trusted PRs.
467+ if : needs.files-changed.outputs.frontend == 'true' && secrets.PREMIUM_KEY_ENTERPRISE != ''
468+ needs : files-changed
469+ runs-on : ubuntu-latest
470+ timeout-minutes : 45
471+ env :
472+ PREMIUM_KEY : ${{ secrets.PREMIUM_KEY_ENTERPRISE }}
473+ PREMIUM_ENABLED : " true"
474+ SYSTEM_ENABLEANALYTICS : " false"
475+ steps :
476+ - name : Harden Runner
477+ uses : step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
478+ with :
479+ egress-policy : audit
480+ - name : Checkout repository
481+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
482+ - name : Set up JDK 25
483+ uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
484+ with :
485+ java-version : " 25"
486+ distribution : " temurin"
487+ - name : Set up Node.js
488+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
489+ with :
490+ node-version : " 22"
491+ cache : " npm"
492+ cache-dependency-path : frontend/package-lock.json
493+ - name : Install Task
494+ uses : go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
495+ - name : Install Playwright (chromium only)
496+ run : task frontend:test:e2e:install -- chromium
497+
498+ # ───────── OAuth round-trip ─────────
499+ - name : Bring up Keycloak + Stirling-PDF (OAuth)
500+ working-directory : testing/compose
501+ run : docker compose -f docker-compose-keycloak-oauth.yml up -d --build
502+ - name : Wait for OAuth stack ready
503+ working-directory : testing/compose
504+ run : |
505+ for i in $(seq 1 60); do
506+ if bash validate-oauth-test.sh; then
507+ exit 0
508+ fi
509+ sleep 5
510+ done
511+ docker compose -f docker-compose-keycloak-oauth.yml logs --tail=200
512+ exit 1
513+ - name : Run enterprise OAuth Playwright tests
514+ id : oauth-tests
515+ run : task frontend:test:e2e -- --project=enterprise --grep "OAuth"
516+ - name : Tear down OAuth stack
517+ if : always()
518+ working-directory : testing/compose
519+ run : docker compose -f docker-compose-keycloak-oauth.yml down -v
520+
521+ # ───────── SAML round-trip ─────────
522+ - name : Bring up Keycloak + Stirling-PDF (SAML)
523+ working-directory : testing/compose
524+ run : docker compose -f docker-compose-keycloak-saml.yml up -d --build
525+ - name : Wait for SAML stack ready
526+ working-directory : testing/compose
527+ run : |
528+ for i in $(seq 1 60); do
529+ if bash validate-saml-test.sh; then
530+ exit 0
531+ fi
532+ sleep 5
533+ done
534+ docker compose -f docker-compose-keycloak-saml.yml logs --tail=200
535+ exit 1
536+ - name : Run enterprise SAML Playwright tests
537+ id : saml-tests
538+ run : task frontend:test:e2e -- --project=enterprise --grep "SAML"
539+ - name : Tear down SAML stack
540+ if : always()
541+ working-directory : testing/compose
542+ run : docker compose -f docker-compose-keycloak-saml.yml down -v
543+
544+ # ───────── License-gated feature tests (no IdP needed) ─────────
545+ - name : Start backend for feature tests (premium-enabled, no SSO)
546+ env :
547+ SYSTEM_ENABLEANALYTICS : " false"
548+ run : |
549+ nohup ./gradlew :stirling-pdf:bootRun > /tmp/backend-ent.log 2>&1 &
550+ echo $! > /tmp/backend-ent.pid
551+ - name : Wait for backend ready
552+ run : |
553+ start=$SECONDS
554+ for i in $(seq 1 300); do
555+ if curl -fsS http://localhost:8080/api/v1/info/status >/dev/null 2>&1; then
556+ echo "Backend up after $((SECONDS - start))s"
557+ exit 0
558+ fi
559+ sleep 2
560+ done
561+ tail -200 /tmp/backend-ent.log || true
562+ exit 1
563+ - name : Run enterprise feature Playwright tests
564+ id : feature-tests
565+ run : task frontend:test:e2e -- --project=enterprise --grep "Enterprise license"
566+ - name : Print backend log on failure
567+ if : failure()
568+ run : |
569+ echo "::group::Enterprise backend log"
570+ tail -500 /tmp/backend-ent.log || true
571+ echo "::endgroup::"
572+ - name : Stop backend
573+ if : always()
574+ run : |
575+ if [ -f /tmp/backend-ent.pid ]; then
576+ kill "$(cat /tmp/backend-ent.pid)" 2>/dev/null || true
577+ fi
578+ - name : Upload Playwright report
579+ if : always()
580+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
581+ with :
582+ name : playwright-report-enterprise-${{ github.run_id }}
583+ path : frontend/playwright-report/
584+ retention-days : 7
585+
461586 check-licence :
462587 if : needs.files-changed.outputs.build == 'true'
463588 needs : [files-changed, build]
0 commit comments