Allow read-only folder tests independently of monitoring state
CI / verify (push) Waiting to run

This commit is contained in:
Sucukdeluxe
2026-09-22 06:07:27 +02:00
parent 9d696fa89f
commit b4c3c075b7
5 changed files with 95 additions and 4 deletions
+7 -3
View File
@@ -927,7 +927,10 @@ async function applyAutomationEvaluation(evaluation) {
async function runFolderMonitorTestScan() {
const result = await window.api.folderMonitorTestScan();
if (result?.error) throw new Error('Ordnerüberwachung konnte nicht getestet werden.');
if (result?.error) {
const knownErrors = ['Kein Ordnerpfad angegeben', 'Ordner nicht erreichbar', 'Ordnerscan fehlgeschlagen'];
throw new Error(knownErrors.includes(result.error) ? result.error : 'Ordnerüberwachung konnte nicht getestet werden.');
}
return evaluateAutomationCandidates(result?.files || [], { dryRun: true, trigger: result?.trigger || 'test' });
}
@@ -1226,9 +1229,10 @@ async function runAutomationTestOverlay() {
const evaluation = await runFolderMonitorTestScan();
if (generation !== automationTestGeneration) return;
renderAutomationTestViewState({ loading: false, summary: evaluation.summary, error: '' });
} catch {
} catch (error) {
if (generation !== automationTestGeneration) return;
renderAutomationTestViewState({ loading: false, summary: null, error: 'Ordnerüberwachung konnte nicht getestet werden.' });
const knownErrors = ['Kein Ordnerpfad angegeben', 'Ordner nicht erreichbar', 'Ordnerscan fehlgeschlagen'];
renderAutomationTestViewState({ loading: false, summary: null, error: knownErrors.includes(error?.message) ? error.message : 'Ordnerüberwachung konnte nicht getestet werden.' });
}
}