“Find near me” is an optional convenience, not permission to block the branch list. Design the no-location journey first: a suburb or postcode search, a readable list and a branch contact path. Distance ordering must not imply that the nearest branch has stock, appointments or coverage.
Who should use this acceptance brief
Multi-location retailers and appointment businesses. Use this as a scoped commissioning task for a website supplier. Where system evidence is required, a teaching file is not a substitute.
Source-bound platform fact
The Geolocation API requires a secure context and user permission, with error callbacks for unsuccessful requests. Browser availability and location quality vary. MDN: geolocation · Checked 16 October 2026.
Filled teaching example
Synthetic example, not a client case. Inputs, expected decisions and counterexamples follow; no live platform integration is claimed.
On narrow screens, scroll to read the complete table.
| Input / case | Check basis | Expected decision |
|---|---|---|
| permission denied | no coordinates | manual branch search |
| timeout | no coordinates | retry optional + manual |
| granted + coordinates | estimated location | distance list, not availability |
Run the acceptance exercise
- Test allow, deny and timeout as separate states.
- Verify manual search needs no location permission and exposes the same branch details.
- Keep stock and appointment checks as separate branch-specific follow-up actions.
Interpret the result and retain evidence
The fixture selects a fallback path, not a distance formula. Missing coordinates remain unavailable; they are not replaced with 0,0 or an IP-derived precise address. Save the permission state and chosen interface path, without storing a visitor’s location in the teaching record.
Limits before implementation
No actual permission prompt is triggered by these files. Excludes route planning, emergency coverage and promises of regional availability.
Replay the finite example
Save both files in one folder and run with Node22.13 or newer. These finite checks are not a live service or certification. Filled inputs and expected outputs · Inspectable functions
node decision-check.mjs store-locator-permission-fallback.json