Tests

There are two layers. A small automated smoke test checks the photo layout logic. Everything else, especially pasting into OneNote, is a manual checklist that someone has to run in a real browser. The status column is honest: Not run means nobody has done it yet.

1. Automated smoke test

File: tests/smoke.js. It loads the real page scripts in a simulated browser (jsdom) and checks the photo component.

cd tests
npm i jsdom@24 --no-save
node smoke.js

The install creates tests/node_modules, which is git-ignored. The script prints PASS or FAIL per check and exits non-zero on any failure.

Check (on Vehicles and Hot Sheet)Status
Card mounts with photo statePass
Empty card shows only the add box in the side stackPass
Side stack holds as many photos as fit the text height; the rest flow to the bottom, add box lastPass
Photo list returns every photo, in orderPass
Remove deletes one photo and the layout recalculatesPass
Narrow screen puts everything in one rowPass
Copy output contains every photo, in one row above the tablePass

Last run: 2026-12-01, all passing. The simulated browser does no real layout (the text height is faked), has no canvas (image resizing and the file picker are not exercised), and has no real clipboard. Those gaps are covered by the manual checks below. Re-run the smoke test after any change to assets/photo.js, assets/form.js or assets/hot-sheet.js.

2. Manual checklist

Run in current Chrome and Safari, and again on Windows if OneNote there is used. Record the result and the date.

All pages

CheckStatus
Index links to all ten pages; each page has an "All pages" link backNot run
The "?" button opens How to use; the Specifications and Tests tabs workNot run
Light and dark mode follow the system setting; text is readable in bothNot run
Copy for OneNote shows "Copied"; pasting into OneNote gives bordered tables with a bold title per cardNot run
Add creates a numbered card; Remove renumbers; the first card has no RemoveNot run
Clear all and a page reload both empty the formNot run
Phone-width layout: no horizontal scroll, fields stackNot run
Draft banner shows on Vehicles, Locations, Social Media, Flock / Vigalent, Notes and Warrant Info, and not on Case Intro, Violations, Hot Sheet or Subject DetailsNot run

Photos (Hot Sheet, Vehicles, Locations, Subject Details)

CheckStatus
Every card shows an empty box with a visible blue + Add photo button. Click the box, paste a copied image: it appears and a new empty box followsNot run
After adding a photo, a new empty box with a + Add photo button appears directly after it (the empty box is always the last item); repeat three timesNot run
Select several files in the file picker: every file is addedNot run
After a paste, the empty box keeps focus so a second paste works immediatelyNot run
Drag one image, then several images at once, onto the empty boxNot run
+ Add photo opens the file picker and adds the chosen files; a large photo is shrunk (not stretched or distorted)Not run
Photos stack down the left; once as tall as the fields, extras flow along the bottom; the add box is lastNot run
Making a text area taller or shorter re-flows the photosNot run
The × removes only that photo and the rest re-flowNot run
Narrow window: photos sit in one row above the fieldsNot run
Pasting into OneNote on Mac: photos are kept, in one row above the tableNot run
Pasting into OneNote on Windows: photos are keptNot run

Page-specific

CheckStatus
Hot Sheet: starts with 2 persons, 1 vehicle, 1 location; Description pastes as one row (H, W, Hair, Eyes); Lat / Long pastes as one rowNot run
Hot Sheet: the Additional Pictures gallery adds, removes and pastes its imagesNot run
Hot Sheet: Print / PDF hides the buttons and the empty add boxes, and keeps cards from splitting across pagesNot run
Hot Sheet: the optional header badge shows when assets/badge.png exists, and nothing breaks when it doesn'tNot run
Case Intro: Event number sits directly below Case / report number, County follows itNot run
Subject Details: Add address creates Address 2, 3 and so on; Remove renumbers; each pastes as its own rowNot run

Privacy and deployment

CheckStatus
Browser developer tools, Network tab: the only external request is the Bootstrap stylesheet, and no request carries form dataNot run
Application tab: no cookies, local storage or session storage are writtenNot run
Console shows no errors, including no integrity (SRI) failure on the Bootstrap stylesheetNot run
Custom domain resolves over HTTPS; /, /hot-sheet.html and /assets/pages.js all loadNot run