Skip to content

Latest commit

 

History

History
41 lines (37 loc) · 4.38 KB

README.md

File metadata and controls

41 lines (37 loc) · 4.38 KB

Tests

Run from this folder with Node.js 18 or newer, after npm install in both ../server and ../agent. Each prints its checks and "N checks passed". They use stand-in websites (fake-web.js) on spare ports, so nothing else needs to be running.

node t1-durable.js      settings survive a file wiped by a power cut (backup copy)
node t2-find.js         the main computer answers the network question; old way still works
node t3-store.js        the printer list and the website's id survive a power cut
node t4-agent.js        printer computer: dead typed address, address change, wiped connection
node t5-supervisor.js   startup task + sign-in split, restart request, take-over
node t6-client.js       computer that only prints: prints straight away after the main computer moved
node t8-refresh.js      "Refresh address" button: the website lists its addresses afresh, restarts its answering, can be recognised from an old address
node t9-takeover.js     "Make this the only main computer": other main computers step down for a newer claim they have checked, never for an unconfirmed one
node t10-updates.js     automatic updates: only a signed version with a matching installer is installed, only when nothing is printing; one that doesn't start is undone; publish-update.js makes releases the computers accept
node t11-fixip.js       "keep this computer's address the same": reading Windows/macOS network settings, choosing a free address, refusing bad ones
node t12-remote.js      printing from anywhere: pairing, codes (only fingerprints kept), files locked in the browser and unlocked only at the office, limits, approval, switching off, the office being off
node t13-upload-retry.js  "Print this?" screen: a stuck upload is sent again, then shows an error
node t14-preview-files.js  the preview library is sent gzipped to browsers that can take it

node t15-page-view.js    closing the large page preview frees its image; reopening the same page works
node t16-other-printer.js  a job only moves to the same kind (inkjet/laser to each other if ticked), never because a computer dropped off
node t17-update-now.js  "Update PrintBridge now" shows a message window saying what it found, never a terminal
node t18-bad-messages.js  malformed network messages, printer lists and cookies from anyone on the network don't crash the main computer
node t19-dialogs.js       every pop-up on the print page tells screen readers it is a pop-up, and what it is called
node t20-printer-settings.js  both sides set by hand, printers marked out of order (and keeping that when they drop out of the list), printer problems (jam, no paper) shown, clearing a queue and removing a computer only on the main computer
node t21-bucket-expiry.js   the bucket is per device; held files, queued jobs and printouts awaiting approval are thrown away after an hour
node t22-both-sides.js      both sides: the printer's own default is set for each job, names quoted safely
node t23-rename-remote.js   a renamed printer: the drop page shows and accepts the new name, an old saved list still works, hidden and out-of-order printers are never picked
node t24-settings-survive.js  an update never resets printer settings: a list that cannot be opened is left alone, and choices are kept by computer and printer name
node t25-fixes.js           files named .pdf must be PDFs, a cap on waiting files, oversize printouts, help alerts expire, people lists follow a rename
node t26-it-contact.js      the IT contact (checked, main computer only, kept, copied to each computer) and a problem report with no file or account names
node t27-standby.js         the standby computer: chosen on the main computer only, a copy only it can read, taking over with the same id and connections, refusals and failures change nothing
node t28-turn-over.js       both sides by hand: the "turn the paper over" box is answered by the sender or at the printer's own computer only, once; the backs print on the same printer

These run on Linux/macOS. The Windows-only parts (the Task Scheduler task, the installer) are covered by manual checks on Windows and Mac. t4, t5 and t6 need a real network card: on a machine with only loopback (some virtual machines) the network question can't be sent and t4-t6 fail for that reason alone. t2, t8 and t9 also use the network question, so CI leaves all of t2 and t4-t9 out.