upgrade: adopt V8.33.1 — final merge, our patches upstreamed natively
V8.33.0 absorbed our entire platform patch set as native features (discovery/env_for macro override/blocks.css priority/type-mapping fix/ frontend entries/locale override) and synced trade-pro from our remote; V8.33.1 adds HESU PIPE industrial-theme home fixes (1.3.1). Zero patch re-application this round — all verified native. Theme suites 35/35; full run 428 passed + same 10 known Windows env fails (FAILED set unchanged). Live: container 8.33.1-dev.1 healthy, hesupipe 192 entries intact, trade-pro build 203 pages 0 errors. Patch registry retired to archive — future upgrades are plain overlay. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""Isolated Chromium smoke of shipped standalone theme comparison; no real server."""
|
||||
import asyncio,json
|
||||
from pathlib import Path
|
||||
from playwright.async_api import async_playwright
|
||||
ROOT=Path(__file__).resolve().parents[1];REPORT=ROOT/'reports/v833';REPORT.mkdir(parents=True,exist_ok=True)
|
||||
async def main():
|
||||
async with async_playwright() as p:
|
||||
browser=await p.chromium.launch(headless=True,executable_path='/usr/bin/chromium',args=['--no-sandbox','--disable-dev-shm-usage'])
|
||||
records=[]
|
||||
for device,width in (('desktop',1365),('phone',390)):
|
||||
page=await browser.new_page(viewport={'width':width,'height':850},device_scale_factor=1)
|
||||
errs=[];page.on('pageerror',lambda e:errs.append(str(e)))
|
||||
html=(ROOT/'examples/V8_33_五套主题真实页面_离线交互预览.html').read_text(encoding='utf-8')
|
||||
await page.set_content(html,wait_until='load',timeout=60000)
|
||||
await page.select_option('#theme','trade-pro')
|
||||
await page.select_option('#page','product')
|
||||
await page.frame_locator('#preview').locator('.sf-tp-product-hero').wait_for(state='visible',timeout=12000)
|
||||
await page.wait_for_timeout(1600)
|
||||
if device=='phone':await page.locator('[data-width="390px"]').click()
|
||||
title=await page.title()
|
||||
count=await page.frame_locator('#preview').locator('.pro-trade-pro').count()
|
||||
overflow=await page.evaluate('document.documentElement.scrollWidth>window.innerWidth')
|
||||
img=REPORT/f'trade-pro-{device}.png'
|
||||
await page.screenshot(path=str(img),full_page=True)
|
||||
assert count>0,(device,'theme body missing')
|
||||
assert not overflow,(device,'overflow')
|
||||
assert not errs,(device,errs)
|
||||
records.append({'device':device,'width':width,'theme_body_found':count,'horizontal_overflow':overflow,'script_errors':errs,'screenshot':str(img.relative_to(ROOT))})
|
||||
await page.close()
|
||||
await browser.close()
|
||||
(REPORT/'browser-results.json').write_text(json.dumps(records,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||
print('Chromium PASS:', records)
|
||||
if __name__=='__main__':asyncio.run(main())
|
||||
Reference in New Issue
Block a user