Skip to content

Commit 1df435f

Browse files
Copilotvharseko
andauthored
Add Playwright UI smoke tests against real OpenIDM server in CI (#145)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com> Co-authored-by: Valery Kharseko <vharseko@3a-systems.ru>
1 parent 261adbd commit 1df435f

7 files changed

Lines changed: 421 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# The contents of this file are subject to the terms of the Common Development and
2+
# Distribution License (the License). You may not use this file except in compliance with the
3+
# License.
4+
#
5+
# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
6+
# specific language governing permission and limitations under the License.
7+
#
8+
# When distributing Covered Software, include this CDDL Header Notice in each file and include
9+
# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
10+
# Header, with the fields enclosed by brackets [] replaced by your own identifying
11+
# information: "Portions copyright [year] [name of copyright owner]".
12+
#
13+
# Copyright 2024-2026 3A Systems, LLC.
114
name: Build
215

316
on:
@@ -44,6 +57,16 @@ jobs:
4457
grep -q "OpenIDM ready" openidm/logs/openidm0.log.0
4558
! grep "ERROR" openidm/logs/openidm0.log.0
4659
! grep "SEVERE" openidm/logs/openidm0.log.0
60+
- name: UI Smoke Tests (Playwright)
61+
if: runner.os == 'Linux'
62+
run: |
63+
cd e2e
64+
npm init -y
65+
npm install @playwright/test
66+
npx playwright install chromium --with-deps
67+
npx playwright test --reporter=list
68+
env:
69+
OPENIDM_URL: http://localhost:8080
4770
- name: Test on Windows
4871
if: runner.os == 'Windows'
4972
run: |

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# The contents of this file are subject to the terms of the Common Development and
2+
# Distribution License (the License). You may not use this file except in compliance with the
3+
# License.
4+
#
5+
# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
6+
# specific language governing permission and limitations under the License.
7+
#
8+
# When distributing Covered Software, include this CDDL Header Notice in each file and include
9+
# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
10+
# Header, with the fields enclosed by brackets [] replaced by your own identifying
11+
# information: "Portions copyright [year] [name of copyright owner]".
12+
#
13+
# Copyright 2024-2026 3A Systems, LLC.
114
FROM eclipse-temurin:25-jre-jammy
215

316
LABEL org.opencontainers.image.authors="Open Identity Platform Community"
@@ -30,4 +43,4 @@ USER $USER
3043

3144
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 CMD curl -i -o - --silent --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: ${OPENIDM_PASSWORD:-openidm-admin}" http://127.0.0.1:8080/openidm/info/ping | grep -q "\"ACTIVE_READY\""
3245

33-
ENTRYPOINT ["/opt/openidm/startup.sh"]
46+
ENTRYPOINT ["/opt/openidm/startup.sh"]

Dockerfile-alpine

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# The contents of this file are subject to the terms of the Common Development and
2+
# Distribution License (the License). You may not use this file except in compliance with the
3+
# License.
4+
#
5+
# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
6+
# specific language governing permission and limitations under the License.
7+
#
8+
# When distributing Covered Software, include this CDDL Header Notice in each file and include
9+
# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
10+
# Header, with the fields enclosed by brackets [] replaced by your own identifying
11+
# information: "Portions copyright [year] [name of copyright owner]".
12+
#
13+
# Copyright 2024-2026 3A Systems, LLC.
114
FROM alpine:latest
215

316
LABEL org.opencontainers.image.authors="Open Identity Platform Community"
@@ -31,4 +44,4 @@ USER $USER
3144

3245
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 CMD curl -i -o - --silent --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: ${OPENIDM_PASSWORD:-openidm-admin}" http://127.0.0.1:8080/openidm/info/ping | grep -q "\"ACTIVE_READY\""
3346

34-
ENTRYPOINT ["/opt/openidm/startup.sh"]
47+
ENTRYPOINT ["/opt/openidm/startup.sh"]

e2e/.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# The contents of this file are subject to the terms of the Common Development and
2+
# Distribution License (the License). You may not use this file except in compliance with the
3+
# License.
4+
#
5+
# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
6+
# specific language governing permission and limitations under the License.
7+
#
8+
# When distributing Covered Software, include this CDDL Header Notice in each file and include
9+
# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
10+
# Header, with the fields enclosed by brackets [] replaced by your own identifying
11+
# information: "Portions copyright [year] [name of copyright owner]".
12+
#
13+
# Copyright 2026 3A Systems, LLC.
14+
15+
node_modules/
16+
package-lock.json
17+
package.json
18+
playwright-report/
19+
test-results/

e2e/playwright.config.mjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* The contents of this file are subject to the terms of the Common Development and
3+
* Distribution License (the License). You may not use this file except in compliance with the
4+
* License.
5+
*
6+
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
7+
* specific language governing permission and limitations under the License.
8+
*
9+
* When distributing Covered Software, include this CDDL Header Notice in each file and include
10+
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
11+
* Header, with the fields enclosed by brackets [] replaced by your own identifying
12+
* information: "Portions copyright [year] [name of copyright owner]".
13+
*
14+
* Copyright 2026 3A Systems, LLC.
15+
*/
16+
17+
import { defineConfig } from "@playwright/test";
18+
19+
export default defineConfig({
20+
testDir: ".",
21+
testMatch: "**/*.spec.mjs",
22+
timeout: 180000,
23+
retries: 1,
24+
use: {
25+
headless: true,
26+
baseURL: process.env.OPENIDM_URL || "http://localhost:8080",
27+
ignoreHTTPSErrors: true,
28+
screenshot: "only-on-failure",
29+
trace: "retain-on-failure",
30+
},
31+
reporter: [["list"], ["html", { open: "never", outputFolder: "playwright-report" }]],
32+
});

0 commit comments

Comments
 (0)