Skip to content
Georgian Bay Artists

Architecture

Test inventory

Every automated test behind this site, by name. The list is written by the same production build that deployed this page, so it can’t fall out of date.

After each deploy
Smoke
the live site
Security scan
ZAP
every push to main
End-to-end tests
161
26 specs
Unit tests
1012
93 files

Beyond the test suites

  • Dependency audit: npm audit on production dependencies, the first step of every CI run.
  • Static analysis: Gitleaks over every commit for credentials, and Semgrep over the source; both on every pull request.
  • Security scan: the OWASP ZAP baseline scan of the CI build, after the end-to-end tests pass, on every push to main.
  • Active scan, weekly: ZAP attacks a CI build, pages and JSON endpoints alike, with injection and scripting payloads.
  • Smoke test: after every production deploy, confirms the new commit is the one live and that key pages render with their security headers.
  • Health check: every hour, the database and four live pages; emails when that changes.
  • Load test: a k6 script, run by hand; the latest results are in Architecture §10.

End-to-end tests (161)

Playwright in Chromium, against a production build and a throwaway Postgres, on every pull request and every push to main. They include an axe accessibility scan of every public page type and a Content-Security-Policy check of every page. The image-upload test is opt-in and CI skips it, because it writes to the real image store. None of them runs against the live site: the suite refuses to start unless its database is local.

e2e/abuse.spec.ts8 tests
  • reflected input stays text: /?q=%22%3E%3Cimg%20src%3Dx%20onerror%3D%
  • reflected input stays text: /photographs?q=%22%3E%3Cimg%20src%3Dx%20
  • reflected input stays text: /?category=%22%3E%3Cimg%20src%3Dx%20oner
  • reflected input stays text: /products/%22%3E%3Cimg%20src%3Dx%20onerr
  • reflected input stays text: /home/p/%22%3E%3Cimg%20src%3Dx%20onerror
  • the public form APIs refuse an oversized body on the real server
  • an admin page without a session is never served, only redirected
  • security.txt tells a finder where to report, and stays current
e2e/accessibility.spec.ts17 tests
  • a11y: Paintings gallery (/)
  • a11y: Painting detail (/products/council-beach)
  • a11y: Photographs gallery (/photographs)
  • a11y: Photograph detail (/photographs/ravenna-canola-photo)
  • a11y: Locations map (/locations)
  • a11y: Making Of (/making-of)
  • a11y: Gift shop (/gift-shop)
  • a11y: Gift shop pack builder (/gift-shop/card-pack)
  • a11y: About (/about)
  • a11y: FAQ & Contact (/contact)
  • a11y: Commissions (/commissions)
  • a11y: For Artists (/for-artists)
  • a11y: Architecture (/architecture)
  • a11y: Test inventory (/architecture/tests)
  • a11y: Book a chat (/book)
  • a11y: mobile menu open
  • a11y: Buy Now order form open
e2e/admin.spec.ts4 tests
  • admin login rejects a wrong password
  • admin login accepts the correct password and reaches the product list
  • unauthenticated access to the admin redirects to login
  • a signed-out admin redirect carries no admin data
e2e/analytics.spec.ts3 tests
  • a public page view is recorded, by path only
  • the admin is never tracked
  • the dashboard can stop counting this browser, and count it again
e2e/api-validation.spec.ts5 tests
  • /api/buy rejects a request with missing required fields
  • /api/buy silently accepts honeypot submissions without sending
  • /api/buy refuses an order the catalogue can't back, before sending anything
  • /api/contact rejects a request with missing required fields
  • /api/contact rejects a single-word spam message
e2e/csp.spec.ts19 tests
  • every page is served with the policy and a fresh nonce
  • no CSP violations on /
  • no CSP violations on /products/council-beach
  • no CSP violations on /photographs
  • no CSP violations on /photographs/ravenna-canola-photo
  • no CSP violations on /locations
  • no CSP violations on /making-of
  • no CSP violations on /gift-shop
  • no CSP violations on /gift-shop/calendar
  • no CSP violations on /about
  • no CSP violations on /contact
  • no CSP violations on /commissions
  • no CSP violations on /for-artists
  • no CSP violations on /architecture
  • no CSP violations on /architecture/tests
  • no CSP violations on /book
  • no CSP violations on /admin/login
  • no CSP violations when a film is played
  • no CSP violations across the signed-in admin
e2e/featured-order.spec.ts2 tests
  • /: Featured shows the catalogue order, sold-out last
  • /photographs: Featured shows the catalogue order, sold-out last
e2e/forms.spec.ts17 tests
  • contact form renders all fields and submit button
  • contact form shows confirmation after successful submission
  • contact form shows error message on API failure
  • Buy Now button expands into an enquiry form
  • Buy Now Cancel button restores the Buy Now button
  • Buy Now form shows confirmation after successful submission
  • Buy Now form shows error message on API failure
  • booking form confirms after a successful submission
  • booking form offers other ways to reach James when sending fails
  • commission request sends what was typed, and confirms
  • commission request shows the server's refusal, with the email fallback
  • without JavaScript › /: every form posts
  • without JavaScript › /contact: every form posts
  • without JavaScript › /commissions: every form posts
  • without JavaScript › /book: every form posts
  • without JavaScript › /products/lora-bay: every form posts
  • without JavaScript › a contact form sent before JavaScript runs keeps its fields out of the URL
e2e/giftshop.spec.ts9 tests
  • gift shop landing shows three clickable pack cards, none coming soon
  • calendar builder: selecting 12 images fills the months and completes
  • calendar order submits the twelve chosen images, in order, as ids
  • card pack builder uses numbered slots and supports deselect
  • postcard pack builder requires 10 selections
  • gift shop thumbnails come from visible artwork and all load
  • the site's social preview image is served directly, from a work that is for sale
  • card-pack order submits its 6 chosen images, in order, as ids
  • postcard-pack order submits its 10 chosen images, in order, as ids
e2e/inspiration.spec.ts2 tests
  • a painting with an inspiration photo shows the switcher thumbnail + map
  • a painting without an inspiration photo shows no inspiration thumbnail
e2e/interactions.spec.ts8 tests
  • size selector updates the displayed price
  • Buy Now form shows the selected size and price
  • category filter shows only matching paintings
  • sort dropdown reorders the gallery
  • related paintings section shows other paintings in the same category
  • Buy Now form submits and shows confirmation
  • unknown URL shows custom 404 page with link back to gallery
  • a work's image opens full-screen and closes with the button or Escape
e2e/keyboard.spec.ts3 tests
  • the first Tab reaches a skip link, which jumps past the menu to the page
  • the phone menu says whether it is open, and Escape closes it
  • the image viewer is a dialog that keeps focus and gives it back
e2e/legacy-urls.spec.ts2 tests
  • an old Squarespace URL for a live work redirects permanently to its page
  • an old URL nothing matches is 410 Gone, not a redirect home
e2e/locations.spec.ts7 tests
  • locations page plots the works that have coordinates
  • works sharing a location share one pin, labelled with how many
  • the location list focuses the map and links to the work
  • Locations is reachable from the navigation
  • a place with a film links to that film on Making Of
  • ?work= opens that work's pin, and its popup links to the film
  • an unknown ?work= just shows the whole map
e2e/making-of.spec.ts10 tests
  • the making-of page lists every published film
  • no film and no full-size still is fetched before anyone presses play
  • the stills go through the image optimiser
  • clicking play mounts the player and asks for the film
  • every film links through to its finished print
  • a work's own page shows its film
  • the photograph a painting came from is shown on the painting, not vice versa
  • a work without a film shows no player
  • Making Of is reachable from the navigation
  • a film links to the spot on the map where its painting was made
e2e/newsletter.spec.ts2 tests
  • newsletter signup shows confirmation on success
  • newsletter signup shows an error message when the subscribe fails
e2e/photo-location.spec.ts3 tests
  • a photograph with GPS shows the location map
  • a panoramic photograph also shows the location map
  • a photograph without GPS shows no location map
e2e/photographs.spec.ts6 tests
  • photographs gallery shows all photographs
  • photographs category filter shows only matching photographs
  • photographs sort dropdown reorders the gallery
  • clicking a photograph card navigates to the detail page
  • back button on photograph detail returns to the gallery
  • Buy Now on photograph detail submits and shows confirmation
e2e/search-home.spec.ts3 tests
  • search box narrows the gallery and clear filters restores it
  • New Arrivals and On Sale filter options narrow the gallery
  • home page shows the collector testimonial
e2e/static-pages.spec.ts12 tests
  • For Artists is reachable from the header and shows the pitch
  • Architecture is in the footer and covers the system section by section
  • no word runs into the inline formatting before it
  • every kind of response carries the security headers
  • the old FAQ address lands on the FAQ, now part of FAQ & Contact
  • FAQ accordion opens and closes on click
  • the numbered Architecture sections start collapsed and open from their headings
  • the test inventory is linked from Architecture and lists every test by name
  • sitemap.xml lists static, gift-shop, and product pages
  • product detail page carries Product JSON-LD with an offer
  • In a Room switcher toggles the room mockup view
  • mobile hamburger menu opens and navigates
e2e/upload.spec.ts1 test
  • admin can upload a new painting and it appears in the list
e2e/visual.spec.ts10 tests
  • desktop › gallery looks as it did
  • desktop › painting looks as it did
  • desktop › photographs looks as it did
  • desktop › gift-shop looks as it did
  • desktop › about looks as it did
  • phone › gallery looks as it did
  • phone › painting looks as it did
  • phone › photographs looks as it did
  • phone › gift-shop looks as it did
  • phone › about looks as it did
e2e/zz-admin-instagram.spec.ts2 tests
  • approving schedules a post on a Mon/Wed/Fri, and unapproving puts it back
  • skipping takes a post out of the queue for good
e2e/zz-admin-manage.spec.ts4 tests
  • toggling a painting invisible removes it from the public site and gift-shop pool
  • editing a painting's price in the admin updates the public card
  • admin column sort orders by title; ⠿ returns to draggable manual order
  • drag-to-reorder moves a row and persists; restored after
