-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_test.py
More file actions
23 lines (18 loc) · 1.64 KB
/
sample_test.py
File metadata and controls
23 lines (18 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Sample test: @pytest.mark.docgen(...) mirrors examples/lesson_compile.docgen.yaml.
Generated by docs/demos/_seed-examples.sh — edit docs/demos/per-function/lesson-compile.docgen.yaml
and re-run the seed script.
The marker is read statically by `docgen demo-function --manifest <file>::<test>` via `ast`
(no import / no exec). Triple-quoted text below intentionally mentions
``pytest.mark.docgen`` to verify the AST-based loader is not fooled by docstrings
(regression guard for F7).
"""
import pytest
@pytest.mark.docgen(
assertions_to_surface=[],
demonstration={'actions': [{'kind': 'wait_for', 'say': 'Course Builder loads with an empty lesson form.', 'selector': '[data-testid="title"]', 'timeout_ms': 5000}, {'kind': 'click', 'say': 'We focus the topic input.', 'selector': '[data-testid="topic"]'}, {'delay_ms': 70, 'kind': 'type', 'say': 'And type a lesson topic — async iterators in this case.', 'selector': '[data-testid="topic"]', 'value': 'Async iterators'}, {'kind': 'click', 'say': 'Clicking compile runs the lesson generator.', 'selector': '[data-testid="compile"]'}, {'kind': 'wait_for_text', 'say': 'The compiled lesson appears in the result panel.', 'selector': '[data-testid="output"]', 'text': 'Compiled lesson', 'timeout_ms': 5000}, {'kind': 'wait', 'ms': 1500}], 'kind': 'playwright', 'url': 'file://__FIXTURE__/lesson-compile.html'},
identifier='documentation-generator/dogfood/lesson-compile:onCompile',
intent='Compile a lesson from a topic input — the canonical per-function dogfood demo.',
output_budget={'duration_seconds': 25, 'playback_speed_factor': 0.7, 'resolution': '1280x720'},
)
def test_lesson_compile():
pass