Skip to main content

max / makenotwork

Assert the line anchor as an id The two in-file tests asserted `data-value="L1"`, which is the row identity and not the anchor the link points at. They passed while every anchor on every file view pointed at nothing, which is the same defect the integration test caught and these did not.
Author: Max Johnson <me@maxj.phd> · 2026-09-03 12:43 UTC
Signed with PGP, not checked
Commit: 7775c87e3bc51d3721da4986ae6be9a312403d97
Parent: 604452d
1 file changed, +7 insertions, -3 deletions
@@ -527,8 +527,12 @@
527 527 },
528 528 );
529 529
530 - assert!(html.contains("data-value=\"L1\""), "{html}");
531 - assert!(html.contains("data-value=\"L2\""), "{html}");
530 + // `id`, not `data-value`. The link beside each number points at `#L2`,
531 + // and only an id is what `#L2` reaches -- `Cells::identified` is the
532 + // app's own name for a row and reaches the document as `data-value`,
533 + // which is what this asserted while every anchor pointed at nothing.
534 + assert!(html.contains("id=\"L1\""), "{html}");
535 + assert!(html.contains("id=\"L2\""), "{html}");
532 536 assert!(html.contains("href=\"#L2\""), "{html}");
533 537 }
534 538
@@ -554,7 +558,7 @@
554 558 },
555 559 );
556 560
557 - assert!(html.contains("data-value=\"L3\""), "{html}");
561 + assert!(html.contains("id=\"L3\""), "{html}");
558 562 assert!(html.contains(">three<"), "{html}");
559 563 }
560 564