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
51 changes: 51 additions & 0 deletions .github/workflows/pr-ui-autotest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: PR UI AutoTest

on:
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

jobs:
ui-test:
runs-on: windows-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm

- name: Install dependencies
run: npm ci

- name: Build extension
run: npm run build

- name: Package PR VSIX
run: npx @vscode/vsce@latest package -o extension.vsix

- name: Install autotest CLI
run: npm install -g @vscjava/vscode-autotest

- name: Run Help Center webview UI test
shell: pwsh
run: |
$vsixPath = Join-Path (Get-Location) "extension.vsix"
autotest run test-plans\java-pack-help-center-webview.yaml --vsix $vsixPath --no-llm

- name: Upload UI test results
if: always()
uses: actions/upload-artifact@v4
with:
name: pr-ui-autotest-results
path: test-results/
retention-days: 30
38 changes: 38 additions & 0 deletions test-plans/java-pack-help-center-webview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Test Plan: Java Extension Pack - Help Center webview
#
# Covers the React/vscode-elements webview migration by opening the local
# vscode-java-pack Help Center and verifying key content from inside the webview.
#
# Usage after packaging vscode-java-pack:
# npx autotest run test-plans\java-pack-help-center-webview.yaml --vsix extension.vsix --no-llm

name: "Java Extension Pack - Help Center Webview"
description: |
Opens the Java Help Center webview from the installed vscode-java-pack VSIX
and verifies that the migrated React webview renders its main sections.

setup:
extension: "redhat.java"
vscodeVersion: "stable"
timeout: 60
settings:
java.help.showReleaseNotes: false
java.help.firstView: "none"

steps:
- id: "open-help-center"
action: "executeVSCodeCommand java.welcome"
verifyEditorTab:
title: "Java Help Center"
timeout: 20

- id: "verify-help-center-content"
action: "wait 2 seconds"
verifyWebview:
contains:
- "Java Help Center"
- "Get Started"
- "Create a New Project"
- "Configure Java Runtime"
- "Open Java Settings"
timeout: 20
Loading