Update: 将子项目从 submodule 转为完整内容
- 移除 GovAI, nomifun-tauri, 算力盒子 的 submodule 引用 - 添加所有子项目的完整源代码 - 保留原始 .git 为 .git.bak 备份
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>P2 F3 multi-step e2e form</title>
|
||||
<style>
|
||||
html, body { margin: 0; padding: 0; font: 16px sans-serif; }
|
||||
/* 所有可交互元素固定在视口内 + 大尺寸,让 facade 经真实 getContentQuads 稳定命中
|
||||
(无 DPR、不依赖滚动)。 */
|
||||
form#signup { margin: 8px; }
|
||||
#signup label { display: block; margin: 6px 0; }
|
||||
#username, #password { display: block; width: 280px; height: 32px; margin: 4px 0; }
|
||||
#plan { display: block; width: 280px; height: 32px; margin: 4px 0; }
|
||||
#submit { display: block; width: 240px; height: 40px; margin: 8px 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>P2 F3 e2e form</h1>
|
||||
<!--
|
||||
F3 端到端多步 fixture(facade BrowserTool::execute 真 Chrome 跑):
|
||||
navigate → observe → type username → type password → select_option plan → click submit。
|
||||
submit 按钮 accname 含 "Submit"(→ facade redline classify_action 判 Irreversible):
|
||||
- yolo/审批旁路会话 click submit → facade redline 门 hard-deny Blocked(红线生效证据);
|
||||
- 普通会话 click submit → 门不拦(交 orchestration),表单真提交 → onsubmit 写可见标记。
|
||||
onsubmit preventDefault(不真导航),把提交时捕获的 username + 所选 plan 写进 #form-status(role=status,
|
||||
aria 可观测),证明 type/select 真写入 + click submit 真触发。password 值不回显(脱敏精神)。
|
||||
-->
|
||||
<form id="signup" action="javascript:void(0)">
|
||||
<label>Username <input id="username" name="username" type="text" autocomplete="username"></label>
|
||||
<label>Password <input id="password" name="password" type="password" autocomplete="new-password"></label>
|
||||
<label>Plan
|
||||
<select id="plan" name="plan" aria-label="Plan">
|
||||
<option value="free">Free</option>
|
||||
<option value="pro">Pro</option>
|
||||
<option value="enterprise">Enterprise</option>
|
||||
</select>
|
||||
</label>
|
||||
<button id="submit" type="submit" aria-label="Submit order">Submit order</button>
|
||||
</form>
|
||||
|
||||
<!-- 提交后的可见标记(aria 可观测:role=status)。初始 idle。 -->
|
||||
<div id="form-status" role="status" aria-label="form status">idle</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('signup').addEventListener('submit', function (e) {
|
||||
e.preventDefault();
|
||||
var u = document.getElementById('username').value;
|
||||
var p = document.getElementById('plan').value;
|
||||
// 把提交时捕获的 username + plan 写进可见标记(证明 type/select 真写入 + submit 真触发);
|
||||
// 不回显 password 值(脱敏精神)。
|
||||
document.getElementById('form-status').textContent = 'submitted:' + u + ':' + p;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><meta charset="UTF-8"><title>Products Table</title></head>
|
||||
<body>
|
||||
<h1>Product Catalog</h1>
|
||||
<table id="products">
|
||||
<thead>
|
||||
<tr><th>Name</th><th>Price</th><th>In Stock</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Widget A</td><td>$9.99</td><td>Yes</td></tr>
|
||||
<tr><td>Gadget B</td><td>$19.50</td><td>No</td></tr>
|
||||
<tr><td>Doohickey C</td><td>$4.25</td><td>Yes</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>F1-sec redline gate facade test</title>
|
||||
<style>
|
||||
html, body { margin: 0; padding: 0; font: 16px sans-serif; }
|
||||
button { display: block; margin: 12px; padding: 8px 16px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>F1-sec redline gate</h1>
|
||||
<!--
|
||||
F1-sec facade 集成测试用:一个不可逆(accname="Pay now")按钮 + 一个良性("Show more")按钮。
|
||||
facade 的 redline 门据 observe 的 accname 分类 click:
|
||||
- yolo/companion(审批旁路)会话点 "Pay now" → hard-deny Blocked(证 fail-open 已闭);
|
||||
- 普通会话点 "Pay now" → 门不拦(交 orchestration)。
|
||||
用 file:// fixture(非 data: URL),与其它集成测试同接线,避免 data: URL 解析坑。
|
||||
-->
|
||||
<button id="pay" aria-label="Pay now">Pay now</button>
|
||||
<button id="more" aria-label="Show more">Show more</button>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Site Memory Fixture</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Site Memory Test Page</h1>
|
||||
<button id="action-btn" aria-label="Perform Action">Perform Action</button>
|
||||
<a href="#help" id="help-link">Help Center</a>
|
||||
<div id="status">ready</div>
|
||||
<script>
|
||||
document.getElementById('action-btn').addEventListener('click', function() {
|
||||
document.getElementById('status').textContent = 'clicked';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>SoM fallback test</title>
|
||||
<!-- Stack the buttons vertically so the SoM overlay's (y, then x) numbering is
|
||||
deterministic: the topmost button ("Alpha") is always label 1. -->
|
||||
<style>
|
||||
button { display: block; margin: 12px; width: 200px; height: 36px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>SoM fallback test</h1>
|
||||
<!-- Real, accessible buttons → each gets an aria ref + a bounding box during observe.
|
||||
They set distinct results so the test can prove WHICH one the SoM click landed on. -->
|
||||
<button id="b-top" onclick="document.getElementById('result').textContent = 'top-clicked'">Alpha</button>
|
||||
<button id="b-mid" onclick="document.getElementById('result').textContent = 'mid-clicked'">Bravo</button>
|
||||
<button id="b-bot" onclick="document.getElementById('result').textContent = 'bottom-clicked'">Charlie</button>
|
||||
<div id="result" role="status">none</div>
|
||||
</body>
|
||||
</html>
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Visual Fallback Canvas Test</title>
|
||||
<style>
|
||||
body { margin: 0; padding: 0; }
|
||||
canvas { display: block; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- A canvas-only page with NO accessible button in the DOM.
|
||||
The "button" is drawn purely as pixels on the canvas.
|
||||
DOM/aria anchoring WILL FAIL for this element (no accessible tree entry).
|
||||
This exercises the visual fallback path. -->
|
||||
<canvas id="c" width="400" height="300"></canvas>
|
||||
<div id="click-result" style="display:none;"></div>
|
||||
<script>
|
||||
const canvas = document.getElementById('c');
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// Draw a "Submit" button at (150, 120) with size (100, 40).
|
||||
const btnX = 150, btnY = 120, btnW = 100, btnH = 40;
|
||||
|
||||
function drawButton() {
|
||||
ctx.fillStyle = '#4CAF50';
|
||||
ctx.fillRect(btnX, btnY, btnW, btnH);
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.font = '16px Arial';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.fillText('Submit', btnX + btnW / 2, btnY + btnH / 2);
|
||||
}
|
||||
drawButton();
|
||||
|
||||
// Listen for clicks on the canvas — if within the button bounds, record it.
|
||||
canvas.addEventListener('click', function(e) {
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const x = e.clientX - rect.left;
|
||||
const y = e.clientY - rect.top;
|
||||
if (x >= btnX && x <= btnX + btnW && y >= btnY && y <= btnY + btnH) {
|
||||
document.getElementById('click-result').textContent = 'canvas-button-clicked';
|
||||
document.getElementById('click-result').style.display = 'block';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user