Harden auth/vault path sanitization and clean WeKnora docs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { chromium } = require('playwright');
|
||||
const { loginViaAuthForm } = require('./lib/browser-auth-login');
|
||||
(async () => {
|
||||
const browser = await chromium.launch({ headless: true, args: ['--no-sandbox'] });
|
||||
const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
|
||||
@@ -8,12 +9,11 @@ const { chromium } = require('playwright');
|
||||
const testErrors = [];
|
||||
page.on('pageerror', err => testErrors.push(err.message));
|
||||
|
||||
// Login
|
||||
// 7-76:标准表单登录(无快速登录按钮)
|
||||
await page.goto('http://localhost:3000/auth', { waitUntil: 'domcontentloaded' });
|
||||
await page.waitForTimeout(2000);
|
||||
const qlBtn = await page.locator('text=测试账号快速登录').count();
|
||||
if (qlBtn > 0) {
|
||||
await page.click('text=测试账号快速登录');
|
||||
if (await page.locator('#account').count()) {
|
||||
await loginViaAuthForm(page, { baseUrl: 'http://localhost:3000', gotoAuth: false });
|
||||
await page.waitForTimeout(3000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user