Files
progcode/docs/design-system/candidates/0340b0d273be/designer-evidence/behaviour.txt
T
huncode 12562baeb5
Build and deploy / deploy (push) Successful in 2m39s
Implement ProgCode identity and real shared reading UI kit
2026-10-27 15:19:49 +03:00

20 lines
6.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### Result
{"search":3,"zero":"По этому запросу ничего нет. Попробуйте другое слово или сбросьте тему.","reset":"","topicD":6,"persist":"dark","errorlight":"Ошибка синтаксиса: Expected property name or '}' in JSON at position 1 (line 1 column 2)","copylight":"Скопировано","errordark":"Ошибка синтаксиса: Expected property name or '}' in JSON at position 1 (line 1 column 2)","copydark":"Скопировано","table":{"left":264,"max":264,"body":390,"focus":true,"outline":"solid"},"code":{"left":379,"max":379,"body":390,"focus":true,"outline":"solid"},"lines":[{"length":269,"lines":[75,64,77,50],"width":740,"font":"19px","lineHeight":"32.68px"},{"length":531,"lines":[71,70,68,77,73,71,60,32],"width":740,"font":"19px","lineHeight":"32.68px"},{"length":383,"lines":[73,74,67,74,67,23],"width":740,"font":"19px","lineHeight":"32.68px"},{"length":578,"lines":[77,71,74,68,72,77,70,62],"width":740,"font":"19px","lineHeight":"32.68px"},{"length":334,"lines":[76,72,66,67,49],"width":740,"font":"19px","lineHeight":"32.68px"},{"length":717,"lines":[72,67,72,74,73,67,74,77,71,61],"width":740,"font":"19px","lineHeight":"32.68px"},{"length":393,"lines":[74,80,67,80,73,14],"width":740,"font":"19px","lineHeight":"32.68px"}],"zoomBefore":{"inner":1440,"ratio":1},"zoomAfterControl":{"inner":1440,"ratio":1},"zoomAfterMeta":{"inner":1440,"ratio":1}}
### Ran Playwright code
```js
await (async page=>{
const b='http://127.0.0.1:65019',o='/tmp/progcode-ds-designer0340',r={};await page.setViewportSize({width:390,height:900});await page.goto(b+'/');await page.getByRole('combobox',{name:'Тема'}).selectOption('light');await page.locator('#search').fill('Bitrix');r.search=await page.locator('.journal-list .index-entry').count();await page.locator('#search').fill('неттакойтемы');r.zero=await page.locator('.search-status').innerText();await page.locator('#journal').scrollIntoViewIfNeeded();await page.screenshot({path:o+'/search-zero-light.png'});await page.getByRole('button',{name:'Сбросить поиск',exact:true}).click();r.reset=await page.locator('#search').inputValue();await page.getByRole('button',{name:'D',exact:true}).click();r.topicD=await page.locator('.journal-list .index-entry').count();await page.getByRole('combobox',{name:'Тема'}).selectOption('dark');await page.reload();r.persist=await page.getByRole('combobox',{name:'Тема'}).inputValue();
for(const theme of ['light','dark']){await page.getByRole('combobox',{name:'Тема'}).selectOption(theme);await page.goto(b+'/tools/');await page.locator('#json').fill('{bad');await page.getByRole('button',{name:'Форматировать',exact:true}).click();r['error'+theme]=await page.locator('#json-status').innerText();await page.screenshot({path:o+'/json-error-'+theme+'.png',fullPage:true});await page.locator('#json').fill('{"ok":true}');await page.getByRole('button',{name:'Форматировать',exact:true}).click();await page.getByRole('button',{name:'Копировать',exact:true}).click();await page.waitForTimeout(300);r['copy'+theme]=await page.locator('.copy-feedback').innerText();}
await page.goto(b+'/articles/'+encodeURIComponent('новый-движок-ctfe')+'/');const table=page.locator('.table-scroll').first();await table.scrollIntoViewIfNeeded();await table.focus();for(let i=0;i<20;i++)await page.keyboard.press('ArrowRight');await page.waitForTimeout(300);r.table=await table.evaluate(e=>({left:e.scrollLeft,max:e.scrollWidth-e.clientWidth,body:document.documentElement.scrollWidth,focus:document.activeElement===e,outline:getComputedStyle(e).outlineStyle}));await page.screenshot({path:o+'/table-right-dark.png'});
await page.goto(b+'/articles/'+encodeURIComponent('пишем-аналог-функции-php-preg_match_all-на-языке-прог')+'/');const code=page.locator('pre').nth(1);await code.scrollIntoViewIfNeeded();await code.focus();for(let i=0;i<20;i++)await page.keyboard.press('ArrowRight');await page.waitForTimeout(300);r.code=await code.evaluate(e=>({left:e.scrollLeft,max:e.scrollWidth-e.clientWidth,body:document.documentElement.scrollWidth,focus:document.activeElement===e,outline:getComputedStyle(e).outlineStyle}));await page.screenshot({path:o+'/code-right-dark.png'});
for(const [name,slug] of [['gc','dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол'],['ctfe','новый-движок-ctfe'],['vibe','особенности-vibe-d'],['bitrix','bitrix-api-add-foto-editor']]){await page.goto(b+'/articles/'+encodeURIComponent(slug)+'/');let i=0;for(const fig of await page.locator('figure').all()){await fig.scrollIntoViewIfNeeded();for(const img of await fig.locator('img').all()){await img.evaluate(e=>e.decode());}await page.screenshot({path:o+'/'+name+'-390-dark-decoded'+i+++'.png'});}}
await page.setViewportSize({width:1440,height:900});await page.goto(b+'/articles/'+encodeURIComponent('о-tilix-и-d-интервью-с-геральдом-нанном')+'/');r.lines=await page.evaluate(()=>{const result=[];for(const p of [...document.querySelectorAll('.article-content p')].filter(p=>p.textContent.length>180).slice(0,7)){const tw=document.createTreeWalker(p,NodeFilter.SHOW_TEXT);let node;const lines=new Map();while(node=tw.nextNode()){for(let i=0;i<node.length;i++){const range=document.createRange();range.setStart(node,i);range.setEnd(node,i+1);const box=range.getBoundingClientRect();if(!box.width)continue;const y=Math.round(box.top);lines.set(y,(lines.get(y)||0)+1);}}result.push({length:p.textContent.length,lines:[...lines.values()],width:p.clientWidth,font:getComputedStyle(p).fontSize,lineHeight:getComputedStyle(p).lineHeight});}return result;});
r.zoomBefore=await page.evaluate(()=>({inner:innerWidth,ratio:devicePixelRatio}));await page.keyboard.press('Control+Equal');await page.keyboard.press('Control+Equal');await page.keyboard.press('Control+Equal');await page.waitForTimeout(300);r.zoomAfterControl=await page.evaluate(()=>({inner:innerWidth,ratio:devicePixelRatio}));await page.keyboard.press('Control+0');await page.keyboard.press('Meta+Equal');await page.keyboard.press('Meta+Equal');await page.keyboard.press('Meta+Equal');await page.waitForTimeout(300);r.zoomAfterMeta=await page.evaluate(()=>({inner:innerWidth,ratio:devicePixelRatio}));await page.keyboard.press('Meta+0');
return r;
}
)(page);
```
### Page
- Page URL: http://127.0.0.1:65019/articles/%D0%BE-tilix-%D0%B8-d-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%B2%D1%8C%D1%8E-%D1%81-%D0%B3%D0%B5%D1%80%D0%B0%D0%BB%D1%8C%D0%B4%D0%BE%D0%BC-%D0%BD%D0%B0%D0%BD%D0%BD%D0%BE%D0%BC/
- Page Title: О Tilix и D: интервью с Геральдом Нанном — ProgCode