e2e/zz-admin-passkey.spec.ts1 test
  • register a passkey, then sign in with it instead of the password
e2e/zz-rate-limit.spec.ts1 test
  • admin login locks out after 5 failed attempts

Unit and component tests (1012)

Vitest, with Testing Library for components. They run on every pull request and again inside Vercel’s production build, and a single failure stops the deploy, so every test below passed in the build that produced this page. Some are source scans: they read the code itself and fail on a hard-coded brand colour, a domain typed into a page, or image metadata in the bundle.

__tests__/admin-form-fields.test.ts7 tests
  • admin forms send every tick-box the server reads › createProductAction: no field is read that its form never sends
  • admin forms send every tick-box the server reads › updateProductAction: no field is read that its form never sends
  • admin forms send every tick-box the server reads › the Sold tick-box exists on both forms
  • admin forms send every tick-box the server reads › never tests a checkbox with !== "off"
  • a collector's photo is stored as theirs, not the artist's › re-encodes the file rather than editing it
  • a collector's photo is stored as theirs, not the artist's › does not stamp the artist's copyright on it
  • a collector's photo is stored as theirs, not the artist's › keeps it in its own folder, apart from the artist's work
__tests__/admin-password.test.ts3 tests
  • passwordMatches › accepts exactly the password
  • passwordMatches › refuses anything else, including a prefix or a different case
  • passwordMatches › never signs in with an empty password, even if ADMIN_PASSWORD is empty or unset
__tests__/analytics-exclusion.test.ts21 tests
  • analytics ingest exclusion › records an event from a browser that isn't excluded
  • analytics ingest exclusion › drops an event from an excluded browser
  • analytics ingest exclusion › looks the visitor up by cookie, never by city
  • analytics ingest exclusion › still records when the exclusion lookup fails; a real visit must not be lost
  • analytics ingest exclusion › drops excluded action events too, not just pageviews
  • analytics ingest exclusion › never reaches the lookup for admin paths
  • analytics ingest exclusion › returns 204 either way, so the page can't tell it was excluded
  • isNonProductionRequest › drops localhost:3000
  • isNonProductionRequest › drops localhost
  • isNonProductionRequest › drops 127.0.0.1:3000
  • isNonProductionRequest › drops [::1]:3000
  • isNonProductionRequest › drops app.localhost:3000
  • isNonProductionRequest › drops mymac.local
  • isNonProductionRequest › drops georgianartist.test
  • isNonProductionRequest › counts www.georgianartist.com
  • isNonProductionRequest › counts georgianartist.com
  • isNonProductionRequest › drops Vercel preview deployments whatever the hostname
  • isNonProductionRequest › counts an unrecognised host rather than losing a real visitor
  • isNonProductionRequest › counts a request with no Host header at all
  • analytics ingest host gate › records a production request
  • analytics ingest host gate › drops a localhost request before it reaches the database
__tests__/analytics.test.ts24 tests
  • parseUserAgent: device › detects mobile
  • parseUserAgent: device › detects tablet
  • parseUserAgent: device › defaults to desktop
  • parseUserAgent: browser › identifies browsers, preferring specific tokens
  • parseUserAgent: os › identifies operating systems
  • isBot › flags crawlers and tooling
  • isBot › passes real browsers
  • pctChange › formats a positive change with leading + and up = true
  • pctChange › formats a negative change with the minus sign and up = false
  • pctChange › treats no change as neither up nor down (null)
  • pctChange › labels a brand-new period 'new' when previous was 0 and current > 0
  • pctChange › returns n/a when both periods are 0 (no signal)
  • pctChange › rounds fractional percents to the nearest whole number
  • isoDay › returns YYYY-MM-DD in UTC
  • fillDailySeries › emits exactly `days` buckets even when input is empty
  • fillDailySeries › merges sparse server rows into the dense series
  • fillDailySeries › coerces string-y counts coming back from $queryRaw to numbers
  • fillDailySeries › handles a 90-day range without gaps
  • isVisitorId › accepts the UUIDs the site sets
  • isVisitorId › refuses anything else: missing, short, long, or with other characters
  • withViewsTrend › averages each day with the six before it, using the lead-in days, then drops them
  • withViewsTrend › doesn't dip toward zero at the start of a range that has a lead-in
  • withViewsTrend › averages only the days that exist at the very start of the data (all time)
  • withViewsTrend › keeps the raw daily values untouched
__tests__/AnalyticsTracker.test.tsx4 tests
  • AnalyticsTracker › records a pageview for a real page
  • AnalyticsTracker › does not record a pageview when the 404 page marked the path
  • AnalyticsTracker › still records the next real page after a 404
  • AnalyticsTracker › never records admin paths
__tests__/api-health.test.ts4 tests
  • /api/health › answers 200 when the catalogue can be read, cached briefly at the edge
  • /api/health › answers 503 when the database is down, and never caches it
  • /api/health › answers 503 for an empty catalogue too; a site with no works is down to a visitor
  • /api/health › leaks nothing: no counts, no error text
__tests__/archive-file.test.ts4 tests
  • writeArchive › gives two runs on the same day their own files
  • writeArchive › throws rather than overwrite, and leaves the first archive intact
  • writeArchive › names the file to the second, in a form every filesystem accepts
  • writeArchive › creates the directory if it doesn't exist yet
__tests__/artwork-references.test.ts2 tests
  • artwork references › no page or component names a catalogue image by path
  • artwork references › the gift shop packs carry no thumbnail field
__tests__/availability.test.ts23 tests
  • matchesAvailability › includes sold-out work in the main gallery
  • matchesAvailability › includes it in a category view too
  • matchesAvailability › keeps it out of the __new__ view
  • matchesAvailability › keeps it out of the __sale__ view
  • matchesAvailability › shows only sold-out work in the archive view
  • matchesAvailability › treats a missing flag as available
  • soldOutMatches › finds sold-out works a search would otherwise have surfaced
  • soldOutMatches › is case- and whitespace-insensitive
  • soldOutMatches › never offers available work as an archive suggestion
  • soldOutMatches › returns nothing for an empty query
  • availabilitySchema › marks sold-out work SoldOut
  • availabilitySchema › marks everything else InStock
  • availabilitySchema › only ever emits real schema.org URLs
  • excludesSoldOut › is true for __new__, a view about buying
  • excludesSoldOut › is true for __sale__, a view about buying
  • excludesSoldOut › is false for null
  • excludesSoldOut › is false for Bruce Peninsula
  • excludesSoldOut › is false for __soldout__
  • soldOutLast › puts every sold-out work after every work for sale
  • soldOutLast › keeps each group in the order the chosen sort left it
  • soldOutLast › never lets a sold-out work sit between two for sale
  • soldOutLast › treats a missing flag as for sale
  • soldOutLast › does not mutate what it was given
__tests__/backup-format.test.ts9 tests
  • fingerprint › ignores row order and key order
  • fingerprint › sees a changed value, a missing row and a date that moved
  • fingerprint › is a hex SHA-256 of the canonical rows, one per line
  • fingerprint › canonicalises nested objects and arrays too
  • fingerprint › treats a version 1 snapshot, which had no productSlugs, as having none
  • fingerprint › treats a version 2 snapshot, which had no commissionExamples, as having none
  • restoreSnapshot › inserts every table with one statement each, and skips empty ones
  • restoreSnapshot, every table › hands each table its own rows, as they round-trip through JSON
  • buildSnapshot › reads every table, in a stable order so two snapshots diff cleanly, and stamps the snapshot
__tests__/backup.test.ts5 tests
  • /api/cron/backup › writes to the private store when there is one, named by date and time
  • /api/cron/backup › falls back to an unguessable name in the public store without one
  • /api/cron/backup › prunes snapshots older than a week in both stores, and only those
  • /api/cron/backup › emails the owner when the snapshot can't be written
  • /api/cron/backup › refuses a request without the cron secret
__tests__/blob-cleanup.test.ts21 tests
  • releaseBlob › deletes a blob nothing else references
  • releaseBlob › keeps a blob another product shares; the epping/craigleith case
  • releaseBlob › ignores the product being deleted when counting
  • releaseBlob › keeps a blob a queued Instagram post still needs
  • releaseBlob › keeps a blob a making-of film still needs
  • releaseBlob › matches URLs ignoring any query string
  • releaseBlob › leaves legacy repo paths alone; they aren't blobs
  • releaseBlob › does nothing when there is no URL at all
  • releaseBlob › keeps the blob rather than throwing when the delete fails
  • countReferences › counts the same URL held in two places
  • countReferences › counts zero when only the excluded product holds it
  • isBlobUrl › https://x.public.blob.vercel-storage.com/inspiration/bruce-trail-abc123.jpg → true
  • isBlobUrl › /paintings/scenic-caves.jpg → false
  • isBlobUrl › https://www.georgianartist.com/paintings/x.jpg → false
  • isBlobUrl › → false
  • a collector's home photo › counts as a reference, so cleanup never deletes it out from under a page
  • a collector's home photo › is released once the only painting that shows it lets go
  • the catalogue's own images › are never deleted by an edit, even with nothing pointing at them
  • the catalogue's own images › count a product's mockup as a reference
  • commission examples › count as a reference, so a file an example shows is never deleted
  • commission examples › don't count a different file
__tests__/blob-prune.test.ts9 tests
  • which folders the pruner sweeps › covers every folder the admin uploads to
  • which folders the pruner sweeps › gives every admin upload folder a grace period, since the file is written before its row
  • which folders the pruner sweeps › reports a folder no area covers, and leaves the kept folders alone
  • what counts as a reference in the repository › finds complete Blob URLs, without their query string
  • what counts as a reference in the repository › does not count a repo path with the same name as a blob
  • findOrphans › keeps anything a row or the repo references
  • findOrphans › keeps an unreferenced upload younger than the grace period
  • findOrphans › only considers blobs under the area's own folder
  • findOrphans › compares URLs without their query string
