feat(S2-P7+S3-P8): 行为断言6试点全绿+RTL28文件迁移/回归1009-1009
Deploy to GitHub Pages / deploy (push) Failing after 2m30s
Regression / regression (push) Failing after 53s

P7: tests/_behaviors.js新建(8动词+@input/@doc定位+同步pump+page-load
    幂等缓存); _runtime聚合+重载清缓存; _template引入; 6演示页标注;
    79测试页重生成。关键修:runner兜底重跑致行为二轮误报,加缓存解决。
P8: tools/migrate-rtl.mjs新建(白名单dry-run/--write); 28个CSS转逻辑
    属性;物理清零(排除auto/拼接/居中14处人工例外);三页RTL零溢出。
回归:100%(79/79页,1009/1009断言,N/A 35)。
This commit is contained in:
aurora-admin
2026-09-14 03:37:08 +08:00
parent f73ed394f4
commit 7e3d442dab
119 changed files with 486 additions and 53 deletions
+9
View File
@@ -536,6 +536,14 @@
try { a.node.setAttribute('data-status', a.status); } catch (e) {}
});
asserts = asserts.concat(matrix());
/* S2-P7 行为断言:真实点击/输入/键盘后的状态变化(仅 6 试点组件产出) */
try {
if (window.__aaBehaviors && window.__aaBehaviors.run) {
asserts = asserts.concat(window.__aaBehaviors.run({ slug: SLUG, root: scope(), win: win(), doc: doc() }));
}
} catch (e) {
asserts.push({ id: 'matrix:behavior:engine-error', status: 'fail', ms: 0, err: '行为引擎异常: ' + (e && e.message || e) });
}
var totalMs = Math.round(performance.now() - t0);
renderResults(asserts);
@@ -641,6 +649,7 @@
if (reload) reload.addEventListener('click', function () {
if (!frame) return;
fDoc = null; fWin = null;
try { window.__aaBehCache = null; } catch (e) {} // 演示页重载后行为断言需重跑(此前缓存会返回 stale 结果)
setFrameState('加载中…');
frame.setAttribute('src', frame.getAttribute('src'));
});