from parser import parse_products_from_dom
from pathlib import Path
import yaml

def test_dom_parse_basic():
    html = Path("tests/fixtures/category_sample.html").read_text(encoding="utf-8")
    cfg = yaml.safe_load(Path("config.yaml").read_text(encoding="utf-8"))
    lst = parse_products_from_dom(html, cfg)
    assert isinstance(lst, list)
