From 09616e31afd103c3c53822c0ad80fe8f6ebbf5dd Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 19 Nov 2025 16:50:35 -0800 Subject: [PATCH] Add a test to validate the structure of the heading nav This checks the entire structure of the heading nav for this test. It currently is not handling nesting properly. Having a large inline string like this may not be the easiest to maintain or be able to see the structure. I don't see a way to format it in goml. --- tests/gui/heading-nav-collapsed.goml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gui/heading-nav-collapsed.goml b/tests/gui/heading-nav-collapsed.goml index 003d7e68..8583b5fa 100644 --- a/tests/gui/heading-nav-collapsed.goml +++ b/tests/gui/heading-nav-collapsed.goml @@ -10,6 +10,8 @@ assert-text: (".current-header", "Heading 1") assert-attribute: ("li:has(> span > a[href='#heading-12'])", {"class": "header-item"}) assert-attribute: ("li:has(> span > a[href='#heading-21'])", {"class": "header-item"}) +assert-property: ("div.on-this-page", {"innerHTML": '
  1. Heading 1
    1. Heading 1.1
    2. Heading 1.2
      1. Heading 1.2.1
      2. Heading 1.2.2
  2. Heading 1.3
  3. Heading 2
    1. Heading 2.1
      1. Heading 2.1.1
        1. Heading 2.1.1.1
          1. Heading 2.1.1.1.1
'}) + // Click 1.2, expands it. click: "a.header-in-summary[href='#heading-12']" assert-attribute: ("li:has(> span > a[href='#heading-12'])", {"class": "header-item expanded"})