Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s
Build and deploy / deploy (push) Successful in 2m39s
This commit is contained in:
1 parent
99c848189e
commit
12562baeb5
2040 files changed
+184656
-181
No files matched your search
@@ -0,0 +1,24 @@
|
||||
### Result
|
||||
{"identity":{"sourceHash":"f5d92794816398171b68a1d374b24bd0cd9ea0f85d005c7be92369b40d314900","articles":14},"checks":[{"name":"home","path":"/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Разобраться.Написать. Проверить."},{"name":"resources","path":"/resources/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Сначала —первоисточник."},{"name":"json","path":"/tools/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Привести JSONв порядок."},{"name":"about","path":"/about/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Блог одногопрограммиста."},{"name":"privacy","path":"/privacy/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Приватностьи аналитика."},{"name":"sources","path":"/sources/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Сохранить смысл.Уточнить контекст."},{"name":"accessibility","path":"/accessibility/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Настроить чтениепод себя."},{"name":"kit","path":"/ui-kit/","width":320,"theme":"light","status":200,"scroll":320,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Компоненты ProgCode."},{"name":"home","path":"/","width":390,"theme":"light","status":200,"scroll":390,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура","href":"/sources/"},{"text":"Приватность","href":"/privacy/"},{"text":"Доступность и чтение","href":"/accessibility/"},{"text":"Компоненты ProgCode","href":"/ui-kit/"}],"h1":"Разобраться.Написать. Проверить."},{"name":"resources","path":"/resources/","width":390,"theme":"light","status":200,"scroll":390,"themeValue":"light","footerLinks":[{"text":"","href":"/"},{"text":"Все статьи","href":"/#journal"},{"text":"Источники и редактура"Line truncated
|
||||
### Ran Playwright code
|
||||
```js
|
||||
await (async page=>{
|
||||
const b='http://127.0.0.1:50480',o='/tmp/progcode-ds-designer-f5',r={identity:await page.request.get(b+'/build-identity.json').then(r=>r.json()),checks:[]};
|
||||
const css=async()=>page.evaluate(()=>{const all=[];function walk(rules,scope=''){for(const x of rules){if(x.cssRules)walk(x.cssRules,scope+'|'+x.conditionText);else if(x.selectorText)all.push(scope+'|'+x.selectorText+'|'+x.style.cssText)}}for(const s of document.styleSheets)walk(s.cssRules);return all});
|
||||
await page.goto('http://127.0.0.1:65019/');const oldCSS=await css();await page.goto(b+'/');const newCSS=await css();r.cssDelta={old:oldCSS.length,new:newCSS.length,added:newCSS.filter(x=>!oldCSS.includes(x)),removed:oldCSS.filter(x=>!newCSS.includes(x))};
|
||||
const cases=[['home','/'],['resources','/resources/'],['json','/tools/'],['about','/about/'],['privacy','/privacy/'],['sources','/sources/'],['accessibility','/accessibility/'],['kit','/ui-kit/']];
|
||||
for(const theme of ['light','dark']){await page.goto(b+'/');await page.getByRole('combobox',{name:'Тема'}).selectOption(theme);for(const width of [320,390,1440]){await page.setViewportSize({width,height:900});for(const [name,path] of cases){const resp=await page.goto(b+path);if(name==='home')await page.locator('.lead-visual img').evaluate(e=>e.decode());await page.screenshot({path:o+'/'+name+'-'+width+'-'+theme+'-top.png'});await page.locator('footer').scrollIntoViewIfNeeded();await page.screenshot({path:o+'/'+name+'-'+width+'-'+theme+'-footer.png'});r.checks.push({name,path,width,theme,status:resp.status(),...await page.evaluate(()=>({scroll:document.documentElement.scrollWidth,themeValue:document.documentElement.dataset.theme,footerLinks:[...document.querySelectorAll('footer a')].map(e=>({text:e.textContent,href:e.getAttribute('href')})),h1:document.querySelector('h1')?.textContent}))});}}}
|
||||
await page.setViewportSize({width:1440,height:900});await page.goto(b+'/');await page.getByRole('combobox',{name:'Тема'}).selectOption('light');await page.locator('#search').scrollIntoViewIfNeeded();r.homeField=await page.locator('#search').evaluate(e=>({width:e.clientWidth,bounding:e.getBoundingClientRect().width}));await page.screenshot({path:o+'/home-field-1440.png'});await page.locator('#search').fill('Bitrix');r.positive=await page.locator('.journal-list .index-entry').count();await page.locator('#search').fill('нетсовпадений');r.zero=await page.locator('.search-status').innerText();await page.getByRole('button',{name:'Сбросить поиск',exact:true}).click();r.reset=await page.locator('#search').inputValue();await page.getByRole('combobox',{name:'Тема'}).selectOption('dark');await page.reload();r.persist=await page.getByRole('combobox',{name:'Тема'}).inputValue();await page.goto(b+'/ui-kit/');await page.locator('#search').scrollIntoViewIfNeeded();r.kitField=await page.locator('#search').boundingBox();await page.screenshot({path:o+'/kit-field-1440-dark.png'});
|
||||
await page.goto(b+'/tools/');await page.locator('#json').fill('{bad');await page.getByRole('button',{name:'Форматировать',exact:true}).click();r.jsonError=await page.locator('#json-status').innerText();await page.screenshot({path:o+'/json-error-dark.png',fullPage:true});
|
||||
await page.setViewportSize({width:390,height:900});await page.goto(b+'/category/dlang/');r.catalogDate=await page.locator('time').first().innerText();await page.screenshot({path:o+'/catalog-date-390-dark.png'});
|
||||
await page.goto(b+'/articles/'+encodeURIComponent('dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол')+'/');const fig=page.locator('figure').first();await fig.scrollIntoViewIfNeeded();await fig.locator('img').evaluate(e=>e.decode());await page.screenshot({path:o+'/gc-figure-390-dark.png'});
|
||||
await page.goto(b+'/accessibility/');await page.keyboard.press('Tab');r.skipFocus=await page.evaluate(()=>({text:document.activeElement.textContent,outline:getComputedStyle(document.activeElement).outlineStyle}));
|
||||
return r;
|
||||
}
|
||||
)(page);
|
||||
```
|
||||
### Page
|
||||
- Page URL: http://127.0.0.1:50480/accessibility/
|
||||
- Page Title: Доступность и чтение — ProgCode
|
||||
### Events
|
||||
- New console entries: .playwright-cli/console-2026-10-27T02-00-54-282Z.log#L1
|
||||
Reference in new issue
Block a user