Internationalization
Sonarqube Scanner / Prepare environment (push) Successful in 20s
Sonarqube Scanner / Build and test (push) Failing after 36s
Sonarqube Scanner / SonarQube analysis (push) Skipped
Sonarqube Scanner / Deploy to Server (push) Successful in 9s

This commit is contained in:
Florian Zumpe
2026-10-01 09:41:01 +02:00
parent 607e5450e1
commit aff88eba1b
41 changed files with 1368 additions and 636 deletions
+6 -5
View File
@@ -1,3 +1,4 @@
import { readAppFile } from '../test-support/i18n.js';
import assert from 'node:assert/strict';
import fs from 'node:fs/promises';
import path from 'node:path';
@@ -6,7 +7,7 @@ import test from 'node:test';
const root = path.resolve(import.meta.dirname, '..');
async function read(relativePath) {
return fs.readFile(path.join(root, relativePath), 'utf8');
return readAppFile(relativePath);
}
test('main screen contains a persistent route control next to the information control', async () => {
@@ -24,7 +25,7 @@ test('main screen contains a persistent route control next to the information co
assert.match(html, /id="route-control-new"/);
assert.match(html, /id="info-button"/);
assert.match(html, /id="route-control-button"[\s\S]*?<img[^>]+route-management\.svg/);
assert.match(html, /id="editor-button"[^>]*>Strecken verwalten<\/button>/);
assert.match(html, /id="editor-button"[^>]*>Strecken bearbeiten<\/button>/);
assert.match(icon, /C[^\"]+/);
assert.match(icon, /stroke-dasharray/);
@@ -41,7 +42,7 @@ test('route selection separates activated server routes from local browser route
assert.match(html, /id="all-route-list"/);
assert.match(html, /id="local-route-list"/);
assert.match(html, />Lokale Strecken</);
assert.match(html, />Meine Entwürfe</);
assert.match(client, /activatedOnly:\s*['"]true['"]/);
assert.match(api, /publishedOnly:\s*req\.query\.activatedOnly\s*===\s*['"]true['"]/);
@@ -51,11 +52,11 @@ test('route selection separates activated server routes from local browser route
assert.match(app, /\[data-route-select\]/);
});
test('persistent route control displays the next unvisited Streckenpunkt and preserves progress when switching', async () => {
test('persistent route control displays the next unvisited Station and preserves progress when switching', async () => {
const app = await read('public/js/app.js');
assert.match(app, /function nextPoiMetric\(/);
assert.match(app, /Nächster Streckenpunkt:/);
assert.match(app, /Nächste Station:/);
assert.match(app, /state\.triggered\.has\(poi\.id\)/);
assert.match(app, /function suspendCurrentRoute\(/);
assert.match(app, /persistRouteProgress\(\)/);