Skip to content

Commit 3952c14

Browse files
committed
Upload screenshot as artifact
1 parent 12eb171 commit 3952c14

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,11 @@ jobs:
101101
echo "One or more tests failed!"
102102
exit 1
103103
fi
104+
105+
- name: Upload screenshot
106+
uses: actions/upload-artifact@v4
107+
if: always()
108+
with:
109+
name: screenshots-${{ matrix.vncserver }}
110+
path: screenshots/*
111+
if-no-files-found: error

tests/test_browser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def test_desktop(browser):
5151
# Screenshot the desktop element only
5252
# May take a few seconds to load
5353
page1.wait_for_timeout(5000)
54-
# Use a nontemp folder so we can check it manually if necessary
55-
screenshot = "screenshots/desktop.png"
54+
# Use a non temporary folder so we can check it manually if necessary
55+
screenshot = Path("screenshots") / "desktop.png"
5656
page1.locator("canvas").screenshot(path=screenshot)
5757

5858
# Open clipboard, enter random text, close clipboard

0 commit comments

Comments
 (0)