__tests__/booking-reply-to.test.ts5 tests
  • booking emails › sends exactly the two the handoff specifies
  • booking emails › sets a Reply-To on the notification to James
  • booking emails › sets a Reply-To on the autoresponder to the submitter
  • booking emails › points the autoresponder's replies at a mailbox that is read
  • booking emails › answers the notification back to whoever submitted it
__tests__/booking.test.ts15 tests
  • formatBookingEmail › matches the body the handoff specifies, exactly
  • formatBookingEmail › keeps a line for every field even when the optional ones are blank
  • formatBookingEmail › preserves the order, so the eye lands in the same place every time
  • formatBookingEmail › does not mangle multi-line notes
  • checkBookingSubmission › passes a normal submission
  • checkBookingSubmission › catches a filled honeypot
  • checkBookingSubmission › catches a form completed impossibly fast
  • checkBookingSubmission › allows a submission right on the threshold
  • checkBookingSubmission › never rejects a real person over a missing signal › passes with no elapsedMs at all
  • checkBookingSubmission › never rejects a real person over a missing signal › passes with a non-numeric elapsedMs
  • checkBookingSubmission › never rejects a real person over a missing signal › passes with NaN
  • checkBookingSubmission › never rejects a real person over a missing signal › passes with a negative clock
  • checkBookingSubmission › never rejects a real person over a missing signal › passes with no honeypot field
  • checkBookingSubmission › never rejects a real person over a missing signal › passes with a whitespace-only honeypot
  • checkBookingSubmission › gives a human long enough to actually type
__tests__/BookingClient.test.tsx3 tests
  • BookingClient › sends a numeric elapsedMs measured from mount
  • BookingClient › sends the honeypot field so the server can read it
  • BookingClient › measures from mount, so an immediate submit is still under the bot threshold
__tests__/brand-colour.test.ts5 tests
  • brand colour › lib/brand.ts matches --color-brand in globals.css
  • brand colour › lib/brand.ts matches --color-brand-hover in globals.css
  • brand colour › lib/brand.ts matches --color-brand-tint in globals.css
  • brand colour › defines the tokens inside @theme, so Tailwind generates the utilities
  • no brand hex literals outside the definitions › every other file uses the token
__tests__/BuyNowButton.test.tsx6 tests
  • BuyNowButton › renders a 'Buy Now' button
  • BuyNowButton › clicking Buy Now reveals the enquiry form
  • BuyNowButton › form shows the product title, size and price
  • BuyNowButton › Cancel button hides the form and restores Buy Now
  • BuyNowButton › shows confirmation after submitting the enquiry form
  • BuyNowButton › posts the order as ids and choices, never the displayed title or price
__tests__/catalogue-cache.test.ts5 tests
  • reviveDates › revives ISO strings under keys ending in At, at any depth
  • reviveDates › leaves other strings alone, even ones that look like dates
  • cacheKey › differs between deployments, so each starts with an empty cache
  • cacheKey › is stable within a deployment and separate per query
  • cacheKey › uses Vercel's deployment id, then the commit, and works with neither
__tests__/catalogue-images.test.ts8 tests
  • catalogue paths › recognises the committed folders and nothing else
  • catalogue paths › keeps the same path under catalogue/ on Blob
  • catalogue paths › tells a migrated file from an admin upload
  • mockupFor › is the painting's mockup on Blob
  • mockupFor › is none without one, so the room view is composed in CSS (every admin upload)
  • absoluteImageUrl › leaves a Blob URL alone instead of gluing the site's origin onto it
  • absoluteImageUrl › puts a site path on the site's origin
  • the deploy guard for removed image files › catches a row still naming a committed file, relative or on the site's origin
__tests__/client-error-reporter.test.tsx8 tests
  • reportClientError › posts the error with this page's path and its kind
  • reportClientError › skips an error with a digest: the server reported it already
  • reportClientError › sends each error once, and at most five per page load
  • reportClientError › never throws, even if the network call does
  • ClientErrorReporter › reports an uncaught error from this site's own script
  • ClientErrorReporter › ignores another origin's script: an extension's or an embed's
  • ClientErrorReporter › reports a rejected promise only when its stack is this site's
  • ClientErrorReporter › stops listening when unmounted
__tests__/client-error.test.ts15 tests
  • parseClientError › keeps a well-formed report
  • parseClientError › drops the query string from the path, which can carry anything
  • parseClientError › refuses a path that isn't one of this site's
  • parseClientError › refuses an unknown kind, so a report can't pose as a server error
  • parseClientError › drops the noise every site sees
  • parseClientError › refuses an empty message, a body that isn't an object, and an oversized body
  • parseClientError › caps each field
  • parseClientError › defaults a missing name, and stores no stack when none was sent
  • parseClientError › becomes an Error carrying the browser's name, message and stack
  • POST /api/client-error › records a report under its page and kind, and always answers 204
  • POST /api/client-error › caps the emails these reports can send, in total, per day
  • POST /api/client-error › records nothing over the per-address limit, or when the limiter is down
  • POST /api/client-error › ignores bots and malformed reports without touching the limiter
  • POST /api/client-error › still answers 204 if recording throws
  • POST /api/client-error › keeps per-address and daily limits tight enough to bound the inbox
__tests__/client-ip.test.ts6 tests
  • rateLimitAddress › keeps an IPv4 address as is
  • rateLimitAddress › counts every address in one IPv6 /64 as one client
  • rateLimitAddress › expands :: before cutting, wherever it sits
  • rateLimitAddress › tells different /64s apart
  • rateLimitAddress › treats an IPv4-mapped address as the IPv4 address
  • rateLimitAddress › leaves anything it can't parse alone rather than merging it with others
__tests__/commissions.test.ts12 tests
  • captionOf › joins the parts that are there, subject's name first
  • captionOf › drops blanks and trims
  • altOf › describes the painting by its subject
  • altOf › falls back to the kind when there's no subject
  • kinds › knows an example is a pet or a portrait, nothing else
  • kinds › takes a request for a pet, a portrait or something else, and nothing inherited
  • parseExampleFields › reads and trims the fields, blanks as null
  • parseExampleFields › requires a kind it knows and a name
  • parseExampleFields › refuses a field over its limit, by name
  • parseExampleFields › ignores a field that isn't text
  • quoteEmailText › labels every field, and says when one was left out
  • the terms › are the owner's: half up front, the rest before shipping, four to six weeks
__tests__/ContactClient.test.tsx4 tests
  • ContactClient › renders the contact form
  • ContactClient › does not show the confirmation message before submission
  • ContactClient › shows a confirmation message after the form is submitted
  • ContactClient › hides the form after submission
__tests__/cron-auth.test.ts3 tests
  • isCronRequest › accepts exactly the bearer secret
  • isCronRequest › refuses a wrong, partial or missing header
  • isCronRequest › refuses everything when CRON_SECRET is unset, rather than letting anyone in
__tests__/csp.test.ts13 tests
  • buildCsp › allows scripts only by nonce, never inline or by host
  • buildCsp › keeps eval and blob workers to the admin, for the HEIC converter
  • buildCsp › blocks framing, plugins and base-tag hijacking, and reports violations
  • buildCsp › names every outside service the pages use
  • buildCsp › only upgrades insecure requests when asked (enforcing, over HTTPS)
  • buildCsp › is enforcing
  • buildCsp › allows the Vercel toolbar's frame, and nothing else from vercel.live
  • makeNonce › is fresh every time
  • parseReports › reads the report-uri shape, keeping only the blocked origin
  • parseReports › reads the Reporting API shape
  • parseReports › drops reports about other sites' pages
  • parseReports › caps how much one request can record
  • parseReports › ignores junk
