Skip to content

Commit 1b402f3

Browse files
committed
test: ui upgrade tests
1 parent dcd430a commit 1b402f3

File tree

12 files changed

+1671
-5
lines changed

12 files changed

+1671
-5
lines changed

images/tests/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,20 @@ RUN poetry install --no-root --with test && rm -rf $POETRY_CACHE_DIR
3535
# Runtime stage
3636
FROM python:3.12-slim
3737

38-
# Install system dependencies for runtime
38+
# Install system dependencies for runtime including Chrome for Selenium tests
3939
RUN apt-get update && \
4040
apt-get install -y --no-install-recommends \
4141
curl \
4242
ca-certificates \
43-
&& rm -rf /var/lib/apt/lists/*
43+
wget \
44+
gnupg \
45+
&& wget -q -O /tmp/google-chrome-key.pub https://dl-ssl.google.com/linux/linux_signing_key.pub \
46+
&& gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg /tmp/google-chrome-key.pub \
47+
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
48+
&& apt-get update \
49+
&& apt-get install -y --no-install-recommends \
50+
google-chrome-stable \
51+
&& rm -rf /var/lib/apt/lists/* /tmp/google-chrome-key.pub
4452

4553
# Install OpenShift CLI (oc)
4654
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz | \

images/tests/run-tests.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,20 @@ cp "${TEMP_KUBECONFIG}" ~/.kube/config || {
387387

388388
echo "Successfully logged in with TEST_USER"
389389

390+
# ============================================================================
391+
# Get RHOAI Dashboard URL for UI Tests
392+
# ============================================================================
393+
echo "Retrieving RHOAI Dashboard URL..."
394+
ODH_DASHBOARD_URL=$(oc get consolelink rhodslink -o jsonpath='{.spec.href}' 2>/dev/null)
395+
396+
if [ -z "$ODH_DASHBOARD_URL" ]; then
397+
echo "WARNING: Failed to retrieve Dashboard URL from consolelink rhodslink"
398+
echo " UI tests will be skipped or may fail"
399+
else
400+
echo "Dashboard URL: $ODH_DASHBOARD_URL"
401+
export ODH_DASHBOARD_URL
402+
fi
403+
390404
# ============================================================================
391405
# Run Tests
392406
# ============================================================================

poetry.lock

Lines changed: 149 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ coverage = "7.6.4"
6666
pytest-mock = "3.11.1"
6767
pytest-timeout = "2.3.1"
6868
jupyterlab = "4.3.1"
69+
selenium = "4.27.1"
70+
webdriver-manager = "4.0.2"
6971

7072

7173
[tool.poetry.group.dev.dependencies]
@@ -83,7 +85,8 @@ markers = [
8385
"smoke: Smoke tests - quick validation tests",
8486
"tier1: Tier1 tests - standard test suite",
8587
"pre_upgrade: Tests to run before upgrade",
86-
"post_upgrade: Tests to run after upgrade"
88+
"post_upgrade: Tests to run after upgrade",
89+
"ui: UI tests requiring browser automation"
8790
]
8891
addopts = "--timeout=900 --ignore=src/codeflare_sdk/vendored"
8992
testpaths = ["src/codeflare_sdk"]

0 commit comments

Comments
 (0)