File size: 1,327 Bytes
737d608 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | from pathlib import Path
def test_progress_bar_has_motion_feedback_css():
css = Path("web/static/app.css").read_text(encoding="utf-8")
for token in [
"v56 feedback motion",
"transition:width .75s cubic-bezier",
"progress-shimmer",
"progress-bump",
"value-bump",
"prefers-reduced-motion",
]:
assert token in css
def test_timeline_status_changes_are_detected_and_animated():
js = Path("web/static/progress.js").read_text(encoding="utf-8")
for token in [
"timelineRenderState",
"status-changed",
"status-flash",
"dot-pop",
"animateClass",
"timelineStepKey",
]:
assert token in js
def test_running_steps_pulse_and_status_badge_animates():
css = Path("web/static/app.css").read_text(encoding="utf-8")
js = Path("web/static/progress.js").read_text(encoding="utf-8")
assert "step-running-pulse" in css
assert "status-bump" in css
assert "animateStatusBadge" in js
assert "lastStatus" in js
def test_progress_render_uses_animated_progress_bar():
js = Path("web/static/progress.js").read_text(encoding="utf-8")
assert "animateProgressBar(progress" in js
assert "fill.classList.toggle('is-running'" in js
assert "progressMotionState.lastProgress" in js
|