Files
pages/internal/server/testdata/config-density.js
Anya Tokugawa c1175d389f Implement Knowledge City platform, organizer and DAV integration
Capture accumulated application, UI, CLI, regression tests and design documentation changes, including task project mapping and default CalDAV list naming.

Keep deployment data, backups, local credentials and build artifacts out of Git. Move the Compose enrollment token to an ignored local environment file.
2026-09-27 14:44:43 +09:00

27 lines
2.2 KiB
JavaScript

window.addEventListener('load', async () => {
const wait=async check=>{for(let i=0;i<150;i++){if(check())return;await new Promise(resolve=>setTimeout(resolve,30));}throw new Error('Table did not load');};
try {
for(const name of ['campuses','domains','nav-home','nav-system','auth','auth-sessions','events','assets','adapters','extensions']){
showConfigPanel(name);
const panel=document.getElementById('panel-'+name);
await wait(()=>!panel.querySelector('.recent-table tbody')?.textContent.includes(configMessages.loading));
for(const table of panel.querySelectorAll('.recent-table')){
if(!table.closest('.table-scroll'))throw new Error(name+': missing scroll container');
for(const row of table.querySelectorAll('tbody tr')){
if(row.getBoundingClientRect().height>42)throw new Error(name+': tall row '+row.getBoundingClientRect().height+' '+row.textContent.slice(0,60));
for(const cell of row.cells)if(getComputedStyle(cell).whiteSpace!=='nowrap')throw new Error(name+': wrapping cell');
for(const form of row.querySelectorAll('form'))if(parseFloat(getComputedStyle(form).marginBottom)!==0)throw new Error(name+': form adds row margin');
}
}
if(['campuses','domains'].includes(name))for(const input of panel.querySelectorAll('input[form]'))if(!input.form)throw new Error('Detached form association');
}
showConfigPanel('assets');
await wait(()=>document.querySelector('#asset-list .cell-clip[title$=".txt"]'));
const asset=document.querySelector('#asset-list .cell-clip[title$=".txt"]');
if(!asset || asset.scrollWidth<=asset.clientWidth || asset.title!==asset.textContent)throw new Error('Long asset name not available through tooltip');
if(!document.querySelector('#event-definitions .cell-clip[title]')?.title.includes('"'))throw new Error('Quoted title lost');
showConfigPanel(new URLSearchParams(location.search).get('capture') || 'auth');
document.body.dataset.vimReady='true';
}catch(error){const box=document.createElement('div');box.id='error';box.textContent=error.message;document.body.append(box);}
});