38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_ai_labs_mobile_density_css_contracts() -> None:
|
|
css = (ROOT / "frontend" / "src" / "styles" / "app.css").read_text(encoding="utf-8")
|
|
|
|
assert ".workspace-grid-ai .workspace-panel" in css
|
|
assert ".lab-block label" in css
|
|
assert ".lab-block input," in css
|
|
assert ".lab-block select" in css
|
|
assert ".lab-block .primary-action" in css
|
|
assert ".result-summary-card" in css
|
|
assert ".model-card strong" in css
|
|
assert ".table-scroll td" in css
|
|
assert ".table-scroll th" in css
|
|
assert "overflow-wrap: anywhere;" in css
|
|
assert "minmax(7.5rem, 1fr)" in css
|
|
|
|
|
|
def test_detection_and_segmentation_keep_ai_lab_workflow_markup() -> None:
|
|
detection_lab = (ROOT / "frontend" / "src" / "components" / "detection" / "DetectionLab.tsx").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
segmentation_lab = (
|
|
ROOT / "frontend" / "src" / "components" / "segmentation" / "SegmentationLab.tsx"
|
|
).read_text(encoding="utf-8")
|
|
|
|
for source in (detection_lab, segmentation_lab):
|
|
assert 'className="model-list"' in source
|
|
assert "model-card" in source
|
|
assert 'className="lab-block"' in source
|
|
assert 'className="lab-form-grid"' in source
|
|
assert 'className="result-summary-card"' in source
|
|
assert 'className="table-scroll"' in source
|