| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def read(path: str) -> str: | |
| return (ROOT / path).read_text(encoding='utf-8') | |
| def test_run_explorer_uses_compact_navigation_list(): | |
| js = read('web/static/runs.js') | |
| css = read('web/static/app.css') | |
| assert 'run-list-item' in js | |
| assert 'run-list-title' in js | |
| assert 'run-list-sub' in js | |
| assert 'runRelativeTime' in js | |
| assert 'run-list-status' in js | |
| assert 'run-list-item' in css | |
| assert 'run-card-meta' not in js | |
| assert 'run-card-footer' not in js | |
| def test_billing_cost_note_moved_out_of_new_build(): | |
| html = read('web/index.html') | |
| css = read('web/static/app.css') | |
| new_build = html.split('id="newBuildCard"', 1)[1].split('id="billingPanel"', 1)[0] | |
| billing = html.split('id="billingPanel"', 1)[1].split('</section>', 1)[0] | |
| assert 'Pi uses Hugging Face Inference Providers for Qwen' not in new_build | |
| assert 'Pi uses Hugging Face Inference Providers for Qwen' in billing | |
| assert 'A100/H200' in billing | |
| assert 'billing-cost-note' in html | |
| assert '.billing-cost-note' in css | |