Working version of playwright
This commit is contained in:
28
tests/playwright_config.py
Normal file
28
tests/playwright_config.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
from playwright.sync_api import Playwright
|
||||
|
||||
# Playwright configuration
|
||||
BASE_URL = os.getenv("APP_URL", "http://localhost:5002")
|
||||
TIMEOUT = 30000
|
||||
EXPECT_TIMEOUT = 5000
|
||||
|
||||
def pytest_configure():
|
||||
"""Configure pytest for Playwright"""
|
||||
pass
|
||||
|
||||
# Browser configuration
|
||||
BROWSER_CONFIG = {
|
||||
#"headless": os.getenv("HEADLESS", "true").lower() == "true",
|
||||
"viewport": {"width": 1280, "height": 720},
|
||||
"ignore_https_errors": True,
|
||||
}
|
||||
|
||||
# Test configuration
|
||||
TEST_CONFIG = {
|
||||
"base_url": BASE_URL,
|
||||
"timeout": TIMEOUT,
|
||||
"expect_timeout": EXPECT_TIMEOUT,
|
||||
"screenshot": "only-on-failure",
|
||||
"video": "retain-on-failure",
|
||||
"trace": "retain-on-failure",
|
||||
}
|
||||
Reference in New Issue
Block a user