+[Leaflet](https://leafletjs.com/) for map interaction,
+[Bootstrap](https://getbootstrap.com/) for layout styling.
+
The user interface used to be included in the geocoder. Thus the
The user interface used to be included in the geocoder. Thus the
-first version avoid being a redesign and still uses some of the
-same configuration values. For simplicity it's not a single
-page application (SPA) written in a framework though it could
-be in the future if complexity grows.
+first version avoided being a redesign and still uses some of the
+same configuration values. Version 2 was a full refactor using
+Svelte. Version 3 added theme and easier configuration.
-Uses [jQuery](https://jquery.com/) for browser DOM interaction,
-[handlebar](http://handlebarsjs.com/) templates to build pages,
-[leaflet](https://leafletjs.com/) for map interaction,
-[bootstrap](https://getbootstrap.com/) for layout styling.
## Building the frontend
## Building the frontend
@@ -25,29+26,49 @@ Uses [jQuery](https://jquery.com/) for browser DOM interaction,
* After you change files in `src` directory run
```
* After you change files in `src` directory run
```
- yarn build
+ yarn dev
```
```
+ which will start a webserver on port 9080 and auto-reloads
+ whenever you edit files. Configuration in `rollup.config.js`.
+
+## Testing
-* Start a webserver on port 8000 to preview changes
+The `test/` setup uses [Mocha](https://mochajs.org/) to run tests. Tests use [Puppeteer](https://pptr.dev/) to control a Google Chrome headless browser and evaluate with [Assert](https://nodejs.org/api/assert.html).
+
+
+* Run integration test suite (configuration in `.mocharc.json`)
```
```
- yarn start
+ yarn test
+ API_ON_SAME_PORT=1 yarn test
```
```
-* Run code style check
+ Setting API_ON_SAME_PORT simulates having both the API and UI on the same server
+ port. That's a rare setup but something https://nominatim.openstreetmap.org/ does
+ so worth testing.
+
+ To run a single test file only
+
+ ```
+ yarn run rollup -c && yarn run mocha test/details.js
+ ```
+
+* Run syntax linter (configuration in `.eslint.json`)