Skip to content

Commit 96051f7

Browse files
test: Add HTML report generation and fix driver fixture setup in tests
1 parent ae69574 commit 96051f7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/python-selenium-ci-workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
113113
cd tests
114114
# Add HTML report generation
115-
python -m pytest -v test_home_page.py --html=report.html
115+
python -m pytest -v --html=report.html
116116
env:
117117
APP_URL: 'http://localhost:3000'
118118
PYTHONPATH: ${{ github.workspace }}

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def driver(request):
2525
options=chrome_options
2626
)
2727

28+
# If the test instance has 'set_driver_fixture', call it
29+
if hasattr(request.instance, "set_driver_fixture"):
30+
request.instance.set_driver_fixture(driver)
31+
2832
# Create screenshots directory if it doesn't exist
2933
os.makedirs("screenshots", exist_ok=True)
3034

0 commit comments

Comments
 (0)