"""Step definitions for ProgressBarManager coverage tests.""" from __future__ import annotations from behave import given, then, when from behave.runner import Context from cleveractors.core.progress import ProgressBarManager @given("the progress test context is initialized (prg)") def step_prg_init(context: Context) -> None: context.prg_result = None @given("the progress manager update is called with total 10 and remaining 8 (prg)") def step_prg_update(context: Context) -> None: ProgressBarManager.update( stage="writing", total=10, remaining=8, current=2, ) @when("the progress snapshot is retrieved (prg)") def step_prg_snapshot(context: Context) -> None: context.prg_result = ProgressBarManager.update( stage="writing", total=10, remaining=8, current=3, ) @then("the snapshot should have total 10 and remaining 8 (prg)") def step_prg_check(context: Context) -> None: assert context.prg_result is not None