added image and audio REST endpoints
This commit is contained in:
@@ -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/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user