Skip to content
Open
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
3 changes: 3 additions & 0 deletions pde2e-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ podman logs -f pde2e-image-run

### Kaiden Windows Example without Podman Installation

When `-appName Kaiden` (or `-repo kaiden`) is used, the runner keeps `Kaiden.exe` at
`%LOCALAPPDATA%\Programs\kaiden\` and exports `KAIDEN_BINARY` for Kaiden's Playwright CDP harness.
Comment on lines +294 to +295

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify setup-flow requirements in the Kaiden docs.

Line 294 says -appName Kaiden or -repo kaiden, but setup-path resolution still depends on $appName ($appName.exe). Please clarify that setup installs should pass -appName Kaiden (or document that repo-only works only in non-setup/direct-path scenarios).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pde2e-image/README.md` around lines 294 - 295, The Kaiden setup docs
currently imply `-appName Kaiden` and `-repo kaiden` are interchangeable, but
the setup path logic in the runner depends on `$appName` for resolving
`$appName.exe`. Update the README section that describes setup-flow requirements
to explicitly state that setup installs must pass `-appName Kaiden` for
`KAIDEN_BINARY` to point to the expected executable, and only mention `-repo
kaiden` as valid for non-setup/direct-path scenarios if that is supported by the
runner.


```sh
podman run --rm -d --name pde2e-image-run \
-e TARGET_HOST=$(cat host-win) \
Expand Down
13 changes: 13 additions & 0 deletions pde2e-image/common/windows/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ function Load-Variables() {
$global:scriptEnvVars += "PODMAN_DESKTOP_ARGS"
$global:envVarDefs += "PODMAN_DESKTOP_ARGS=$workingDir\$repo"
}

# Kaiden Playwright tests read KAIDEN_BINARY (not PODMAN_DESKTOP_BINARY)
$isKaidenApp = ($appName -eq 'Kaiden') -or ($repo -eq 'kaiden')
$binaryForKaiden = $kaidenBinary
if (-not $binaryForKaiden -and $podmanDesktopBinary -and $isKaidenApp) {
$binaryForKaiden = $podmanDesktopBinary
}
if ($binaryForKaiden -and $isKaidenApp) {
Set-Item -Path "env:KAIDEN_BINARY" -Value "$binaryForKaiden"
$global:scriptEnvVars += "KAIDEN_BINARY"
$global:envVarDefs += "KAIDEN_BINARY=$binaryForKaiden"
Write-Host "Setting env. var.: KAIDEN_BINARY=$binaryForKaiden"
}
# Check if the input string is not null or empty
if (-not [string]::IsNullOrWhiteSpace($envVars)) {
# Split the input using comma separator
Expand Down
19 changes: 16 additions & 3 deletions pde2e-image/lib/windows/runner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ if (-not(Test-Path -Path $toolsInstallDir)) {

# Installation of application
$podmanDesktopBinary=""
$kaidenBinary=""
$isKaidenApp = ($appName -eq 'Kaiden') -or ($repo -eq 'kaiden')

if ([string]::IsNullOrWhiteSpace($pdPath))
{
Expand Down Expand Up @@ -179,9 +181,14 @@ if ([string]::IsNullOrWhiteSpace($pdPath))
write-host "$appName is installed on expected path: $pdLocalAppData"
if (Test-Path -Path $pdPath -PathType Leaf) {
write-host "$appName installation present..."
mv "$pdPath" "$pdLocalAppData\pd.exe"
write-host
$podmanDesktopBinary="$pdLocalAppData\pd.exe"
if ($isKaidenApp) {
$kaidenBinary = $pdPath
$podmanDesktopBinary = $pdPath
} else {
mv "$pdPath" "$pdLocalAppData\pd.exe"
write-host
$podmanDesktopBinary="$pdLocalAppData\pd.exe"
}
} else {
write-host "$appName binary is missing..."
ls $pdLocalAppData
Expand All @@ -191,11 +198,17 @@ if ([string]::IsNullOrWhiteSpace($pdPath))
Download-App('pd.exe')
write-host "Only a binary is available from url..."
$podmanDesktopBinary="$workingDir\pd.exe"
if ($isKaidenApp) {
$kaidenBinary = $podmanDesktopBinary
}
}
}
} else {
# set application binary path
$podmanDesktopBinary=$pdPath
if ($isKaidenApp) {
$kaidenBinary = $pdPath
}
}

# load variables
Expand Down