28 lines
677 B
Python
28 lines
677 B
Python
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",
|
|
} |