Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ jobs:
npx playwright test --reporter=list
env:
OPENIDM_URL: http://localhost:8080
- name: Start OpenIDM with custom context path /myidm
if: runner.os == 'Linux'
run: |
openidm/shutdown.sh
timeout 1m bash -c 'while [ -f openidm/.openidm.pid ]; do sleep 2; done' || true
rm -rf openidm/logs/*
OPENIDM_OPTS="-Dlogback.configurationFile=conf/logging-config.groovy -Dopenidm.context.path=/myidm" openidm/startup.sh &
timeout 3m bash -c 'until grep -q "OpenIDM ready" openidm/logs/openidm0.log.0 ; do sleep 5; done' || cat openidm/logs/openidm0.log.0
grep -q "OpenIDM ready" openidm/logs/openidm0.log.0
! grep "ERROR" openidm/logs/openidm0.log.0
! grep "SEVERE" openidm/logs/openidm0.log.0
- name: UI Smoke Tests with /myidm context path (Playwright)
if: runner.os == 'Linux'
run: |
cd e2e
npx playwright test --reporter=list
env:
OPENIDM_URL: http://localhost:8080
OPENIDM_CONTEXT_PATH: /myidm
- name: Test on Windows
if: runner.os == 'Windows'
run: |
Expand Down
5 changes: 3 additions & 2 deletions e2e/ui-smoke-test.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import { test, expect } from "@playwright/test";

const BASE_URL = process.env.OPENIDM_URL || "http://localhost:8080";
const CONTEXT_PATH = process.env.OPENIDM_CONTEXT_PATH || "/openidm";
const ADMIN_USER = process.env.OPENIDM_ADMIN_USER || "openidm-admin";
const ADMIN_PASS = process.env.OPENIDM_ADMIN_PASS || "openidm-admin";

Expand Down Expand Up @@ -119,7 +120,7 @@ test.describe("OpenIDM UI Smoke Tests", () => {
});

test("REST API ping is accessible", async ({ request }) => {
const response = await request.get(`${BASE_URL}/openidm/info/ping`, {
const response = await request.get(`${BASE_URL}${CONTEXT_PATH}/info/ping`, {
headers: {
"X-OpenIDM-Username": ADMIN_USER,
"X-OpenIDM-Password": ADMIN_PASS,
Expand All @@ -131,7 +132,7 @@ test.describe("OpenIDM UI Smoke Tests", () => {
});

test("REST API config endpoint is accessible", async ({ request }) => {
const response = await request.get(`${BASE_URL}/openidm/config/ui/configuration`, {
const response = await request.get(`${BASE_URL}${CONTEXT_PATH}/config/ui/configuration`, {
headers: {
"X-OpenIDM-Username": ADMIN_USER,
"X-OpenIDM-Password": ADMIN_PASS,
Expand Down
Loading