Skip to content

Commit

Permalink
Playwright tests (#152)
Browse files Browse the repository at this point in the history
* Playwright
  • Loading branch information
berk76 authored Jan 30, 2025
1 parent 791c800 commit 535e384
Show file tree
Hide file tree
Showing 11 changed files with 694 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Playwright Tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
playwright-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: "pip"

- name: Install Dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
playwright install
- name: Run Tests
run: |
source venv/bin/activate
cd svjis
python manage.py test articles.tests_playwright
- name: Archive screen shots
if: always()
uses: actions/upload-artifact@v4
with:
name: Screenshots
path: svjis/playwright_output/**/*.*
overwrite: true
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Unit Tests

on:
push:
Expand Down Expand Up @@ -57,4 +57,4 @@ jobs:
run: |
source venv/bin/activate
cd svjis
python manage.py test
python manage.py test articles.tests
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ svjis/static/
local_settings.py
local_requirements.txt
*.mo
playwright_output/
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
django-stubs==5.1.2
pre-commit==4.1.0
factory-boy==3.3.1
playwright==1.49.1
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added svjis/articles/tests_playwright/assets/uklid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 535e384

Please sign in to comment.