Files
action-topology-engine/tests/fixtures/context-risk.html
2026-06-16 18:53:41 +08:00

89 lines
3.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Topology Context Risk Fixture</title>
<style>
body { font-family: system-ui, sans-serif; margin: 24px; }
table { border-collapse: collapse; margin: 16px 0; }
th, td { border: 1px solid #ccc; padding: 8px 10px; }
button, input, select, a { margin: 4px; padding: 6px 10px; }
[role="dialog"] { display: none; border: 1px solid #999; padding: 16px; margin-top: 16px; }
[role="dialog"].open { display: block; }
#toast { margin-top: 16px; min-height: 24px; }
</style>
</head>
<body>
<h1>Accounts</h1>
<nav aria-label="Primary">
<a href="#overview" data-testid="overview-link">Overview</a>
<a href="#reports" data-testid="reports-link">Reports</a>
</nav>
<section aria-labelledby="customers-heading">
<h2 id="customers-heading">Customers</h2>
<table aria-label="Customer accounts">
<thead>
<tr><th>Name</th><th>Status</th><th>Action</th></tr>
</thead>
<tbody>
<tr>
<td>Acme Co</td>
<td>Active</td>
<td><button data-testid="edit-acme" onclick="openEditor('Acme Co')">Edit</button></td>
</tr>
<tr>
<td>Beta LLC</td>
<td>Trial</td>
<td><button data-testid="edit-beta" onclick="openEditor('Beta LLC')">Edit</button></td>
</tr>
</tbody>
</table>
</section>
<form aria-label="Search customers" action="/search" method="get">
<label>
Query
<input name="q" placeholder="Search customers" required maxlength="40" />
</label>
<label>
Segment
<select name="segment">
<option value="">Any</option>
<option value="active">Active</option>
<option value="trial">Trial</option>
</select>
</label>
<button type="submit">Submit search</button>
</form>
<button disabled data-testid="disabled-open">Open disabled panel</button>
<button data-testid="open-settings" onclick="document.getElementById('settings-dialog').classList.add('open')">Open settings</button>
<section id="settings-dialog" role="dialog" aria-modal="true" aria-label="Settings dialog">
<h2>Settings</h2>
<button data-testid="save-settings" onclick="document.getElementById('toast').textContent='Saved settings'">Save</button>
<button data-testid="delete-account">Delete account</button>
<button data-testid="close-settings" onclick="document.getElementById('settings-dialog').classList.remove('open')">Close</button>
</section>
<section id="editor" role="dialog" aria-modal="true" aria-label="Customer editor">
<h2 id="editor-title">Customer editor</h2>
<label>
Customer name
<input id="customer-name" name="customerName" required />
</label>
<button data-testid="close-editor" onclick="document.getElementById('editor').classList.remove('open')">Close editor</button>
</section>
<p id="toast" role="status"></p>
<script>
function openEditor(name) {
document.getElementById("customer-name").value = name;
document.getElementById("editor-title").textContent = "Editing " + name;
document.getElementById("editor").classList.add("open");
}
</script>
</body>
</html>