Skip to content

Commit

Permalink
Upload screenshot as artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jul 5, 2024
1 parent 12eb171 commit 3952c14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,11 @@ jobs:
echo "One or more tests failed!"
exit 1
fi
- name: Upload screenshot
uses: actions/upload-artifact@v4
if: always()
with:
name: screenshots-${{ matrix.vncserver }}
path: screenshots/*
if-no-files-found: error
4 changes: 2 additions & 2 deletions tests/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def test_desktop(browser):
# Screenshot the desktop element only
# May take a few seconds to load
page1.wait_for_timeout(5000)
# Use a nontemp folder so we can check it manually if necessary
screenshot = "screenshots/desktop.png"
# Use a non temporary folder so we can check it manually if necessary
screenshot = Path("screenshots") / "desktop.png"
page1.locator("canvas").screenshot(path=screenshot)

# Open clipboard, enter random text, close clipboard
Expand Down

0 comments on commit 3952c14

Please sign in to comment.