Add device labeling e2e test; add data-ip for reliable row targeting
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:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user