Served with isolation headers; start-screen capability notices; tests on the real GPU (t88 phase 1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
import pathlib, sys
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent.parent / 'tools'))
|
||||
from use_venv import ensure_playwright; ensure_playwright()
|
||||
from playwright.sync_api import sync_playwright
|
||||
from browser import launch, consume_gpu_option
|
||||
consume_gpu_option()
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parent.parent
|
||||
SHOTS = ROOT / 'shots'
|
||||
@@ -12,13 +13,11 @@ def check(name, ok):
|
||||
print(('PASS ' if ok else 'FAIL ') + name)
|
||||
if not ok: fails.append(name)
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch()
|
||||
page = browser.new_page(viewport={'width': 1280, 'height': 760})
|
||||
with launch() as (browser, page, url):
|
||||
errors = []
|
||||
page.on('pageerror', lambda e: errors.append(str(e)))
|
||||
page.add_init_script("localStorage.setItem('deepgrain.settings', JSON.stringify({look:'pixel', sv:2}));")
|
||||
page.goto((ROOT / 'dist/index.html').as_uri())
|
||||
page.goto(url)
|
||||
page.wait_for_function("!$('title').hidden")
|
||||
page.evaluate("startNewWorld(424242, 512, 384, 'Console test')")
|
||||
page.wait_for_function('GAME.running && !GAME.loading')
|
||||
|
||||
Reference in New Issue
Block a user