Fix integration tests

This commit is contained in:
c-bata
2021-04-11 18:46:57 +09:00
parent c378a1a60a
commit a07377be0f
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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
+4 -3
View File
@@ -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():