Skip to content

Commit c3d56b9

Browse files
committed
Fix screenshots
1 parent 2d7e7f6 commit c3d56b9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
if: always()
3333
run: |
3434
. "./scripts/utils/Screenshot.ps1"
35+
# Create the directory if it does not exist
36+
if (!(Test-Path -Path ${{ github.workspace }}/tests/screenshots)) {
37+
New-Item -ItemType Directory -Path ${{ github.workspace }}/tests/screenshots
38+
}
3539
Take-Screenshot -OutputPath ${{ github.workspace }}/tests/screenshots/ExitScreenshot.png
3640
shell: pwsh
3741
- name: "Upload Screenshots"

Main.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
99
. "$scriptPath/scripts/utils/Minimize.ps1" # To get better screenshots we need to minimize the "Administrator" CMD window
1010
. "$scriptPath/scripts/utils/TimedMessage.ps1"
1111
. "$scriptPath/scripts/utils/Invoke.ps1" # Function to invoke a script with a timeout
12-
. "$scriptPath/utils/Screenshot.ps1"
12+
. "$scriptPath/scripts/utils/Screenshot.ps1"
1313

1414
# Start the main timer
1515
$mainTimer = [System.Diagnostics.Stopwatch]::StartNew()
@@ -120,7 +120,7 @@ foreach ($folder in $folders) {
120120
Write-Host "Created screenshot directory: $screenshotDir"
121121
}
122122

123-
Take-Screenshot -FileName "${screenshotDir}${app}_{{timestamp}}.png"
123+
Take-Screenshot -OutputPath "${screenshotDir}${app}_{{timestamp}}.png"
124124
}
125125

126126
Write-TimedMessage "Completed processing folder: $folder"

0 commit comments

Comments
 (0)