Files
ragflow/test/playwright/helpers/flow_steps.py
Idriss Sbaaoui 860c4bd0bb Feat: UI testing automation with playwright (#12749)
### What problem does this PR solve?

This PR helps automate the testing of the ui interface using pytest
Playwright

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Other (please describe): test automation infrastructure

---------

Co-authored-by: Liu An <asiro@qq.com>
2026-03-02 13:04:08 +08:00

19 lines
465 B
Python

from __future__ import annotations
from typing import Callable, Sequence
import pytest
StepFn = Callable[..., None]
Steps = Sequence[tuple[str, StepFn]]
def flow_params(steps: Steps):
return [pytest.param(step_fn, id=step_id) for step_id, step_fn in steps]
def require(flow_state: dict, *keys: str) -> None:
missing = [key for key in keys if not flow_state.get(key)]
if missing:
pytest.skip(f"Missing prerequisite: {', '.join(missing)}")