Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(domain): support main domain
  • Loading branch information
Khabib73 committed Jun 10, 2026
commit a679f2ff9d3f35464cf90ca462eb5c86ed9f5830
62 changes: 62 additions & 0 deletions src/yatl/domains/domain.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
from dataclasses import dataclass
from typing import Any

from yatl.domains.http import ExpectSpec, ExtractSpec, HttpRequest


@dataclass
class TestStep:
"""
Step specification.

Attributes:
name: The name of the step.
description: The description of the step.
request: The request specification.
expect: The expectation specification.
extract: The extraction specification.
parametrize: The parametrization specification.
skip: Whether the step should be skipped.
"""

name: str | None
description: str | None
request: HttpRequest | None
expect: ExpectSpec | None
extract: ExtractSpec | None
parametrize: list[dict] | None
skip: bool


@dataclass
class TestSpecification:
"""
Test specification.

Attributes:
name: The name of the test.
base_url: The base URL for the test.
description: The description of the test.
steps: The steps of the test.
skip: Whether the test should be skipped.
"""

name: str | None
base_url: str
description: str | None
steps: list[TestStep]
skip: bool


@dataclass
class Context:
"""
Context for a test run.

Attributes:
variables: The variables for the test run.
extracted: The extracted variables for the test run.
"""

variables: dict[str, Any]
extracted: dict[str, Any]