__tests__/data.test.ts83 tests
  • products data › has no duplicate IDs
  • products data › every product has a valid sizeType
  • products data › every product has a non-empty title, image, and positive price
  • products data › every product ID is URL-safe (lowercase, hyphens only)
  • products data › every product image, mockup and inspiration photo is in the Blob catalogue
  • photographs data › has no duplicate IDs
  • photographs data › every photograph has a valid sizeType
  • photographs data › every photograph has a non-empty title, image, and positive price
  • photographs data › every photograph has positive naturalWidth and naturalHeight
  • photographs data › no ID collides with a product ID
  • blur placeholders › has one for every seeded catalogue image
  • blur placeholders › alpine-ski-fall stays small
  • blur placeholders › beaver-river-access stays small
  • blur placeholders › blue-mountain-sunrise-painting stays small
  • blur placeholders › blue-mountain-sunset-painting stays small
  • blur placeholders › blue-mountain-trail-painting stays small
  • blur placeholders › bridal-veil-falls-painting stays small
  • blur placeholders › bruce-trail-epping stays small
  • blur placeholders › bruce-trail stays small
  • blur placeholders › council-beach stays small
  • blur placeholders › delphi-point-painting stays small
  • blur placeholders › inglis-falls stays small
  • blur placeholders › local-farm-painting stays small
  • blur placeholders › lora-bay stays small
  • blur placeholders › manitoulin-island stays small
  • blur placeholders › near-killarney stays small
  • blur placeholders › northwinds-beach stays small
  • blur placeholders › peasemarsh stays small
  • blur placeholders › ravenna-canola-painting stays small
  • blur placeholders › scenic-caves stays small
  • blur placeholders › singhampton stays small
  • blur placeholders › the-grotto-painting stays small
  • blur placeholders › top-of-blue-mountain stays small
  • blur placeholders › Delphi_Point stays small
  • blur placeholders › Ravenna_Canola stays small
  • blur placeholders › alpine-ski-fall-photo stays small
  • blur placeholders › autumn-canopy stays small
  • blur placeholders › beaver-river-access-photo stays small
  • blur placeholders › blue-mountain-sunrise stays small
  • blur placeholders › blue-mountain-sunset-2 stays small
  • blur placeholders › blue-mountain-trail stays small
  • blur placeholders › bridal-veil-falls stays small
  • blur placeholders › bruce-trail-photo stays small
  • blur placeholders › council-beach-photo stays small
  • blur placeholders › inglis-falls-photo stays small
  • blur placeholders › local-farm stays small
  • blur placeholders › lora-bay-photo stays small
  • blur placeholders › manitoulin-island-photo stays small
  • blur placeholders › near-killarney-photo stays small
  • blur placeholders › northwinds-beach-twilight stays small
  • blur placeholders › scenic-caves-photo stays small
  • blur placeholders › singhampton-photo stays small
  • blur placeholders › snowy-owl-in-craigleith stays small
  • blur placeholders › the-grotto stays small
  • blur placeholders › top-of-blue-mountain-photo stays small
  • blur placeholders › carries no embedded metadata
  • blur placeholders › keeps the whole file small enough to ship in the bundle
  • making-of seed › has films
  • making-of seed › alpine-ski-fall names absolute Blob URLs for both video and poster
  • making-of seed › beaver-river-access names absolute Blob URLs for both video and poster
  • making-of seed › blue-mountain-sunrise names absolute Blob URLs for both video and poster
  • making-of seed › blue-mountain-sunset names absolute Blob URLs for both video and poster
  • making-of seed › blue-mountain-trail names absolute Blob URLs for both video and poster
  • making-of seed › bridal-veil-falls names absolute Blob URLs for both video and poster
  • making-of seed › bruce-trail-epping names absolute Blob URLs for both video and poster
  • making-of seed › bruce-trail-grey-highlands names absolute Blob URLs for both video and poster
  • making-of seed › council-beach names absolute Blob URLs for both video and poster
  • making-of seed › delphi-point names absolute Blob URLs for both video and poster
  • making-of seed › inglis-falls names absolute Blob URLs for both video and poster
  • making-of seed › local-farm-sunflowers names absolute Blob URLs for both video and poster
  • making-of seed › lora-bay names absolute Blob URLs for both video and poster
  • making-of seed › manitoulin-island names absolute Blob URLs for both video and poster
  • making-of seed › near-killarney names absolute Blob URLs for both video and poster
  • making-of seed › northwinds-beach names absolute Blob URLs for both video and poster
  • making-of seed › peasemarsh names absolute Blob URLs for both video and poster
  • making-of seed › ravenna-canola names absolute Blob URLs for both video and poster
  • making-of seed › scenic-caves names absolute Blob URLs for both video and poster
  • making-of seed › singhampton names absolute Blob URLs for both video and poster
  • making-of seed › the-grotto names absolute Blob URLs for both video and poster
  • making-of seed › top-of-blue-mountain names absolute Blob URLs for both video and poster
  • making-of seed › points every film at a product that exists in the seed
  • making-of seed › has no duplicate ids
  • making-of seed › gives every film a plausible duration
__tests__/db-guard.test.ts21 tests
  • databaseRefusal › refuses a remote database off Vercel when nothing names it
  • databaseRefusal › allows anything on Vercel, where each environment sets its own database
  • databaseRefusal › allows a local database, as in CI and E2E
  • databaseRefusal › allows no URL at all, since there is nothing to reach
  • databaseRefusal › allows exactly the named host, and only that one
  • databaseRefusal › allows production when it is named on purpose
  • databaseRefusal › does not let a host prefix or suffix pass as a match
  • databaseRefusal › fails closed on a URL it can't read
  • assertDatabaseAllowed › throws on a refusal and is silent otherwise
  • scripts › every script (scripts/, prisma/) that builds its own Prisma client checks the guard first
  • build scripts › every guarded script the build runs says so, or Vercel's build would be refused
  • preview deployments › refuse any database until production's host is named, so they can't guess
  • preview deployments › refuse production, pooled or not: the case Neon preview branching exists to prevent
  • preview deployments › allow their own Neon branch
  • preview deployments › leave production deployments alone
  • a pulled Vercel env file is not a deployment › a script refuses it: scripts never run on Vercel, so VERCEL is ignored
  • a pulled Vercel env file is not a deployment › a script still accepts the host named on purpose
  • a pulled Vercel env file is not a deployment › the build check refuses it without Vercel's CI=1
  • a pulled Vercel env file is not a deployment › the build check still applies the preview rule on Vercel
  • a pulled Vercel env file is not a deployment › the dev server refuses it: no deployment runs NODE_ENV=development
  • a pulled Vercel env file is not a deployment › without VERCEL, no context trusts a remote database
__tests__/e2e-db-guard.test.ts15 tests
  • databaseHost › reads the host out of a connection string
  • databaseHost › unwraps a bracketed IPv6 literal
  • databaseHost › returns null rather than throwing on nonsense
  • isThrowawayDatabase › accepts the local hosts CI and a laptop container use
  • isThrowawayDatabase › rejects production
  • isThrowawayDatabase › fails closed on anything it cannot vouch for
  • isThrowawayDatabase › is not fooled by a production host that merely mentions localhost
  • assertThrowawayDatabase › passes for a throwaway database
  • assertThrowawayDatabase › throws for production
  • assertThrowawayDatabase › throws when DATABASE_URL is unset
  • assertThrowawayDatabase › reads nothing from the environment
  • assertThrowawayDatabase › lets an explicit override through
  • assertThrowawayDatabase › does not treat any other override value as consent
  • the refusal message › names the host, the damage, and the way out
  • the refusal message › says so plainly when DATABASE_URL is simply missing
__tests__/e2e-imports.test.ts27 tests
  • E2E specs use the shared test fixture › finds the specs
  • E2E specs use the shared test fixture › abuse.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › accessibility.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › admin.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › analytics.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › api-validation.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › csp.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › featured-order.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › forms.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › giftshop.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › inspiration.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › interactions.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › keyboard.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › legacy-urls.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › locations.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › making-of.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › newsletter.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › photo-location.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › photographs.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › search-home.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › static-pages.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › upload.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › visual.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › zz-admin-instagram.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › zz-admin-manage.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › zz-admin-passkey.spec.ts imports from ./test, not @playwright/test
  • E2E specs use the shared test fixture › zz-rate-limit.spec.ts imports from ./test, not @playwright/test
__tests__/email-subject.test.ts3 tests
  • subjectLine › puts a name with line breaks on one line
  • subjectLine › drops every control character, including tabs, NUL and Unicode line separators
  • subjectLine › collapses runs of space and caps the length
__tests__/email-validation.test.ts6 tests
  • validateEmail › rejects missing or malformed addresses (no MX lookup needed)
  • validateEmail › rejects disposable domains
  • validateEmail › rejects Gmail dot-abuse (4+ dots in the local part)
  • validateEmail › accepts a well-formed address with a valid MX record
  • validateEmail › rejects when the domain has no MX records
  • validateEmail › rejects when the MX lookup throws (nonexistent domain)
__tests__/engagement-rank.test.ts5 tests
  • engagement ranking › weights an order above a Buy Now open above a view
  • engagement ranking › puts the most engaging work first, whatever its current position
  • engagement ranking › leaves works with too few viewers in their current order, after the ranked ones
  • engagement ranking › keeps sold-out work after everything for sale, however popular
  • engagement ranking › breaks a tie by the current order, so reruns are stable
__tests__/error-report.test.ts13 tests
  • errorDigest › uses Next's digest when there is one, so a React-wrapped error keeps its identity
  • errorDigest › hashes the message otherwise, and never returns the raw message
  • errorDigest › caps the stored message
  • errorStack › keeps the top of the stack, capped
  • errorStack › is null for a thrown value with no stack
  • reportError › stores the stack fragment with the row
  • reportError › emails when the row says this call claimed the alert
  • reportError › stays quiet on a repeat within the day
  • reportError › lets the caller veto the email, but still records the error
  • reportError › gives back a vetoed claim, so the kind can still alert once the cap allows
  • reportError › keeps the claim when the email goes out
  • reportError › asks the veto only when this call claimed the alert
  • reportError › never throws, even with the database down
__tests__/escape-html.test.ts3 tests
  • escapeHtml › turns markup into text
  • escapeHtml › escapes & first, so an existing entity is shown, not decoded
  • escapeHtml › leaves ordinary titles alone
__tests__/Footer.test.tsx5 tests
  • Footer › links to the Instagram account the cron posts to
  • Footer › shows the handle as text, not just as a URL
  • Footer › opens in a new tab without handing the target window a reference back
  • Footer › links the pages kept out of the header menu
  • Footer › credits James Portman from 2021, with the current year as the end
__tests__/form-email-abuse.test.ts28 tests
  • /api/buy › builds both emails from the catalogue, not from what was posted
  • /api/buy › repeats nothing the visitor typed in the confirmation
  • /api/buy › refuses an order for a work that isn't in the catalogue, and sends nothing
  • /api/buy › sends nothing, and says it failed, once the day's owner emails are used up
  • /api/buy › sends nothing at all once the IP is over its limit
  • /api/buy › still tells the owner when only the confirmation is held back
  • /api/contact › repeats nothing the visitor typed in the confirmation
  • /api/contact › sends nothing once the IP is over its limit
  • /api/book › repeats nothing the visitor typed in the autoresponder
  • /api/book › sends nothing once the IP is over its limit
  • oversized and malformed input › refuses a body too big to be a real enquiry, on every form
  • oversized and malformed input › refuses a field over its limit, with a reason a person can act on
  • oversized and malformed input › answers a non-text field with a 400, not a crash
  • oversized and malformed input › answers a body that isn't JSON with a 400, on every form
  • form outcomes › counts a message as sent only once the owner's email has gone
  • form outcomes › answers a caught bot exactly like a person, sends nothing, and counts it as spam
  • form outcomes › says so when Resend refuses the owner's email, and sends no confirmation
  • form outcomes › still succeeds when only the confirmation is refused: the owner has the message
  • /api/commissions › gives the owner everything typed, and the visitor fixed text only
  • /api/commissions › refuses a kind it doesn't offer, and sends nothing
  • /api/commissions › accepts a request for portrait
  • /api/commissions › accepts a request for other
  • /api/commissions › refuses a missing name, email or message, and a one-word message
  • /api/commissions › sends nothing once the IP is over its limit
  • /api/commissions › still tells the owner when only the confirmation is held back
  • /api/commissions › answers a caught bot like a person, sends nothing, and counts it as spam
  • /api/commissions › says so when Resend refuses the owner's email, and sends no confirmation
  • /api/commissions › refuses oversized, over-limit, non-text and non-JSON input
