Skip to content

chore: workflow fixes and devcontainer realign for playwright, initia…#1792

Merged
yingbull merged 16 commits into
developfrom
fix/legacy-test-workflow-fix
Jan 18, 2026
Merged

chore: workflow fixes and devcontainer realign for playwright, initia…#1792
yingbull merged 16 commits into
developfrom
fix/legacy-test-workflow-fix

Conversation

@yingbull

@yingbull yingbull commented Jan 18, 2026

Copy link
Copy Markdown

…l demo UI test docs


Summary by cubic

Stabilizes and speeds up CI by splitting modern and legacy test runs and aligning the devcontainer with Playwright 1.56 on Ubuntu 24.04. Adds a full “Test 2” UI test guide and screenshot structure for demo runs.

  • Refactors

    • Build once, then run modern (H2/JUnit 5) and legacy (MariaDB/JUnit 4) tests in parallel.
    • Use Docker Buildx and actions v4 caching; share Maven dependencies across jobs via an artifact-backed .m2 cache.
    • Replace compose with explicit container builds/runs; add DB readiness and init checks.
    • Update devcontainer to Playwright 1.56.0 with npx playwright install --with-deps; remove manual apt libs for Ubuntu 24.04 t64.
    • Bump actions to checkout@v4 and setup-buildx@v3; make install for builds and targeted test commands.
    • Update MCP config to @playwright/mcp@latest with updated Chromium path.
    • Add Playwright setup doc and a verification script to ensure the Chromium executable path matches the installed revision.
  • New Features

    • Add Test 2 comprehensive demographic UI test docs (README + execution guide, 30 steps).
    • Include screenshots folder and .gitkeep for golden image promotion.

Written for commit 4257d85. Summary will update on new commits.

Summary by CodeRabbit

  • Chores

    • Upgraded Playwright tooling and adjusted devcontainer setup for improved browser installation and global CLI usage.
    • Streamlined CI to run build, modern and legacy test paths in parallel with improved caching and container orchestration.
  • Documentation

    • Added Playwright setup and verification guidance for the devcontainer.
    • Added comprehensive end-to-end UI test README and execution guide.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 18, 2026 05:52

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @yingbull, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jan 18, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@yingbull has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 50ea950 and 4257d85.

📒 Files selected for processing (5)
  • .devcontainer/PLAYWRIGHT_SETUP.md
  • .devcontainer/README.md
  • .devcontainer/scripts/verify-playwright-path.sh
  • .github/workflows/maven-project.yml
  • .mcp.json

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Updates Playwright setup in the devcontainer and MCP, adds Playwright verification tooling and UI test docs, and refactors CI into parallel build/modern-tests/legacy-tests with explicit Docker buildx caching and container lifecycle management.

Changes

Cohort / File(s) Summary
Devcontainer Playwright & MCP
.devcontainer/development/Dockerfile, .mcp.json
Upgraded Playwright CLI, switched browser install to npx playwright install --with-deps chromium chrome firefox, removed a set of legacy apt packages, and adjusted Chromium executable path in .mcp.json.
Playwright Verification tooling
.devcontainer/scripts/verify-playwright-path.sh, .devcontainer/PLAYWRIGHT_SETUP.md, .devcontainer/README.md
Added a verification script to check Playwright Chromium paths and .mcp.json, plus documentation describing verification steps, version-to-revision mapping, and quick-reference usage.
CI/CD: GitHub Actions workflow
.github/workflows/maven-project.yml
Replaced single-job flow with three jobs (build, modern-tests, legacy-tests) that run in parallel, added Docker Buildx with cache keys, separate Maven caching per job, explicit dev container and DB container lifecycle for test jobs, and DB readiness/init checks for legacy tests.
UI Test Docs
docs/ui-tests/test-2/test-2-README.md, docs/ui-tests/test-2/test-2-EXECUTION.md
Added comprehensive end-to-end Demographics UI test README and execution guide with step-by-step flows, test data, screenshots, verification SQL, troubleshooting, and cleanup procedures.

Sequence Diagram(s)

