fix test logic
Sonarqube Scanner / Build and analyze (push) Failing after 19s

This commit is contained in:
Florian Zumpe
2026-09-27 20:39:24 +02:00
parent 5df5ae7782
commit bd13a479b1
5 changed files with 29 additions and 15 deletions
+18 -9
View File
@@ -2,8 +2,9 @@
'use strict';
const versions = Object.freeze({ app: '0.12.14', jquery: '4.0.0', jqueryUi: '1.14.2' });
const steps = ['jquery', 'jquery-ui', 'modules', 'server', 'routes', 'location'];
const steps = ['storage', 'jquery', 'jquery-ui', 'modules', 'server', 'routes', 'location'];
const stepLabels = Object.freeze({
storage: 'Lokalen Speicher prüfen …',
jquery: 'jQuery laden …',
'jquery-ui': 'jQuery UI laden …',
modules: 'Anwendungsmodule laden …',
@@ -22,6 +23,7 @@
const statusText = document.getElementById('bootstrap-status-text');
let ready = false;
let statusTransition = 0;
const completedSteps = new Set();
const versioned = path => `${path}${path.includes('?') ? '&' : '?'}v=${encodeURIComponent(versions.app)}`;
@@ -43,7 +45,7 @@
}
function nextPendingStep() {
return steps.find(step => !document.querySelector(`[data-step="${step}"]`)?.classList.contains('done'));
return steps.find(step => !completedSteps.has(step));
}
function announceStep(step) {
@@ -51,12 +53,16 @@
}
function mark(step, state) {
if (!steps.includes(step)) return;
const item = document.querySelector(`[data-step="${step}"]`);
if (!item) return;
item.classList.remove('done', 'failed');
item.classList.add(state);
item.dataset.state = state;
progress.value = document.querySelectorAll('#bootstrap-steps .done').length;
item?.classList?.remove('done', 'failed');
if (state === 'done') completedSteps.add(step);
else completedSteps.delete(step);
item?.classList?.add(state);
if (progress) progress.value = completedSteps.size;
if (state === 'failed') {
setStatusText(`Fehler bei: ${stepLabels[step] || step}`);
@@ -114,6 +120,7 @@
if (event.target !== enter && event.target.closest('button, input, label, a, dialog')) return;
event.preventDefault();
event.stopPropagation?.();
screen.hidden = true;
document.getElementById('app-shell').hidden = false;
globalThis.Wegwichtel.App.navigate('#routes-page', { replace: true });
@@ -137,6 +144,8 @@
async function boot() {
ready = false;
completedSteps.clear();
if (progress) progress.value = 0;
screen.setAttribute('aria-busy', 'true');
screen.classList.remove('ready');
readyText.hidden = true;
@@ -150,9 +159,9 @@
}
try {
setStatusText('Lokalen Speicher prüfen …', true);
setStatusText(stepLabels.storage, true);
await cleanupOldProgress();
announceStep('jquery');
mark('storage', 'done');
await loadScript(
`vendor/jquery/jquery-${versions.jquery}.min.js`,