__tests__/form-input.test.ts11 tests
  • readFormBody › accepts a JSON object
  • readFormBody › refuses a body over the cap before parsing it
  • readFormBody › trusts a declared oversize length without reading the body
  • readFormBody › refuses what isn't a JSON object
  • readFormBody › accepts a body of exactly the cap, counted in bytes
  • readFormBody › tells the visitor to shorten an oversize body
  • checkFields › passes text within its limit, and absent or empty fields
  • checkFields › passes a null field, and text of exactly its limit
  • checkFields › calls an over-long note a note
  • checkFields › refuses text over its limit, naming the field and the limit
  • checkFields › refuses a field that isn't text rather than crashing on it
__tests__/form-owner-cap.test.ts4 tests
  • allowOwnerEmail › counts every form against one shared daily total
  • allowOwnerEmail › allows up to the limit, then refuses
  • allowOwnerEmail › alerts the owner once, on the first enquiry over the limit
  • allowOwnerEmail › lets the enquiry through when the database can't be reached
__tests__/form-rate-limit.test.ts7 tests
  • limitKey › never contains the raw IP or email address
  • limitKey › is stable, so repeat submissions count against the same row
  • limitKey › treats an address the same whatever its case or padding
  • limitKey › keeps each scope separate
  • LIMITS › lets a real customer through: at least two submissions, and a confirmation
  • mailbox › counts +tag variants of one address as one inbox
  • mailbox › ignores dots at Gmail only, and treats googlemail as gmail
__tests__/ga.test.ts2 tests
  • Google Analytics › loads only on the production deployment
  • Google Analytics › keeps analytics and turns advertising off
__tests__/GalleryGrid.test.tsx6 tests
  • GalleryGrid › puts sold-out work in its own section under a heading
  • GalleryGrid › renders the work for sale before the sold-out section
  • GalleryGrid › leaves the heading out when nothing is sold out
  • GalleryGrid › shows a plain grid in the Sold-out filter view
  • GalleryGrid image priority › marks the first two cards for sale, and nothing in the sold-out section below them
  • GalleryGrid image priority › marks the first sold-out cards when they are all there is
__tests__/gift-shop-sold-out.test.ts4 tests
  • gift shop pack builders › offer visible work that is still for sale
  • gift shop pack builders › never offer a sold-out work
  • getVisibleWorks › leaves out sold-out work when asked for work for sale (the gift shop thumbnails)
  • getVisibleWorks › still includes it by default (the share image)
__tests__/health.test.ts18 tests
  • transition › null → false gives null (first run, healthy: nothing to say)
  • transition › null → true gives failed (first run, broken: say so)
  • transition › false → true gives failed (healthy → broken)
  • transition › true → true gives null (still broken: already said)
  • transition › true → false gives recovered (broken → healthy)
  • transition › false → false gives null (still healthy)
  • transition › unknown → true gives failed (state unreadable and broken: report rather than risk silence)
  • transition › unknown → false gives null (state unreadable but healthy)
  • checkPage › passes a 200 that rendered the storefront
  • checkPage › fails an error status
  • checkPage › fails a 200 that didn't render the storefront
  • checkPage › fails when the request itself fails
  • checkDatabase › fails an empty catalogue, not only an unreachable one
  • /api/cron/health › refuses a request without the cron secret, and checks nothing
  • /api/cron/health › is quiet while everything passes
  • /api/cron/health › emails once when a page breaks, not on every run after
  • /api/cron/health › emails once more on recovery, marked as good news
  • /api/cron/health › still emails when the database is down and state can't be recorded
__tests__/home-photo.test.ts6 tests
  • prepareHomePhoto › removes GPS from a PNG
  • prepareHomePhoto › removes GPS from a JPEG
  • prepareHomePhoto › removes GPS from a WEBP
  • prepareHomePhoto › always writes a JPEG, whatever arrived
  • prepareHomePhoto › turns a sideways phone photo upright before dropping the flag that said so
  • prepareHomePhoto › refuses a file it cannot read, rather than publishing it as-is
__tests__/HomePhotoField.test.tsx4 tests
  • HomePhotoField › offers an upload and a credit line on a painting with no photo yet
  • HomePhotoField › has nothing to remove when there is no photo
  • HomePhotoField › shows the existing photo and credit when editing
  • HomePhotoField › can remove it in one tick, which hides the preview and the credit
__tests__/image-copyright.test.ts25 tests
  • embedCopyright › writes the notice into both EXIF and XMP
  • embedCopyright › keeps the rights holder and the credit line as separate claims
  • embedCopyright › never touches the pixels
  • embedCopyright › keeps APP0/JFIF first, as the format requires
  • embedCopyright › preserves segments it doesn't own, like the comment
  • embedCopyright › replaces existing EXIF rather than appending a second copy
  • embedCopyright › replaces existing XMP rather than appending a second copy
  • embedCopyright › preserves the ICC colour profile the browser canvas attaches
  • embedCopyright › puts our segments between APP0 and APP2, the order the format expects
  • embedCopyright › is idempotent; re-running produces a byte-identical file
  • embedCopyright › rolls the end year over on its own
  • embedCopyright › never costs someone their upload › returns an empty buffer unchanged instead of throwing
  • embedCopyright › never costs someone their upload › returns a PNG unchanged instead of throwing
  • embedCopyright › never costs someone their upload › returns plain text unchanged instead of throwing
  • embedCopyright › never costs someone their upload › returns a truncated JPEG unchanged instead of throwing
  • embedCopyright › never costs someone their upload › returns a JPEG with a bad segment length unchanged instead of throwing
  • embedCopyright › never costs someone their upload › returns a JPEG that never reaches its scan unchanged instead of throwing
  • stripMetadata › removes EXIF, XMP and ICC but keeps the pixels
  • stripMetadata › drops the comment segment too
  • stripMetadata › keeps the tables and headers needed to decode
  • stripMetadata › makes output independent of metadata; the whole point
  • stripMetadata › is idempotent
  • stripMetadata › returns an empty buffer unchanged
  • stripMetadata › returns a PNG unchanged
  • stripMetadata › returns a truncated JPEG unchanged
__tests__/instagram-caption-context.test.ts28 tests
  • buildProductContext price range › quotes landscape from one scale, not sale-floor to regular-ceiling
  • buildProductContext price range › quotes square from one scale, not sale-floor to regular-ceiling
  • buildProductContext price range › quotes panoramic from one scale, not sale-floor to regular-ceiling
  • buildProductContext price range › quotes ultrawide from one scale, not sale-floor to regular-ceiling
  • buildProductContext price range › quotes portrait from one scale, not sale-floor to regular-ceiling
  • buildProductContext price range › quotes diptych from one scale, not sale-floor to regular-ceiling
  • buildProductContext price range › never quotes a landscape regular price as the ceiling
  • buildProductContext price range › never quotes a square regular price as the ceiling
  • buildProductContext price range › never quotes a panoramic regular price as the ceiling
  • buildProductContext price range › never quotes a ultrawide regular price as the ceiling
  • buildProductContext price range › never quotes a portrait regular price as the ceiling
  • buildProductContext price range › never quotes a diptych regular price as the ceiling
  • buildProductContext price range › matches what the ultrawide detail page shows a buyer
  • buildProductContext price range › falls back to the product's own price when there is only one size
  • captionPriceIsStale › catches the exact bug that shipped; sale floor against regular ceiling
  • captionPriceIsStale › passes a caption that quotes the current range
  • captionPriceIsStale › reads a price range as the same claim, however Claude punctuated it (case 0)
  • captionPriceIsStale › reads a price range as the same claim, however Claude punctuated it (case 1)
  • captionPriceIsStale › reads a price range as the same claim, however Claude punctuated it (case 2)
  • captionPriceIsStale › reads a price range as the same claim, however Claude punctuated it (case 3)
  • captionPriceIsStale › leaves a caption that names no range alone
  • captionPriceIsStale › does not treat a single-size work's flat price as a stale range
  • captionPriceIsStale › flags the old range for every landscape work in the queue
  • captionPriceIsStale › flags the old range for every square work in the queue
  • captionPriceIsStale › flags the old range for every panoramic work in the queue
  • captionPriceIsStale › flags the old range for every ultrawide work in the queue
  • captionPriceIsStale › flags the old range for every portrait work in the queue
  • captionPriceIsStale › flags the old range for every diptych work in the queue
__tests__/instagram-publish-flow.test.ts32 tests
  • only production publishes › refuses on a preview deployment, touching nothing
  • only production publishes › refuses on a development deployment, touching nothing
  • only production publishes › publishes on production
  • only production publishes › publishes on a laptop (no VERCEL_ENV)
  • before the post is claimed › asks only whether this post's work is visible
  • before the post is claimed › skips the work check for a post tied to no work
  • before the post is claimed › emails from the cron by default when the work is hidden, saying it was not published
  • before the post is claimed › emails from the cron by default when the work is gone, saying it was not published
  • before the post is claimed › holds a repainted work: back to Pending Review, emailed from the cron only
  • before the post is claimed › records a first fingerprint for a post that had none, and only then
  • claiming and publishing › publishes nothing when another run claimed the post first
  • claiming and publishing › claims the post, records its container, publishes, then records the post: in that order
  • claiming and publishing › sends a reel as a reel, never through the image path
  • claiming and publishing › sends a video file, whatever its type as a reel, never through the image path
  • claiming and publishing › sends an ordinary image through the image path
  • when the container can't be made › returns the post to the queue and discards nothing it didn't make
  • when the container can't be made › emails from the cron that it will retry
  • when media_publish errors › requeues a container Meta reports EXPIRED, and says so
  • when media_publish errors › requeues a container Meta reports ERROR, and says so
  • when media_publish errors › records a post Meta says went live, even when its media id can't be found
  • when media_publish errors › leaves an undecided post in posting, and emails whoever called, since it may be live
  • recording a post that is live › retries the write twice, waiting 0.4 s then 1.2 s, and succeeds on the third
  • recording a post that is live › after three failed writes, says plainly that the post IS live
  • recording a post that is live › reports a live post with no media id as an empty id, not a made-up one
  • recording a post that is live › names the work in the alert when a post that errored turns out live but can't be recorded
  • recording a post that is live › leaves the media id out of that alert when there isn't one
  • reconcilePosting › requeues a claim with no container only once it is older than 15 minutes
  • reconcilePosting › looks up an old claim with no container by its caption
  • reconcilePosting › searches from the claim time for a published container
  • reconcilePosting › reports unknown, not posted, when the post is live but can't be recorded
  • reconcilePosting › reports unknown with the reason when asking Meta throws an Error
  • reconcilePosting › reports unknown with the reason when asking Meta throws anything else
