added image and audio REST endpoints

This commit is contained in:
Florian Zumpe
2026-06-16 23:52:37 +02:00
parent b910bce8df
commit c98f304ffa
13 changed files with 1126 additions and 494 deletions
+18 -1
View File
@@ -152,7 +152,8 @@ test('reaching a POI preloads audio without autoplay and uses the vibration wrap
const html = await read('public/index.html');
const loader = await read('public/js/bootstrap-loader.js');
assert.match(app, /ns\.AudioPlayer\.load\(poi\.audioUrl\)/);
assert.match(app, /ns\.AudioPlayer\.load\(poi\.audioUrl \? ns\.Api\.audioUrl/);
assert.match(app, /ns\.Api\.pictureUrl/);
assert.doesNotMatch(app, /AudioPlayer\.play\(/);
assert.match(app, /ns\.Vibration\.start\(ns\.Vibration\.Patterns\.ACTIVE_POI\)/);
assert.doesNotMatch(app, /navigator\.vibrate/);
@@ -161,3 +162,19 @@ test('reaching a POI preloads audio without autoplay and uses the vibration wrap
assert.match(html, /<audio id="poi-audio" controls preload="auto" hidden>/);
assert.match(loader, /'vibration'/);
});
test('POI page uses icon-based back and slideshow controls in a single responsive row', async () => {
const html = await read('public/index.html');
const css = await read('public/css/app.css');
const loader = await read('public/js/bootstrap-loader.js');
assert.match(html, /class="back-button"[\s\S]*images\/icons\/back\.svg/);
assert.match(html, /id="slide-prev"[\s\S]*images\/icons\/chevron-left\.svg/);
assert.match(html, /id="slide-next"[\s\S]*images\/icons\/chevron-right\.svg/);
assert.match(html, /class="slide-meta"/);
assert.match(css, /#slide-controls[\s\S]*grid-template-columns:\s*var\(--icon-button-size\) minmax\(0, 1fr\) var\(--icon-button-size\)/);
assert.match(css, /\.slide-meta[\s\S]*justify-content:\s*center/);
assert.match(css, /#slide-caption[\s\S]*overflow-wrap:\s*anywhere/);
assert.doesNotMatch(loader, /controlgroup/);
});