sequenceDiagram
    participant Actions as "GitHub Actions"
    participant Buildx as "Docker Buildx\n(build devcontainer image)"
    participant Registry as "Image Cache/Registry"
    participant Modern as "Modern Tests\n(JUnit5 + H2)"
    participant Legacy as "Legacy Tests\n(JUnit4 + MariaDB)"
    participant DB as "MariaDB Container"
    participant App as "Dev Tomcat Container / App"

    rect rgba(200,230,255,0.5)
      Actions->>Buildx: build devcontainer image (cached)
      Buildx->>Registry: push/populate cache
    end

    rect rgba(200,255,200,0.5)
      Actions->>Modern: start modern-tests job
      Modern->>App: start devcontainer (no DB)
      Modern->>Modern: run JUnit5 tests (H2)
      Modern-->>Actions: upload artifacts/results
    end

    rect rgba(255,230,200,0.5)
      Actions->>Legacy: start legacy-tests job
      Legacy->>App: start devcontainer
      Legacy->>DB: start MariaDB container on network
      DB->>Legacy: respond to readiness probe
      Legacy->>App: initialize providers/databases
      Legacy->>Legacy: run JUnit4 tests (against MariaDB)
      Legacy-->>Actions: upload artifacts/results
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A rabbit's note on nightly hops:
I checked the path and tuned the play,
Browsers fetched with deps today,
Buildx caches speed the way,
Tests split paths and dance, hooray! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title refers to workflow fixes, devcontainer realignment for Playwright, and initial UI test documentation, which are the primary changes in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jan 18, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 4257d85.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/cache 4.*.* 🟢 6.7
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits
actions/actions/checkout 4.*.* 🟢 6.7
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 79 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 10all changesets reviewed
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Vulnerabilities🟢 91 existing vulnerabilities detected
SAST🟢 8SAST tool detected but not run on all commits
actions/actions/download-artifact 4.*.* 🟢 6.5
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1025 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 9SAST tool detected but not run on all commits
actions/actions/upload-artifact 4.*.* 🟢 6.5
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 9SAST tool detected but not run on all commits
actions/docker/setup-buildx-action 3.*.* 🟢 5.3
Details
CheckScoreReason
Security-Policy🟢 9security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 109 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 4Found 3/7 approved changesets -- score normalized to 4
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Signed-Releases⚠️ -1no releases found
Fuzzing⚠️ 0project is not fuzzed
Packaging🟢 10packaging workflow detected
Vulnerabilities⚠️ 19 existing vulnerabilities detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • .github/workflows/maven-project.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the CI/CD workflow structure, aligns DevContainer configuration with Playwright 1.56.0, and introduces comprehensive UI test documentation for the Demographic module. The changes modernize the testing infrastructure by introducing parallel test execution and updating Playwright dependencies.

Changes:

  • Restructured GitHub Actions workflow to run modern and legacy tests in parallel after a shared build step
  • Updated Playwright from 1.40.0 to 1.56.0 in the DevContainer with proper Ubuntu 24.04 t64 package support
  • Added comprehensive Test 2 documentation covering 30-step demographic module validation workflow

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.mcp.json Updates Playwright MCP version to 0.0.56 and adjusts Chromium executable path (contains version mismatch issue)
.devcontainer/development/Dockerfile Upgrades Playwright to 1.56.0 with --with-deps flag for proper Ubuntu 24.04 t64 library installation
.github/workflows/maven-project.yml Restructures workflow into parallel build→test jobs with BuildKit caching and separate modern/legacy test execution
docs/ui-tests/test-2/test-2-README.md Adds comprehensive documentation for 30-step demographic module UI test including prerequisites, workflow phases, and troubleshooting
docs/ui-tests/test-2/test-2-EXECUTION.md Provides detailed step-by-step execution guide with expected screenshots, database verification, and success criteria
docs/ui-tests/test-2/screenshots/.gitkeep Creates directory structure for test screenshots

Comment thread .mcp.json
Comment thread .mcp.json Outdated
Comment thread .github/workflows/maven-project.yml
Comment thread docs/ui-tests/test-2/test-2-EXECUTION.md
Comment thread .github/workflows/maven-project.yml

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copilot AI commented Jan 18, 2026

Copy link
Copy Markdown

@yingbull I've opened a new pull request, #1793, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI commented Jan 18, 2026

Copy link
Copy Markdown

@yingbull I've opened a new pull request, #1794, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI commented Jan 18, 2026

Copy link
Copy Markdown

