Restore verified programmer archive with search, provenance and legacy URLs
Build and deploy / deploy (push) Successful in 1m5s
Build and deploy / deploy (push) Successful in 1m5s
This commit is contained in:
1 parent
089b949f4d
commit
681502465a
82 files changed
+8142
-5566
No files matched your search
@@ -0,0 +1,34 @@
|
||||
### Ran Playwright code
|
||||
```js
|
||||
await (async page => {
|
||||
const home='http://127.0.0.1:52964';
|
||||
await page.goto(home+'/');
|
||||
const links=await page.locator('.article-card').evaluateAll(es=>es.map(e=>e.getAttribute('href')));
|
||||
const checks=[];
|
||||
for(const width of [375,768]){
|
||||
await page.setViewportSize({width,height:844});
|
||||
for(const path of ['/', '/tools/',...links]){
|
||||
await page.goto(home+path);
|
||||
for(const img of await page.locator('img').all()){await img.scrollIntoViewIfNeeded();await img.evaluate(i=>i.decode());}
|
||||
const d=await page.evaluate(()=>({width:innerWidth,scroll:document.documentElement.scrollWidth,images:[...document.images].map(i=>({src:i.getAttribute('src'),ok:i.complete&&i.naturalWidth>0}))}));
|
||||
checks.push({path,...d});
|
||||
if(d.scroll>d.width)throw Error('overflow '+width+' '+path+' '+d.scroll);
|
||||
if(d.images.some(i=>!i.ok))throw Error('image failed '+path);
|
||||
}
|
||||
}
|
||||
await page.setViewportSize({width:390,height:844});
|
||||
await page.goto(home+links.find(s=>s.includes('bitrix-api-add-foto-editor')));
|
||||
await page.screenshot({path:'/tmp/progcode-mobile-article.png',fullPage:true});
|
||||
await page.goto(home+'/');
|
||||
await page.screenshot({path:'/tmp/progcode-mobile-home.png'});
|
||||
await page.setViewportSize({width:1440,height:1000});
|
||||
await page.screenshot({path:'/tmp/progcode-desktop-home.png'});
|
||||
console.log(JSON.stringify({checks},null,2));
|
||||
}
|
||||
)(page);
|
||||
```
|
||||
### Page
|
||||
- Page URL: http://127.0.0.1:52964/
|
||||
- Page Title: ProgCode.Ru — архив программиста
|
||||
### Events
|
||||
- New console entries: .playwright-cli/console-2026-10-26T11-20-01-464Z.log#L1
|
||||
Reference in new issue
Block a user