Files
context-extractor/automation/tests/conftest.py
T
ilia c91cd221d1
CI / Lint + tests (push) Has been cancelled
Initial Context Extractor: extension + Playwright/Camoufox package
Ship a shared markdown/prompt core used by a Brave/Chrome MV3 extension and a Python automation API, with pytest coverage, CI, and packaging smoke.
2026-07-15 14:52:22 -04:00

29 lines
580 B
Python

from __future__ import annotations
from pathlib import Path
import pytest
from playwright.sync_api import sync_playwright
FIXTURE = Path(__file__).parent / "fixtures" / "sample.html"
@pytest.fixture(scope="session")
def playwright_browser():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
yield browser
browser.close()
@pytest.fixture
def page(playwright_browser):
page = playwright_browser.new_page()
yield page
page.close()
@pytest.fixture
def fixture_url() -> str:
return FIXTURE.resolve().as_uri()