| from pathlib import Path | |
| def test_product_ui_only_exposes_public_workflows(): | |
| text = Path('app.py').read_text(encoding='utf-8') | |
| assert 'Build from model card' in text | |
| assert 'Validate existing Space' in text | |
| assert 'Phase 1' not in text | |
| assert 'Phase 2' not in text | |
| assert 'Phase 3' not in text | |
| assert 'Phase 4' not in text | |
| assert 'Phase 5' not in text | |
| assert 'Phase 6' not in text | |
| assert 'Phase 7' not in text | |
| assert 'Phase 8' not in text | |
| assert 'Phase 9' not in text | |
| assert 'Phase 10' not in text | |
| assert 'Phase 11' not in text | |
| def test_universal_metadata_sanitizer_is_generic(): | |
| text = Path('src/worker_payload.py').read_text(encoding='utf-8') | |
| assert 'Generated model demo' in text | |
| assert 'model video avatar demo' not in text | |
| def test_product_ui_exposes_quick_link_buttons(): | |
| text = Path('app.py').read_text(encoding='utf-8') | |
| assert 'Open HF Job' in text | |
| assert 'Open target Space' in text | |
| assert 'Open Space settings' in text | |
| assert 'Open run artifacts' in text | |
| assert 'gr.Button("Open HF Job ↗", link=None, link_target="_blank", visible=False)' in text | |
| assert 'gr.Button("Open target Space ↗", link=None, link_target="_blank", visible=False)' in text | |
| assert 'gr.Button("Open Space settings ↗", link=None, link_target="_blank", visible=False)' in text | |
| assert 'gr.Button("Open run artifacts ↗", link=None, link_target="_blank", visible=False)' in text | |
| assert '_action_links_md' not in text | |
| def test_product_ui_uses_per_user_bucket_name(): | |
| text = Path('app.py').read_text(encoding='utf-8') | |
| assert 'Run Bucket name' in text | |
| assert 'user_bucket_source' in text | |
| assert 'settings.bucket_source' not in text | |
| def test_product_ui_has_bucket_onboarding_controls(): | |
| text = Path('app.py').read_text(encoding='utf-8') | |
| assert 'Run storage' in text | |
| assert 'Check run bucket' in text | |
| assert 'Create private run bucket' in text | |
| assert 'check_run_bucket_ui' in text | |
| assert 'create_run_bucket_ui' in text | |