Downgrade css to prevent older browsers displaying faulty views
Sonarqube Scanner / Build and analyze (push) Failing after 1m36s
Sonarqube Scanner / Build and analyze (push) Failing after 1m36s
This commit is contained in:
@@ -138,6 +138,18 @@ test('the npm-started local API is exercised through a write-auth proxy on loopb
|
||||
const healthResponse = await fetch(`${baseUrl}/api/health`);
|
||||
assert.equal(healthResponse.status, 200);
|
||||
assert.equal(healthResponse.headers.get('www-authenticate'), null);
|
||||
assert.match(healthResponse.headers.get('cache-control') || '', /no-store/);
|
||||
|
||||
const indexResponse = await fetch(`${baseUrl}/`);
|
||||
const indexHtml = await indexResponse.text();
|
||||
assert.equal(indexResponse.status, 200);
|
||||
assert.match(indexResponse.headers.get('cache-control') || '', /no-store/);
|
||||
assert.match(indexHtml, /css\/app\.css\?v=0\.12\.12/);
|
||||
|
||||
const appStyleResponse = await fetch(`${baseUrl}/css/app.css?v=0.12.12`);
|
||||
assert.equal(appStyleResponse.status, 200);
|
||||
assert.match(appStyleResponse.headers.get('cache-control') || '', /no-store/);
|
||||
await appStyleResponse.arrayBuffer();
|
||||
|
||||
const pythonHealthCheck = await runProcess('python3', ['-c', `
|
||||
from common import ApiClient
|
||||
|
||||
@@ -20,3 +20,28 @@ test('start page keeps nearby recommendations and the complete route list', asyn
|
||||
assert.match(app, /renderRouteItems\(\s*'#all-route-list'/);
|
||||
assert.doesNotMatch(app, /state\.routes\s*=\s*state\.routes[\s\S]*?\.filter\(route => route\.proximityM/);
|
||||
});
|
||||
|
||||
test('route selection renders independently from geolocation and restores after mobile page resume', async () => {
|
||||
const html = await read('public/index.html');
|
||||
const app = await read('public/js/app.js');
|
||||
const loader = await read('public/js/bootstrap-loader.js');
|
||||
const css = await read('public/css/app.css');
|
||||
const server = await read('server.js');
|
||||
const api = await read('src/routes/api.js');
|
||||
|
||||
assert.match(html, /vendor\/jquery-ui\/jquery-ui-1\.14\.2\.min\.css\?v=0\.12\.12/);
|
||||
assert.match(html, /css\/app\.css\?v=0\.12\.12/);
|
||||
assert.match(html, /id="all-routes-summary"[^>]*>Routen werden geladen/);
|
||||
assert.doesNotMatch(loader, /loadStyle\(/);
|
||||
assert.doesNotMatch(css, /:has\(/);
|
||||
assert.match(html, /<header class="has-back-button">/);
|
||||
|
||||
const firstRender = app.indexOf('renderRoutes();', app.indexOf('async initialize(context)'));
|
||||
const locationStart = app.indexOf('void initializeLocation(context);', app.indexOf('async initialize(context)'));
|
||||
assert.ok(firstRender >= 0 && locationStart > firstRender, 'Routen müssen vor der Standortabfrage gerendert werden.');
|
||||
assert.match(app, /globalThis\.addEventListener\('pageshow', restoreRouteLists\)/);
|
||||
assert.match(app, /document\.visibilityState === 'visible'/);
|
||||
assert.match(app, /Array\.isArray\(response\?\.routes\)/);
|
||||
assert.match(server, /no-cache, no-store, must-revalidate/);
|
||||
assert.match(api, /api\.use\(\(req, res, next\)/);
|
||||
});
|
||||
|
||||
@@ -44,3 +44,13 @@ test('retired internal instance label is absent from authored project files', as
|
||||
const retiredLabel = ['at', 'las'].join('');
|
||||
assert.doesNotMatch(content, new RegExp(retiredLabel, 'i'));
|
||||
});
|
||||
|
||||
test('runtime route directories keep their repository placeholders', async () => {
|
||||
for (const relativePath of [
|
||||
'storage/active/routes/.gitkeep',
|
||||
'storage/trash/routes/.gitkeep'
|
||||
]) {
|
||||
const stat = await fs.stat(path.join(root, relativePath));
|
||||
assert.ok(stat.isFile(), `${relativePath} fehlt`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user