Spaces:
Paused
Paused
| from pathlib import Path | |
| PROJECT_DIR = Path(__file__).resolve().parents[1] | |
| def assert_results_has_next(app_dir: Path): | |
| results = app_dir / 'Results.html' | |
| assert results.exists(), f"Missing Results.html in {app_dir.name}" | |
| text = results.read_text(encoding='utf-8') | |
| assert '{{ next_button }}' in text, ( | |
| f"Results.html in {app_dir.name} is missing '{{ next_button }}' — " | |
| "participants cannot proceed to the next app in a sequence" | |
| ) | |
| def test_classic_sequence_has_next_buttons(): | |
| # Apps in classic_baseline sequence expected to have a next button on Results | |
| for app in ['prisoner', 'trust_simple', 'public_goods_simple']: | |
| app_dir = PROJECT_DIR / app | |
| assert app_dir.exists(), f"App folder not found: {app}" | |
| assert_results_has_next(app_dir) | |