overhaul gpx creation and usage
This commit is contained in:
@@ -57,13 +57,17 @@ test('application actions use pointer events instead of click handlers', async (
|
||||
assert.doesNotMatch(scripts, /(?:\.on|addEventListener)\(\s*['"]click['"]/);
|
||||
});
|
||||
|
||||
test('mobile navigation footer contains a rotating SVG arrow and exact metre output', async () => {
|
||||
test('mobile navigation shows a path arrow without distance and a station arrow with metres', async () => {
|
||||
const html = await read('public/index.html');
|
||||
const app = await read('public/js/app.js');
|
||||
const css = await read('public/css/app.css');
|
||||
|
||||
assert.match(html, /<footer id="navigation-footer"/);
|
||||
assert.match(html, /<svg id="navigation-arrow"/);
|
||||
assert.match(html, /<svg id="route-navigation-arrow"/);
|
||||
const pathCard = html.slice(html.indexOf('<svg id="route-navigation-arrow"'), html.indexOf('id="station-navigation"'));
|
||||
assert.match(pathCard, /route-navigation-mode/);
|
||||
assert.doesNotMatch(pathCard, /navigation-distance/);
|
||||
assert.match(app, /Distance\.bearing/);
|
||||
assert.match(app, /Math\.round\((?:metric\.distance|progress\.distance|distance)\)/);
|
||||
assert.match(app, /`\$\{distance\} m`/);
|
||||
@@ -144,7 +148,7 @@ test('the selected or triggered Station is highlighted semantically', async () =
|
||||
assert.match(css, /aktuelle Station/);
|
||||
});
|
||||
|
||||
test('Stationen have live direction and metre indicators and take navigation priority', async () => {
|
||||
test('stations retain live direction and metre indicators beside path navigation', async () => {
|
||||
const app = await read('public/js/app.js');
|
||||
const css = await read('public/css/app.css');
|
||||
const html = await read('public/index.html');
|
||||
@@ -158,7 +162,7 @@ test('Stationen have live direction and metre indicators and take navigation pri
|
||||
assert.match(app, /find\('svg'\)\.css\('transform'/);
|
||||
assert.match(css, /\.poi-proximity[\s\S]*grid-column:\s*2/);
|
||||
assert.match(css, /\.poi-proximity svg[\s\S]*transition:\s*transform/);
|
||||
assert.match(html, /Richtung zum nächsten Station/);
|
||||
assert.match(html, /Richtung zur nächsten Station/);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user