@yingbull I've opened a new pull request, #1795, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 9 commits January 18, 2026 06:08
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Fix MCP package version to use @latest per official documentation
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Use artifacts to share Maven dependencies between workflow jobs
…ation

Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In `@docs/ui-tests/test-2/test-2-EXECUTION.md`:
- Line 69: Wrap bare URLs/domains in code or link syntax to satisfy MD034:
locate the bare URL "http://localhost:8080/oscar" (and the other occurrences
noted at lines 177 and 353) in docs/ui-tests/test-2/test-2-EXECUTION.md and
replace each bare URL with either a code span (e.g.,
`http://localhost:8080/oscar`) or a proper markdown link (e.g.,
[http://localhost:8080/oscar](http://localhost:8080/oscar)).
- Around line 32-40: The expected-output code fence in the test markdown is
missing a language tag causing MD040; edit the fenced block named "Expected
output" and change the opening triple-backtick from ``` to ```text so the block
becomes a text-specified fenced code block (keep the table contents unchanged)
to satisfy the linter and improve readability.

In `@docs/ui-tests/test-2/test-2-README.md`:
- Around line 34-47: The markdown tables under the headings "Provider
Credentials" and "Existing Test Patients (Must Exist)" need blank lines before
and after them to satisfy MD058; edit the README to insert one empty line above
each table and one empty line below each table so each table is separated from
surrounding headings and paragraphs.
- Around line 138-163: The fenced code blocks under the headings "Last Name:
TEST-UITEST2" (patient data block), "Edit Values (Applied During Test)" and
"Cleanup Values" need a language label to satisfy MD040 and improve readability;
update each triple-backtick fence to include a language like text (e.g.,
```text) so the blocks for the patient data, edit values, and cleanup values are
explicitly marked as plain text.
- Line 28: Replace the bare URL "http://localhost:8080/oscar" in the sentence
starting with "OpenO EMR running at" (and the other occurrences at the same
lines referenced) with either a code span or a proper Markdown link; e.g.,
change the inline bare domain to `http://localhost:8080/oscar` or
`[http://localhost:8080/oscar](http://localhost:8080/oscar)` so the markdown
linter no longer flags the bare URL.
♻️ Duplicate comments (1)
.mcp.json (1)

6-13: Verify MCP version and Chromium path align with Playwright 1.56.0.

Please confirm @playwright/mcp@0.0.56 is compatible with Playwright 1.56.0 and that the configured Chromium path exists after the devcontainer install; otherwise MCP won’t be able to launch the browser.

🔍 Suggested verification commands
# Check actual Playwright browser install paths
ls -d /root/.cache/ms-playwright/chromium-*/chrome-linux*/chrome

# Confirm which Chromium would be installed by Playwright 1.56.0
npx -y playwright@1.56.0 install chromium --dry-run
🧹 Nitpick comments (2)
.devcontainer/development/Dockerfile (1)

66-75: Pin Playwright browser install to the same version as the global CLI.

npx playwright install can resolve a newer Playwright package if no local install exists. Safer to use the global CLI (or an explicitly versioned npx) to keep browser binaries aligned with 1.56.0.

♻️ Suggested change
-RUN npx playwright install --with-deps chromium chrome firefox && \
+RUN playwright install --with-deps chromium chrome firefox && \
     echo "✅ Playwright browsers installed (Chromium, Chrome, Firefox)"
docs/ui-tests/test-2/test-2-README.md (1)

137-149: Use FAKE- prefix for synthetic patient names in UI-test docs.

Consider renaming TEST-UITEST2 to a FAKE-prefixed value (e.g., FAKE-UITEST2) and updating references in this README and the execution guide to keep synthetic data conventions consistent across OpenO EMR UI-test docs. Based on learnings, please keep example data explicitly synthetic.

Comment on lines +32 to +40
Expected output:
```
+----------------+--------------+-------------+----------------+
| demographic_no | last_name | first_name | patient_status |
+----------------+--------------+-------------+----------------+
| 1 | FAKE-Jones | FAKE-Jacky | AC |
| 182 | FAKE-Gaylord | FAKE-Branda | AC |
+----------------+--------------+-------------+----------------+
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language tag to the expected-output fence.

This resolves the MD040 lint warning and improves readability.

✏️ Suggested change
-Expected output:
-```
+Expected output:
+```text
 +----------------+--------------+-------------+----------------+
 | demographic_no | last_name    | first_name  | patient_status |
 +----------------+--------------+-------------+----------------+
 |              1 | FAKE-Jones   | FAKE-Jacky  | AC             |
 |            182 | FAKE-Gaylord | FAKE-Branda | AC             |
 +----------------+--------------+-------------+----------------+
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

33-33: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@docs/ui-tests/test-2/test-2-EXECUTION.md` around lines 32 - 40, The
expected-output code fence in the test markdown is missing a language tag
causing MD040; edit the fenced block named "Expected output" and change the
opening triple-backtick from ``` to ```text so the block becomes a
text-specified fenced code block (keep the table contents unchanged) to satisfy
the linter and improve readability.

Comment thread docs/ui-tests/test-2/test-2-EXECUTION.md
## Prerequisites

### Application Requirements
- OpenO EMR running at http://localhost:8080/oscar

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Avoid bare URLs/domains in prose and tables.

Markdownlint flags these as bare URLs/domains. Wrap them in code spans or Markdown links.

✏️ Example fix
-- OpenO EMR running at http://localhost:8080/oscar
+- OpenO EMR running at `http://localhost:8080/oscar`

Also applies to: 98-98, 108-108

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

28-28: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In `@docs/ui-tests/test-2/test-2-README.md` at line 28, Replace the bare URL
"http://localhost:8080/oscar" in the sentence starting with "OpenO EMR running
at" (and the other occurrences at the same lines referenced) with either a code
span or a proper Markdown link; e.g., change the inline bare domain to
`http://localhost:8080/oscar` or
`[http://localhost:8080/oscar](http://localhost:8080/oscar)` so the markdown
linter no longer flags the bare URL.

Comment thread docs/ui-tests/test-2/test-2-README.md
Comment thread docs/ui-tests/test-2/test-2-README.md
Add Playwright Chromium path verification tooling
@claude

claude Bot commented Jan 18, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants