"""Shared fixtures for Sprint 3 tool tests."""

from __future__ import annotations

from pathlib import Path

import pytest

from godotiq.session import GodotIQSession


@pytest.fixture
def sample_root() -> Path:
    """Path to the sample project fixture."""
    return Path(__file__).resolve().parent.parent / "fixtures" / "sample_project"


@pytest.fixture
def session(sample_root: Path) -> GodotIQSession:
    """A loaded GodotIQSession for the sample project."""
    s = GodotIQSession(sample_root)
    s.load()
    return s


@pytest.fixture
def trace_flow_root() -> Path:
    """Path to the trace_flow test fixture project."""
    return Path(__file__).resolve().parent.parent / "fixtures" / "trace_flow"


@pytest.fixture
def trace_flow_session(trace_flow_root: Path) -> GodotIQSession:
    """A loaded GodotIQSession for the trace_flow test project."""
    s = GodotIQSession(trace_flow_root)
    s.load()
    return s


@pytest.fixture
def anim_root() -> Path:
    """Path to the animation test fixture project."""
    return Path(__file__).resolve().parent.parent / "fixtures" / "anim_project"


@pytest.fixture
def anim_session(anim_root: Path) -> GodotIQSession:
    """A loaded GodotIQSession for the animation test project."""
    s = GodotIQSession(anim_root)
    s.load()
    return s