__tests__/instagram-publish-hidden.test.ts6 tests
  • publishQueuedPost: a work that is no longer listed › holds the post for a hidden work, and publishes nothing
  • publishQueuedPost: a work that is no longer listed › holds the post for a work deleted from the catalogue
  • publishQueuedPost: a work that is no longer listed › emails from the cron, because nobody is watching when it runs
  • publishQueuedPost: a work that is no longer listed › does not email from Post now: the reason goes back to the screen instead
  • publishQueuedPost: posts the check must not block › lets a visible work through to the next check
  • publishQueuedPost: posts the check must not block › does not look up a work for a post that isn't tied to one
__tests__/instagram-publish-reconcile.test.ts10 tests
  • publishing › records the container before calling media_publish
  • publishing › records a post that went live although media_publish errored
  • publishing › publishes a ready container that never went out, with the same container
  • publishing › requeues when the container expired or failed, since nothing went live
  • publishing › leaves the row in posting, container kept, when Meta can't say
  • reconcilePosting, for a row a previous run left behind › requeues a claim that never got a container once it is stale
  • reconcilePosting, for a row a previous run left behind › leaves a fresh claim alone; it may still be publishing
  • reconcilePosting, for a row a previous run left behind › finds a pre-container row on the account by its caption
  • reconcilePosting, for a row a previous run left behind › leaves a pre-container row for a person when it isn't on the account
  • reconcilePosting, for a row a previous run left behind › waits on a container Meta is still processing
__tests__/json-ld.test.ts4 tests
  • safeJsonLd › neutralizes a </script> breakout in string values
  • safeJsonLd › round-trips identically through JSON.parse
  • safeJsonLd › escapes U+2028/U+2029 line separators
  • safeJsonLd › leaves ordinary product data unchanged
