fix(qa): 禁止后台验收启动系统 Google Chrome

This commit is contained in:
2026-12-01 20:20:59 +08:00
parent 4101b11aaf
commit e4712895f3
17 changed files with 73 additions and 32 deletions
+2 -2
View File
@@ -186,10 +186,10 @@ def protected_startup(browser,host):
if __name__=="__main__":
ap=argparse.ArgumentParser(description=__doc__);ap.add_argument("--host",type=loopback,default="127.0.0.1:5179")
ap.add_argument("--chrome",required=True);ap.add_argument("--out",type=Path)
ap.add_argument("--out",type=Path)
a=ap.parse_args()
if a.out: a.out.mkdir(parents=True,exist_ok=True)
with sync_playwright() as pw,pw.chromium.launch(executable_path=a.chrome,headless=True,args=CHROME_ARGS) as browser:
with sync_playwright() as pw,pw.chromium.launch(headless=True, args=CHROME_ARGS) as browser:
report={"light":boot(browser,a.host,a.out,False),"dark_reduced":boot(browser,a.host,a.out,True,True),
"journey":journey(browser,a.host,a.out),"asset_failure":failed_page(browser,a.host,a.out),"startup_guards":protected_startup(browser,a.host),"real_api_calls":0,"status":"PASS"}
print(json.dumps(report,ensure_ascii=False))