feat: Seite System mit Version, Aufbewahrung, Datenbankgröße, Sicherungen und Diagnoseknopf (#1221)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg7hLrpgArYQDUZQTAJ
This commit is contained in:
@ -17,7 +17,7 @@ try {
|
||||
const vorher = fehler();
|
||||
// 1. Admin: beide Kanäle sichtbar und erklärt.
|
||||
await b.login(BASE, 'claude', pw);
|
||||
await b.goto(BASE + '/ui/zugaenge?reiter=benutzer'); await sleep(1200);
|
||||
await b.goto(BASE + '/ui/system'); await sleep(1200);
|
||||
const knoepfe = await b.eval(`[...document.querySelectorAll('button[name="kanal"]')].map(x => x.value + ':' + x.textContent.trim())`);
|
||||
ok('zwei Knöpfe „regulaer“ und „vorab“', knoepfe.length === 2 && knoepfe.includes('regulaer:Regulär prüfen') && knoepfe.includes('vorab:Mit Vorabversionen prüfen'), JSON.stringify(knoepfe));
|
||||
ok('Erklärung zu den Kanälen steht auf der Seite', await b.eval(`document.body.textContent.includes('Regulär prüft nur fertige Releases')`));
|
||||
@ -29,7 +29,7 @@ try {
|
||||
const url1 = await b.eval(`location.href`);
|
||||
ok('regulär: Meldung „neueste Version auf Gitea“ (laufende 0.1.20-rc1 ist die neueste auf dem Kanal)', text.includes('neueste Version auf Gitea') && url1.includes('update_aktuell'), url1);
|
||||
// 3. Mit Vorabversionen prüfen.
|
||||
await b.goto(BASE + '/ui/zugaenge?reiter=benutzer'); await sleep(800);
|
||||
await b.goto(BASE + '/ui/system'); await sleep(800);
|
||||
await b.eval(`document.querySelector('button[name="kanal"][value="vorab"]').click()`);
|
||||
await sleep(4000);
|
||||
text = await b.eval(`document.body.textContent`);
|
||||
@ -44,9 +44,9 @@ try {
|
||||
}
|
||||
// 5. Nutzer: kein Abschnitt, Abruf abgelehnt.
|
||||
await b.login(BASE, 'nutzer', pwn);
|
||||
await b.goto(BASE + '/ui/zugaenge?reiter=benutzer'); await sleep(800);
|
||||
await b.goto(BASE + '/ui/system'); await sleep(800);
|
||||
ok('Nutzer sieht die Versionssektion nicht', !(await b.eval(`!!document.querySelector('button[name="kanal"]')`)));
|
||||
const status = await b.eval(`fetch('/ui/benutzer/update-pruefen',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded'},body:'kanal=regulaer',credentials:'same-origin',redirect:'manual'}).then(r=>r.status)`);
|
||||
const status = await b.eval(`fetch('/ui/system/update-pruefen',{method:'POST',headers:{'content-type':'application/x-www-form-urlencoded'},body:'kanal=regulaer',credentials:'same-origin',redirect:'manual'}).then(r=>r.status)`);
|
||||
ok('Nutzer: Abruf wird abgelehnt (403)', status === 403, 'Status ' + status);
|
||||
const neueFehler = b.events.filter(e => e.method === 'Runtime.exceptionThrown' || (e.method === 'Log.entryAdded' && e.params.entry.level === 'error'));
|
||||
for (const e of neueFehler.slice(vorher)) console.log(' Konsole:', JSON.stringify(e.params.entry ? { text: e.params.entry.text, url: e.params.entry.url } : e.params.exceptionDetails?.text));
|
||||
|
||||
Reference in New Issue
Block a user