__tests__/legacy-urls.test.ts29 tests
  • resolveLegacySlug › matches lora-bay by id
  • resolveLegacySlug › matches northwinds-beach by id
  • resolveLegacySlug › matches manitoulin-island by id
  • resolveLegacySlug › matches blue-mountain-sunset by title, where the id alone would not
  • resolveLegacySlug › matches alpine-ski-club-fall by title, where the id alone would not
  • resolveLegacySlug › matches beaver-river-access-point-2 by title, where the id alone would not
  • resolveLegacySlug › matches bruce-trail-in-the-grey-highlands by title, where the id alone would not
  • resolveLegacySlug › follows a rename only a human could know about
  • resolveLegacySlug › refuses to guess › lone-tree keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › lake-huron-shore keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › after-the-storm keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › blue-mountain-in-distance keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › nottawasaga-winter keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › ravenna-sunset keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › tobermory keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › algonquin-park-meadow keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › milk-dip-cup-92wf6-gc7e4-ctxtn-mk6 keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › country-feast-set-3nybt-gnw4d-4jmt8 keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › refuses to guess › aluminum-beaver-river-summary keeps its 404 rather than landing on the wrong painting
  • resolveLegacySlug › never redirects to a hidden work; that would just be a slower 404
  • resolveLegacySlug › sends photographs to /photographs and paintings to /products
  • resolveLegacySlug › handles junk input ()
  • resolveLegacySlug › handles junk input (---)
  • resolveLegacySlug › handles junk input (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
  • resolveLegacySlug › resolves nothing against an empty catalogue rather than throwing
  • legacyOutcome › redirects a visible work
  • legacyOutcome › is 404, not 410, for a work that is only hidden, since it may come back
  • legacyOutcome › is 410 Gone when nothing in the catalogue matches
  • legacyOutcome › holds the same match floor for hidden works, so a near miss is still gone
__tests__/line-chart.test.tsx2 tests
  • LineChart › draws and labels the 7-day average when the data has it
  • LineChart › draws no average line without trend data
__tests__/MakingOfVideo.test.tsx12 tests
  • MakingOfVideo › puts no <video> on the page until the film is asked for
  • MakingOfVideo › serves the still through the image optimiser, not straight off Blob
  • MakingOfVideo › reserves the film's real shape so the page doesn't jump
  • MakingOfVideo › falls back to 4:3 for a film nobody has measured
  • MakingOfVideo › mounts the player, already playing, once the facade is clicked
  • MakingOfVideo › routes the player's own poster through the optimiser
  • MakingOfVideo › still links to the file, so it does something with JavaScript off
  • MakingOfVideo › leaves modified clicks to the browser
  • MakingOfVideo › shows the heading, runtime and description
  • MakingOfVideo › formats a runtime over a minute as m:ss
  • MakingOfVideo › omits the heading block when heading is null
  • MakingOfVideo › survives a film with no poster, description or runtime
__tests__/media-fingerprint.test.ts12 tests
  • mediaHasChanged › blocks when the media genuinely changed
  • mediaHasChanged › allows when it is byte-identical
  • mediaHasChanged › allows when there is no baseline; a row queued before fingerprints existed
  • mediaHasChanged › allows when the current value cannot be read; a HEAD failure must not block a post
  • mediaHasChanged › allows when neither is known
  • mediaHasChanged › notices a size change even when the etag is missing
  • fetchMediaFingerprint › combines etag and length
  • fetchMediaFingerprint › works from length alone when no etag is served
  • fetchMediaFingerprint › returns null when the server offers neither header
  • fetchMediaFingerprint › returns null on a non-OK response rather than throwing
  • fetchMediaFingerprint › returns null when the request throws; never propagates into the cron
  • fetchMediaFingerprint › uses HEAD, so it never downloads a 15MB reel to check it
__tests__/media-route.test.ts23 tests
  • /media › serves a visible work's upload, cacheable, with what the repaint check reads
  • /media › serves a visible work's its image to the public
  • /media › serves a visible work's its inspiration photo to the public
  • /media › serves a visible work's a collector's photo to the public
  • /media › decides without reading the session when a visible work uses the file
  • /media › is a 404 to the public for a hidden work's image, without reading the store
  • /media › is a 404 to the public for a hidden work's collector photo, without reading the store
  • /media › is a 404 to the public for a file no work uses, without reading the store
  • /media › serves a hidden work's upload to the signed-in admin, never cached
  • /media › never reaches anything outside the upload folders, even for the admin: backups/catalog-2026-10-01T05-00.json
  • /media › never reaches anything outside the upload folders, even for the admin: paintings/../backups/catalog.json
  • /media › never reaches anything outside the upload folders, even for the admin: homes/sub/dir.jpg
  • /media › never reaches anything outside the upload folders, even for the admin: other/file.jpg
  • /media › is a 404 when there is no private store
  • /media › is a 404 when the file is missing from the store
  • /media › is a 404 when the file is answered with an error
  • /media › labels a file the store has no type for as plain bytes
  • /media › serves a visible commission example to the public, cacheable
  • /media › is a 404 to the public for a hidden commission example
  • /media › is a 404 to the public for a commission file no example uses
  • /media › serves a hidden commission example to the signed-in admin, never cached
  • /media › asks about commission examples only for files in the commissions folder
  • /media › is never prerendered: every request asks the database
__tests__/mutation-scripts.test.ts21 tests
  • MODULES › names files that exist, each with a floor between 0 and 100
  • scopeFor › takes a module the PR changes
  • scopeFor › takes a module whose related test the PR changes, even one reaching it through a route
  • scopeFor › takes nothing for a PR that touches no module or its tests
  • scopeFor › only looks up related tests when the PR changes a test
  • scopeFor › takes every module when stryker.config.mjs changes
  • scopeFor › takes every module when scripts/mutation-scope.mjs changes
  • scopeFor › takes every module when scripts/mutation-check.mjs changes
  • scopeFor › takes every module when scripts/mutation-run.mjs changes
  • scopeFor › takes every module when .github/workflows/mutation.yml changes
  • scopeFor › takes every module when vitest.config.mts changes
  • scopeFor › takes every module when vitest.setup.ts changes
  • scopeFor › takes every module when package-lock.json changes
  • checkScores › passes at the floor, counting a timeout as killed and an untested mutant as missed
  • checkScores › fails a module below its floor, even when another is well above
  • checkScores › ignores mutants that were never scored (ignored, pending)
  • checkScores › fails a run where mutants could not run at all
  • checkScores › suggests raising a floor the module has clearly outgrown
  • mergeReports › keeps every module's files, so no module's score is dropped from the check
  • mergeReports › refuses to merge nothing
  • slug › gives every module a distinct, safe report name
__tests__/name-validation.test.ts5 tests
  • validateName › rejects empty / too-short / non-string names
  • validateName › accepts legitimate single-word names (mononyms / first-name-only)
  • validateName › accepts normal full names with spaces
  • validateName › rejects long single-word gibberish (no space, >20 chars)
  • validateName › allows a long name as long as it contains a space
__tests__/Navigation.test.tsx4 tests
  • Navigation › holds the storefront's eight links, Contact last, then For Artists apart
  • Navigation › leaves Architecture to the footer
  • Navigation › renders the site name as a link to /
  • Navigation › highlights the active route
__tests__/Newsletter.test.tsx4 tests
  • Newsletter › renders the signup form
  • Newsletter › does not show the confirmation before submission
  • Newsletter › shows a confirmation after the form is submitted
  • Newsletter › posts the email to the Kit form endpoint
__tests__/next-config-images.test.ts2 tests
  • image optimizer sources › are this site's own Blob store only, named exactly
  • image optimizer sources › have no wildcard, which would serve any Vercel customer's images on this site's quota
__tests__/og-image.test.ts11 tests
  • site Open Graph image › answers with the image itself, not a redirect to it
  • site Open Graph image › names the work it rendered, so staleness stays checkable end to end
  • site Open Graph image › serves exactly the dimensions the meta tag advertises
  • site Open Graph image › letterboxes rather than cropping, so the whole work survives
  • site Open Graph image › gives up on a stalled source instead of running to the platform limit
  • site Open Graph image › declares those same dimensions in the document head
  • site Open Graph image › still answers at the declared size when the source cannot be read
  • site Open Graph image › caches the degraded card briefly, so a transient failure is not sticky
  • site Open Graph image › says so in the logs when it falls back
  • site Open Graph image › redirects only when sharp itself cannot encode anything
  • site Open Graph image › serves nothing rather than something broken when the catalogue is empty
__tests__/order.test.ts34 tests
  • resolveOrder: prints › takes the title and price from the catalogue and the price table
  • resolveOrder: prints › ignores a title and price smuggled in beside the ids
  • resolveOrder: prints › marks a frame quote the way the page does
  • resolveOrder: prints › refuses a size this work isn't offered in
  • resolveOrder: prints › refuses lone-tree (sold out, hidden or unknown)
  • resolveOrder: prints › refuses hidden-one (sold out, hidden or unknown)
  • resolveOrder: prints › refuses no-such-work (sold out, hidden or unknown)
  • resolveOrder: single cards › prices a greeting card from the fixed table
  • resolveOrder: single cards › prices a postcard card from the fixed table
  • resolveOrder: single cards › refuses an unknown card type and a sold-out work
  • resolveOrder: gift packs › builds the month list from catalogue titles, in the order chosen
  • resolveOrder: gift packs › refuses the wrong number of images, repeats, and unavailable ones
  • resolveOrder: gift packs › refuses an unknown pack
  • resolveOrder: malformed input › refuses null
  • resolveOrder: malformed input › refuses "print"
  • resolveOrder: malformed input › refuses {}
  • resolveOrder: malformed input › refuses {"kind":"print"}
  • resolveOrder: malformed input › refuses {"kind":"refund"}
  • resolveOrder: the reason given › no order: Missing order
  • resolveOrder: the reason given › a string: Missing order
  • resolveOrder: the reason given › an unknown kind: Missing order
  • resolveOrder: the reason given › a print with no work: Missing order
  • resolveOrder: the reason given › a print with an empty id: Missing order
  • resolveOrder: the reason given › a print with no size: Missing order
  • resolveOrder: the reason given › an id over 200 characters: Missing order
  • resolveOrder: the reason given › a card with no work: Missing order
  • resolveOrder: the reason given › a pack whose images aren't a list: Missing order
  • resolveOrder: the reason given › a pack with a non-text image id: Missing order
  • resolveOrder: the reason given › accepts an id of exactly 200 characters
  • resolveOrder: the reason given › names an unavailable work, an unoffered size and an unknown pack
  • resolveOrder: the reason given › refuses a work whose size type has no price table, without throwing
  • resolveOrder: the reason given › asks for the right number of different images before looking any up
  • resolveOrder: the reason given › lists a calendar by month, all twelve, in the order chosen
  • resolveOrder: the reason given › numbers any other pack's images from 1, and names the pack
__tests__/passkey-actions.test.ts30 tests
  • sign-in options › issues a challenge for this site, requiring the person, and keeps it in the session
  • sign-in options › prefers the forwarded host, which is the address the browser used
  • sign-in options › refuses an address that isn't this site, without issuing anything
  • sign-in options › refuses while locked out (30s left), saying for how long
  • sign-in options › refuses while locked out (61s left), saying for how long
  • sign-in options › refuses while locked out (0s left), saying for how long
  • sign-in › signs in on a verified answer to this session's challenge, and records the new counter
  • sign-in › passes no transports for a passkey stored without them
  • sign-in › uses the challenge once: it is cleared before anything else is checked
  • sign-in › refuses when no challenge was issued, without asking the library
  • sign-in › refuses when the challenge is stale, without asking the library
  • sign-in › refuses, and counts a failure, for a passkey this admin never registered
  • sign-in › refuses, and counts a failure, when the signature doesn't verify
  • sign-in › refuses, and counts a failure, when the library throws
  • sign-in › treats a malformed answer, with no id, as an unregistered passkey rather than crashing
  • sign-in › refuses an address that isn't this site
  • registering a passkey › needs a signed-in admin for every step
  • registering a passkey › asks for a discoverable passkey that requires the person, excluding ones already registered
  • registering a passkey › excludes a stored passkey without transports as just its id
  • registering a passkey › stores a verified passkey, with a trimmed label
  • registering a passkey › names an unlabelled passkey, cuts a long label, and stores no empty transports
  • registering a passkey › stores transports ["usb","nfc"] as "usb,nfc"
  • registering a passkey › stores transports undefined as null
  • registering a passkey › stores nothing when the answer isn't verified
  • registering a passkey › stores nothing when the answer comes back without its details
  • registering a passkey › stores nothing when the answer makes the library throw
  • registering a passkey › refuses a stale or missing challenge, and uses it once
  • registering a passkey › refuses an address that isn't this site for options
  • registering a passkey › refuses an address that isn't this site to register
  • registering a passkey › removes a passkey, and doesn't fail if it was already gone
__tests__/passkey.test.ts14 tests
  • relyingParty › uses the registrable domain, so a passkey made on www. works on the bare domain too
  • relyingParty › works on localhost, with its port, for local runs and CI
  • relyingParty › matches the host whatever its case or surrounding space, keeping the port in the origin
  • relyingParty › refuses any other host rather than binding a passkey to it
  • relyingParty › refuses other subdomains, which a dangling DNS record could hand to someone else
  • ADMIN_USER_ID › never changes: every registered passkey is stored against it
  • passwordLoginAllowed › allows the password only until a passkey exists
  • passwordLoginAllowed › lets the break-glass switch it back on, and only the exact value does
  • challengeIsFresh › accepts a challenge inside its five minutes, and nothing else
  • loginAction › signs in with the password while no passkey exists
  • loginAction › refuses even the right password once a passkey exists
  • loginAction › gives the same answer for a wrong password, so it reveals nothing
  • loginAction › accepts the password again under the break-glass
  • loginAction › fails closed when it can't tell whether a passkey exists
__tests__/private-blob.test.ts10 tests
  • uploadMedia › uses the private store, and returns a /media path, once it exists
  • uploadMedia › falls back to the public store, as before, without one
  • mediaPathname › /media/homes/lora-bay-abc.jpg → homes/lora-bay-abc.jpg
  • mediaPathname › /media/inspiration/x_1.jpg?v=2 → inspiration/x_1.jpg
  • mediaPathname › /media/backups/catalog.json → null
  • mediaPathname › /media/paintings/../backups/x.json → null
  • mediaPathname › /media/paintings/a/b.jpg → null
  • mediaPathname › /paintings/x.jpg → null
  • mediaPathname › https://x.public.blob.vercel-storage.com/homes/x.jpg → null
  • deleteMedia › deletes by pathname with the private token, and nothing outside the upload folders
__tests__/private-move.test.ts6 tests
  • movablePathname › takes upload-folder files from a public store
  • movablePathname › leaves the catalogue, other folders, site paths and nothing alone
  • movablePathname › refuses a pathname /media would not serve
  • planMoves › moves only the home photo of a published work
  • planMoves › moves every upload of a hidden work
  • planMoves › skips what is already private or not an upload
__tests__/product-slug.test.ts23 tests
  • productPath › serves a never-renamed work at its id, and a renamed one at its slug
  • slugProblem › accepts lora-bay
  • slugProblem › accepts a
  • slugProblem › accepts blue-mountain-sunset-2
  • slugProblem › refuses ""
  • slugProblem › refuses "Lora-Bay"
  • slugProblem › refuses "lora bay"
  • slugProblem › refuses "lora--bay"
  • slugProblem › refuses "-lora"
  • slugProblem › refuses "lora-"
  • slugProblem › refuses "lora/bay"
  • slugProblem › refuses "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  • slugProblem › accepts a slug of exactly 80 characters, and says why it refuses
  • findWorkBySlug › finds a renamed work by its new slug
  • findWorkBySlug › finds a never-renamed work by its id
  • findWorkBySlug › redirects a retired slug to the work's current page
  • findWorkBySlug › does not serve a renamed work at its id any more; that is the retired slug's job
  • findWorkBySlug › is a 404 for a retired slug whose work is hidden, not a redirect to a page that 404s
  • findWorkBySlug › keeps paintings and photographs apart for current slugs
  • slugTakenBy › refuses another work's current slug, or its id when never renamed
  • slugTakenBy › refuses another work's retired slug, which would take over its old links
  • slugTakenBy › lets a work take back one of its own retired slugs
  • slugTakenBy › allows a slug nothing uses
__tests__/product-utils.test.ts15 tests
  • deriveSizeType › classifies by aspect ratio
  • deriveSizeType › uses correct boundaries
  • deriveSizeType › falls back to the first available type when the guess isn't offered
  • standardPrice › returns the lowest sale price for a size type
  • standardPrice › returns a positive price for every known size type
  • standardPrice › returns 0 for an unknown size type
  • standardPrice of a name Object.prototype holds › is 0, not a TypeError
  • slugify › produces URL-safe, lowercase, hyphenated ids
  • slugify › never returns an empty slug
  • slugify › never ends in a hyphen when the 60-character cut lands after a word
  • slugify › always yields a value matching the product ID pattern
  • sizeLabelWithCm › rounds inches to whole centimetres
  • sizeLabelWithCm › adds the centimetres in the label's height × width order
  • sizeLabelWithCm › keeps an existing note inside the same brackets
  • sizeLabelWithCm › matches every label's inches for every size sold
__tests__/ProductCard.test.tsx10 tests
  • ProductCard › renders the product title
  • ProductCard › renders the starting price
  • ProductCard › links to /products/{id} by default
  • ProductCard › links to a custom basePath when provided
  • ProductCard › renders the product image with the correct alt text
  • ProductCard: sold out › shows a price for work that is still for sale
  • ProductCard: sold out › replaces the price with Sold out
  • ProductCard: sold out › drops the New and Sale badges rather than stacking them
  • ProductCard: sold out › still links through to the work's page
  • ProductCard image priority › loads lazily unless asked, and eagerly for a card at the top of the page
__tests__/ProductDetailClient-home-photo.test.tsx6 tests
  • a collector's photo, enlarged › keeps the collector's credit
  • a collector's photo, enlarged › is still described as a photo of a collector's home
  • a collector's photo, enlarged › shows no credit line when the collector asked not to be named
  • a collector's photo, enlarged › does not carry the credit onto the painting itself
  • the room mockup › is the Blob copy for a migrated painting
  • the room mockup › falls back to the CSS room view when a painting has none (every admin upload)
__tests__/properties.test.ts18 tests
  • slugify › always produces a slug the admin will accept
  • slugify › is idempotent: a slug slugifies to itself
  • slugify › keeps every letter and digit of a short ASCII title, in order
  • slugProblem › accepts exactly the well-formed slugs up to SLUG_MAX
  • productPath › puts photographs and everything else under their own section, with the slug last
  • deriveSizeType › never depends on resolution, only on the shape
  • deriveSizeType › always returns a size type the work is offered in
  • deriveSizeType › gets wider as the image gets wider
  • standardPrice › is the lowest price on offer for the size type, and 0 for an unknown one
  • checkFields › never throws, whatever JSON arrives
  • checkFields › passes text within every limit, and refuses one field over its limit
  • checkFields › refuses anything that isn't text, except an absent or empty field
  • readFormBody › accepts a JSON object, refuses everything else, and never throws
  • readFormBody › refuses any body over the size limit, counted in bytes, not characters
  • resolveOrder › never throws, and every price comes from the catalogue, never from the request
  • resolveOrder › refuses a print of a hidden or sold-out work, and prices an available one at its size
  • resolveOrder › accepts a pack only with exactly its count of different, available images
  • parseClientError › never throws, and anything it accepts is bounded, on this site, and without a query
__tests__/rate-limit.test.ts6 tests
  • login limiter › keys on an HMAC of the address, never the address
  • login limiter › allows an address with no failures, or fewer than the limit
  • login limiter › locks out at the limit, and says how long is left
  • login limiter › forgets a window that has expired
  • login limiter › records failures in the database and clears them on success
  • login limiter › fails open when the database is down
__tests__/reel-poll-budget.test.ts4 tests
  • reel poll budget vs function timeouts › app/api/cron/instagram/route.ts leaves room to publish after the poll
  • reel poll budget vs function timeouts › app/admin/instagram/page.tsx leaves room to publish after the poll
  • reel poll budget vs function timeouts › keeps both publishing segments on the same timeout
  • reel poll budget vs function timeouts › still allows several poll attempts
__tests__/refresh-catalogue.test.ts2 tests
  • refreshCatalogueAction › expires the catalogue tag and every page under the root layout
  • refreshCatalogueAction › sends a caller with no session to sign in, and expires nothing
__tests__/reorder.test.ts2 tests
  • reorderProductsAction › writes the whole order in a single UPDATE … FROM (VALUES …)
  • reorderProductsAction › does nothing for an empty list rather than sending an empty VALUES
__tests__/season.test.ts4 tests
  • currentSeason › maps spring months
  • currentSeason › maps summer months
  • currentSeason › maps fall months
  • currentSeason › maps winter months
__tests__/security-headers.test.ts9 tests
  • security headers › are applied to every route
  • security headers › give API responses a policy that allows nothing
  • security headers › give image paths, and their 404s, a policy that allows nothing
  • security headers › forbid other sites from framing the pages
  • security headers › stop content sniffing and trim referrers
  • security headers › switch off browser features the site never uses
  • security headers › isolate the site's windows and responses from other origins
  • security headers › don't advertise the framework
  • security headers › leave HSTS to Vercel
__tests__/security-txt.test.ts3 tests
  • /.well-known/security.txt › has the fields RFC 9116 requires: Contact and Expires
  • /.well-known/security.txt › expires within a year, as the RFC recommends
  • /.well-known/security.txt › is served as plain text, with every non-comment line a known field
__tests__/server-actions-auth.test.ts6 tests
  • server actions without a session › app/actions/admin.ts: every action sends a caller with no session to sign in, untouched
  • server actions without a session › app/actions/instagram.ts: every action sends a caller with no session to sign in, untouched
  • server actions without a session › app/actions/analytics.ts: every action sends a caller with no session to sign in, untouched
  • server actions without a session › app/actions/passkey.ts: every action sends a caller with no session to sign in, untouched
  • server actions without a session › app/actions/commissions.ts: every action sends a caller with no session to sign in, untouched
  • server actions without a session › the sign-in actions are the only ones exempt, and still exist
__tests__/server-event.test.ts5 tests
  • pageOf › uses the page the form was posted from
  • pageOf › falls back with no Referer
  • pageOf › falls back with a malformed one
  • pageOf › falls back with an API path
  • pageOf › falls back with an admin path
__tests__/session-expiry.test.ts1 test
  • admin session expiry › is accepted within eight hours and refused after
__tests__/session.test.ts3 tests
  • sessionOptions › is an http-only, same-site cookie that lasts one working day, sealed with SESSION_SECRET
  • sessionOptions › is sent over plain http only outside production (local runs, CI)
  • getAdminSession › opens the session from this request's cookies with those options
__tests__/showcase.test.ts6 tests
  • distinctShowcases › gives every gift-shop card a different work
  • distinctShowcases › uses the calendar's chosen painting while it's for sale
  • distinctShowcases › falls back to an automatic pick once that painting is hidden or sold out
  • distinctShowcases › is stable: the same catalogue gives the same picks
  • distinctShowcases › repeats only when there are fewer works than cards, and never crashes on none
  • distinctShowcases › names the preference by product id, never by image path
__tests__/site-config.test.ts13 tests
  • site identity lives in one file › no source file hard-codes the brand
  • site identity lives in one file › no source file hard-codes the artist
  • site identity lives in one file › no source file hard-codes the domain
  • site identity lives in one file › no source file hard-codes the ownerEmail
  • site identity lives in one file › no source file hard-codes the phone
  • site identity lives in one file › no source file hard-codes the ga4
  • site identity lives in one file › no source file hard-codes the instagram
  • borrowed words live in the config too › no component hard-codes the collector's name
  • the derived values still resolve correctly › builds the mail From header from the brand and domain
  • the derived values still resolve correctly › strips the www for prose
  • the derived values still resolve correctly › keeps the copyright claim pointed at the same values
  • the derived values still resolve correctly › separates the public address from the inbox that receives notifications
  • the derived values still resolve correctly › has a canonical url with no trailing slash
__tests__/site-content.test.tsx5 tests
  • Testimonial › renders the quote and who said it
  • Testimonial › renders nothing at all when there is no testimonial
  • PressStrip › cites the publication and links to it
  • PressStrip › names the article and the date
  • PressStrip › renders nothing at all when there is no press mention
__tests__/storefront-chrome.test.tsx11 tests
  • StorefrontChrome › shows the banner, nav and footer on /
  • StorefrontChrome › shows the banner, nav and footer on /photographs
  • StorefrontChrome › shows the banner, nav and footer on /products/lora-bay
  • StorefrontChrome › shows the banner, nav and footer on /contact
  • StorefrontChrome › shows the banner, nav and footer on /for-artists
  • StorefrontChrome › shows the banner, nav and footer on /architectures
  • StorefrontChrome › drops only the banner on /architecture
  • StorefrontChrome › drops only the banner on /architecture/tests
  • StorefrontChrome › drops all of it on /admin
  • StorefrontChrome › drops all of it on /admin/analytics
  • StorefrontChrome › drops all of it on /book
__tests__/track-actions.test.ts9 tests
  • /api/track actions › records buy_open
  • /api/track actions › records newsletter_submit
  • /api/track actions › records product_click
  • /api/track actions › records outbound_click
  • /api/track actions › records soldout_enquiry
  • /api/track actions › drops contact_submit from a browser
  • /api/track actions › drops buy_submit from a browser
  • /api/track actions › drops spam_blocked from a browser
  • /api/track actions › drops made_up from a browser
__tests__/track-rate-limit.test.ts2 tests
  • /api/track rate limit › records events up to the limit, then drops them silently
  • /api/track rate limit › still records the event if the limiter itself is down
__tests__/version.test.ts2 tests
  • /api/version › reports the deployed commit, uncached
  • /api/version › reports null outside Vercel
__tests__/zap-gate.test.ts8 tests
  • judge › passes main's four-week failure: a warning with no instances
  • judge › fails a warning that has instances
  • judge › fails FAIL and in-progress lines too
  • judge › leaves INFO, IGNORE and PASS lines to ZAP's judgement
  • judge › never passes when ZAP's totals line is missing
  • summary › says the scan did not finish when there are no totals
  • summary › names what it ignored when it passes
  • summary › lists each finding, singular and plural

The Studio List

New paintings, first.

Be the first to see new Georgian Bay paintings and prints, hear about collection releases, and get subscriber-only sale previews. A few emails a season, no clutter.

Unsubscribe anytime. We never share your email.