Fixed CI
Checks / test (push) Failing after 9m9s

This commit is contained in:
ab committed 2026-09-24 16:10:08 +03:00
1 parent 5b56b4a4cc
commit 7fdf4803ed
21 files changed
+49 -35

No files matched your search

+2 -2
View File
@@ -1,11 +1,11 @@
const {chromium}=require('playwright');
const assert=require('node:assert/strict');
const fs=require('node:fs');
const base=process.env.MEGURI_BROWSER_URL||'http://127.0.0.1:3000';
assert(['127.0.0.1','localhost'].includes(new URL(base).hostname));
fs.mkdirSync('test-results',{recursive:true});
(async()=>{
const browser=await chromium.launch({channel:process.env.MEGURI_BROWSER_CHANNEL||'chrome',headless:true});
const browser=await require('./support/browser.cjs').launchBrowser();
const errors=[];
async function login(name){const page=await browser.newPage({viewport:{width:1440,height:1050},timezoneId:'America/New_York'});page.setDefaultTimeout(10000);page.on('pageerror',e=>errors.push(e.message));await page.goto(base);await page.getByLabel('Username',{exact:true}).fill(name);await page.getByLabel('Password',{exact:true}).fill('meguri-demo-only');await page.getByRole('button',{name:'Sign in',exact:true}).click();await page.locator('.day').first().waitFor();return page;}
async function refresh(page){await page.reload();await page.locator('.day').first().waitFor();}