Add device labeling e2e test; add data-ip for reliable row targeting
CI / web (push) Successful in 17s
CI / api (push) Successful in 23s

First test run hit a bug in the test itself: Playwright's hasText
filter does substring matching, so IP 192.168.1.1 matched
192.168.1.10, 192.168.1.100, 192.168.1.171, etc -- flaky/wrong row
selection. Added a data-ip attribute to each row for exact targeting
instead of relying on text content.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 23:08:06 -06:00
parent 7a685b9bd8
commit b84fd373c2
2 changed files with 39 additions and 1 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ export function DeviceTable({
</thead>
<tbody>
{sorted.map((d) => (
<tr key={d.ip}>
<tr key={d.ip} data-ip={d.ip}>
<td>
<span className={`device-badge ${d.known ? "known" : "unknown"}`}>
{d.known ? "known" : "unknown"}