mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-09 11:28:14 +08:00
Fix integration tests
This commit is contained in:
@@ -46,6 +46,6 @@ jobs:
|
||||
env:
|
||||
PYPPETEER_HOME: ./local-chromium
|
||||
|
||||
- run: python visual_regression_test.py --no-screenshot --sleep 3
|
||||
- run: python visual_regression_test.py --skip-screenshot --sleep 3
|
||||
env:
|
||||
PYPPETEER_HOME: ./local-chromium
|
||||
|
||||
@@ -165,9 +165,10 @@ async def take_screenshots(storage: optuna.storages.BaseStorage) -> List[str]:
|
||||
page = await browser.newPage()
|
||||
await page.setViewport({"width": args.width, "height": args.height})
|
||||
|
||||
await page.goto(f"http://{args.host}:{args.port}/dashboard/")
|
||||
time.sleep(1)
|
||||
await page.screenshot({"path": os.path.join(args.output_dir, "study-list.png")})
|
||||
if not args.skip_screenshot:
|
||||
await page.goto(f"http://{args.host}:{args.port}/dashboard/")
|
||||
time.sleep(1)
|
||||
await page.screenshot({"path": os.path.join(args.output_dir, "study-list.png")})
|
||||
|
||||
study_ids = {s._study_id: s.study_name for s in storage.get_all_study_summaries()}
|
||||
for study_id, study_name in study_ids.items():
|
||||
|
||||
Reference in New Issue
Block a user