Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s

This commit is contained in:
huncode committed 2026-10-27 15:19:49 +03:00
1 parent 99c848189e
commit 12562baeb5
2040 files changed
+184656 -181

No files matched your search

@@ -0,0 +1,8 @@
async (page) => {
const base='http://127.0.0.1:65019',out={};
await page.setViewportSize({width:320,height:1000});await page.goto(base+'/resources/');await page.getByLabel('Тема',{exact:true}).selectOption('light');
out.resources=await page.evaluate(()=>[...document.querySelectorAll('body *')].map(e=>({tag:e.tagName,cls:e.className,text:e.innerText?.slice(0,160),right:e.getBoundingClientRect().right,width:e.getBoundingClientRect().width})).filter(e=>e.right>320));await page.screenshot({path:'/tmp/progcode-ds-content/resources-320-light.png',fullPage:true});
await page.goto(base+'/');const search=page.getByRole('searchbox');out.search=[];for(const value of ['jQuery','Bitrix','несуществующий-запрос']){await search.fill(value);out.search.push({value,status:await page.getByRole('status').allTextContents()});await page.screenshot({path:'/tmp/progcode-ds-content/search-'+(value==='jQuery'?'1':value==='Bitrix'?'3':'0')+'.png',fullPage:true});}
await search.fill('');await page.getByRole('button',{name:'D',exact:true}).click();out.search.push({value:'D topic',status:await page.getByRole('status').allTextContents()});await search.fill('jQuery');out.search.push({value:'D+jQuery',status:await page.getByRole('status').allTextContents()});out.resetButtons=await page.getByRole('button').allTextContents();
await page.goto(base+'/tools/');const input=page.locator('textarea');out.json=[];await page.getByRole('button',{name:'Форматировать',exact:true}).click();out.json.push({case:'empty',status:await page.getByRole('status').allTextContents()});await input.fill('{bad');await page.getByRole('button',{name:'Форматировать',exact:true}).click();out.json.push({case:'invalid',status:await page.getByRole('status').allTextContents(),invalid:await input.getAttribute('aria-invalid')});await input.fill(JSON.stringify({title:'Проверка',list:Array.from({length:40},(_,i)=>({index:i,value:'JSON строка '+i}))}));await page.getByRole('button',{name:'Форматировать',exact:true}).click();out.json.push({case:'success',status:await page.getByRole('status').allTextContents(),result:await page.locator('pre').innerText()});await page.evaluate(()=>Object.defineProperty(navigator,'clipboard',{configurable:true,value:{writeText:async()=>{throw new Error('CM injected permission denial')}}}));await page.getByRole('button',{name:'Копировать',exact:true}).click();out.json.push({case:'injected copy denial',status:await page.getByRole('status').allTextContents()});await page.screenshot({path:'/tmp/progcode-ds-content/json-copy-denial-320.png',fullPage:true});return out;
}