Upload via GUI (72 Dateien)
This commit is contained in:
@@ -66,7 +66,8 @@ window.deskhub = {
|
||||
login: async () => ({ staff }), logout: async () => true, notify: async () => {}, badge: async () => {},
|
||||
openWeb: async (path) => { window.__web = path; return { data: true }; },
|
||||
api: async (req) => { window.__calls.push(req.path); if (req.body) (window.__bodies = window.__bodies || {})[req.path] = req.body; window.__bodies = window.__bodies || {}; const f = routes[req.path]; return f ? { data: f(req) } : { error: { message: 'Mock: ' + req.path + ' nicht vorhanden' } }; },
|
||||
onSessionExpired() {}, onNavigate() {},
|
||||
onSessionExpired() {}, onNavigate() {}, onUpdateProgress() {},
|
||||
updateCheck: async () => ({ data: window.__update || { available: false, packaged: true, current: '1.1.0' } }), updateInstall: async () => ({ data: true }),
|
||||
};
|
||||
</script>
|
||||
<script src="../src/lang-en.js"></script><script src="../src/i18n.js"></script><script src="../src/app.js"></script><script src="../src/admin-extra.js"></script><script src="../src/admin-status.js"></script>
|
||||
|
||||
@@ -37,6 +37,14 @@ app.whenReady().then(async () => {
|
||||
await run(`go('dashboard')`);
|
||||
check('Dashboard zeigt Kennzahlen', await waitFor(`document.getElementById('main').innerText.includes('Drucker druckt nicht')`));
|
||||
|
||||
console.log('Programm-Update');
|
||||
check('Ohne neue Version kein Update-Banner', await run(`!document.getElementById('banners').innerText.includes('Update verfügbar')`));
|
||||
await run(`window.__update = { available: true, packaged: true, version: '9.9.9', current: '1.1.0', notes: '' }; checkUpdate()`);
|
||||
check('Neue Version zeigt Banner mit Button', await waitFor(`document.getElementById('banners').innerText.includes('Update verfügbar: DeskHub 9.9.9') && document.getElementById('banners').innerText.includes('Jetzt aktualisieren')`));
|
||||
await run(`[...document.querySelectorAll('#banners button')].find(b => b.textContent === 'Später').click()`);
|
||||
check('„Später“ blendet das Banner aus', await run(`!document.getElementById('banners').innerText.includes('Update verfügbar')`));
|
||||
await run(`window.__update = undefined; state.update = undefined; paintBanners()`);
|
||||
|
||||
await run(`go('tickets')`);
|
||||
check('Ticketliste zeigt alle Tickets', await waitFor(`['Drucker druckt nicht','Passwort zurücksetzen','Rechnung fehlt','VPN Verbindung bricht ab'].every(t => document.getElementById('main').innerText.includes(t))`));
|
||||
check('Reiter „Wiedervorlage“, „Pausiert“ und „Beobachtet“ sind da', await run(`(() => { const t = [...document.querySelectorAll('#main .tabs button')].map((b) => b.innerText).join('|'); return t.includes('Wiedervorlage') && t.includes('Pausiert') && t.includes('Beobachtet'); })()`));
|
||||
|
||||
Reference in New Issue
Block a user