Caveat / dev /browser-tests /README.md
umer-wasim's picture
Add dev/: training and export scripts, GPAI rule tests, browser tests, workspace map
28e3615 verified
|
Raw History Blame Contribute Delete
1.31 kB
# Caveat browser tests
`npm install` once (uses the installed Google Chrome; no browser download). Serve the Space first:
`cd ~/Documents/hf/Caveat-space && python3 -m http.server 8766`. Screenshots and browser profiles go to `out/`.
| Script | What it checks |
|---|---|
| `uitest.mjs` | jsdom: every tab, lesson, quiz, widget and glossary term; check flow with stubbed models |
| `net.mjs [url]` | Real model end to end; lists every host contacted (expect only the site + Hugging Face) |
| `lazy.mjs [url]` | Model downloads only on intent; cold Check still answers |
| `exam.mjs` | Final assessment fail/pass, certificate unlock and image (`out/certificate.png`), summary PDF |
| `consent.mjs` | Clarity only after Accept; withdraw deletes cookies; privacy-page control |
| `cta.mjs` / `unsure.mjs` | Expert-call box, email draft, stale-answer guard / "uncertain" label |
| `item3.mjs` / `mobile.mjs` | Results sections, key dates, phone layouts (390 and 360 px) |
| `live.mjs` | Live site with real models (dismiss consent first) |
| `web.mjs`, `tok.mjs` | int8 agreement under onnxruntime-web (the browser engine) |
| `og.mjs` + `og-image-template.html` | Re-render the social preview image |
Some scripts were written for one specific check and contain fixed paths or example texts; read before reusing.