fix(runtime): e2e 发现的 3 个 bug 修复

- download: desktop_download_apps SingleChildScrollView 加 primary:true (Scrollbar 缺 ScrollPosition)
- contact-stores: checkDomainAvailability async 后 setState 加 mounted 保护 (dispose 后 setState)
- buy-service: _loadData 加 data 结构校验 + mounted 保护 (API 400 无效参数时 data 为错误结构 -> RangeError)
This commit is contained in:
2026-08-01 23:20:25 +08:00
parent 6d08db54a5
commit 944493a39b
195 changed files with 362929 additions and 3 deletions

32
tools/e2e/diag2.js Normal file
View File

@@ -0,0 +1,32 @@
// 诊断 v2打印完整 CK_STACK定位 framework 抛的错误的源头)
const { chromium } = require('playwright');
const BASE = 'http://127.0.0.1:8099';
const ROUTES = ['/buy-service/1/pos', '/download'];
(async () => {
const browser = await chromium.launch({ headless: true });
for (const route of ROUTES) {
const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } });
const page = await ctx.newPage();
const allLogs = [];
page.on('pageerror', e => allLogs.push(`PAGEERROR: ${e.stack || e.message}`));
page.on('console', m => allLogs.push(m.text()));
await page.goto(BASE + route, { waitUntil: 'load', timeout: 30000 }).catch(()=>{});
await page.waitForTimeout(5000);
console.log(`\n########## ${route} ##########`);
for (let i = 0; i < allLogs.length; i++) {
const l = allLogs[i];
if (l.startsWith('CK_ERROR:') || l.startsWith('PAGEERROR')) {
console.log('--- ' + l.slice(0, 150));
if (allLogs[i+1] && allLogs[i+1].startsWith('CK_STACK:')) {
// 打印堆栈里所有 flutter_wisetronic 帧
const proj = allLogs[i+1].match(/flutter_wisetronic\/[^\s]+/g) || [];
console.log(' 项目帧: ' + (proj.length ? [...new Set(proj)].join('\n ') : '(无)'));
}
}
}
await ctx.close();
}
await browser.close();
})();