From: Fiete Ostkamp Date: Thu, 5 Mar 2026 15:24:40 +0000 (+0100) Subject: Run playwright tests in pipeline X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=63413a4cbc527165f3dcde993da127d41a0ca837;p=ci-management.git Run playwright tests in pipeline Issue-ID: CCSDK-4176 Change-Id: I98e8bdcb482ee38afdf3112577c72905a5384b47 Signed-off-by: Fiete Ostkamp --- diff --git a/jjb/ccsdk/cds-playwright-e2e.sh b/jjb/ccsdk/cds-playwright-e2e.sh new file mode 100755 index 000000000..0783870cd --- /dev/null +++ b/jjb/ccsdk/cds-playwright-e2e.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-License-Identifier: Apache-2.0 +############################################################################## +# Run Playwright end-to-end tests for the CDS UI. +# +# Playwright starts three services automatically (mock-processor, LoopBack +# BFF, Angular dev-server) and runs headless Firefox tests against them. +# See cds-ui/e2e-playwright/README.md for details. +############################################################################## +set -e -o pipefail + +echo "---> cds-playwright-e2e.sh" + +# ── Install Node.js 18 LTS ──────────────────────────────────────────────────── +echo "---> Installing Node.js 18" +sudo apt-get update -qq +sudo apt-get install -y -qq nodejs npm > /dev/null 2>&1 +sudo npm install -g n > /dev/null 2>&1 +sudo n 18 > /dev/null 2>&1 +hash -r +echo "Node.js version: $(node --version)" +echo "npm version: $(npm --version)" + +# ── Install dependencies for each component ─────────────────────────────────── + +echo "---> Installing server (LoopBack BFF) dependencies" +cd "$WORKSPACE/cds-ui/server" +npm install + +echo "---> Installing designer-client (Angular) dependencies" +cd "$WORKSPACE/cds-ui/designer-client" +npm install + +echo "---> Installing e2e-playwright dependencies" +cd "$WORKSPACE/cds-ui/e2e-playwright" +npm install + +# ── Install Playwright browser (Firefox, matching the config) ────────────────── +echo "---> Installing Playwright Firefox browser with system dependencies" +npx playwright install --with-deps firefox + +# ── Run the tests ────────────────────────────────────────────────────────────── +echo "---> Running Playwright e2e tests (CI=true)" +export CI=true +npm test + +echo "---> Playwright e2e tests completed" diff --git a/jjb/ccsdk/cds-python.yaml b/jjb/ccsdk/cds-python.yaml index f1f8b74a1..87487c53a 100644 --- a/jjb/ccsdk/cds-python.yaml +++ b/jjb/ccsdk/cds-python.yaml @@ -21,6 +21,23 @@ jobs: - gerrit-tox-verify +- project: + name: ccsdk-cds-e2e-playwright + project-name: ccsdk-cds + project: ccsdk/cds + build-node: ubuntu2204-docker-8c-8g + build-timeout: 30 + pattern: "cds-ui/**" + area: e2e-playwright + script: !include-raw-escape: cds-playwright-e2e.sh + stream: + - master: + branch: master + - quebec: + branch: quebec + jobs: + - "{project-name}-{stream}-{area}-verify-shell" + - project: name: ccsdk-cds-artifact-manager project: ccsdk/cds