31dd19d6395d10ee6632bb2afcf1947f33eff3dd
braney
  Sat Sep 12 16:03:40 2026 -0700
docent: ten regression tests for hgTrackUi, refs #38252

Four scripts here already touched hgTrackUi in passing (rm37389, rm37489,
rm38126, rm38272).  These are about the page itself: the superTrack
configuration page, composite and subtrack configuration, filters, the color
override, the parent link, and two bad-input paths.

rm20460  the color override is offered on a genePred track and not on a
chain track, which is the type restriction 6d78a8e2d72 added
rm32263  a composite child's page names its container, and the link reaches
the container's own configuration page
rm34651  the density-graph options div is densGraphOptions<track> and the
old shared id is gone
rm35906  Clear filters survives a submit: the cart comes back on All, which
is what the button only appeared to do before
rm36484  the filterComposite select has no stray <br> inside it
rm36668  both the rearrangement and density-graph checkboxes on, submitted
together, does not crash hgTracks
rm36917  the superTrack page's Hide all / Show all / Apply to all controls,
and Show all leaving no child hidden
rm37130  under noParentConfig both filters are on the jaspar child page and
neither is on the parent
rm37282  Hide all greys the superTrack's own dropdown, and a child's Hide
does not force the container back to show
rm37743  a dup_1_refGene request with nothing in the cart errAborts with a
message naming it, instead of taking a SIGSEGV

All ten are assertion-only.  make test is 67 of 67 green: the suite went from
57 scripts to 67 for 14 extra seconds, 10m32s in total, because hgTrackUi draws
no image and most of these never leave it.

README.txt gains the four things the batch settled.  No track image means rows:
is unavailable and a positive text: is mandatory, since a crash hands the
browser an empty document where every noText: passes.  Most hgTrackUi bugs ARE
the markup, so naming the id or class the commit changed is the right check
here, unlike on hgTracks.  A cart round trip is the only way to tell a control
that works from one that looks right.  And Docent cannot pick an option from a
select, so a visibility goes in through the URL and a button is clicked wherever
one exists.

Two candidates were rejected: #38192's missing-track message is live but the
ticket is still Reviewing, and #37840's "add db= to links" is not true of every
link on the page today, so a blanket assertion would fail for a reason that is
not a bug.

diff --git src/hg/utils/docent/tests/regress/rm35906.docent.yaml src/hg/utils/docent/tests/regress/rm35906.docent.yaml
new file mode 100644
index 00000000000..9733182924b
--- /dev/null
+++ src/hg/utils/docent/tests/regress/rm35906.docent.yaml
@@ -0,0 +1,44 @@
+# #35906 -- the "Clear filters" button on hgTrackUi looked like it worked and did not.  It
+# set every filter dropdown to All on screen, and a Submit saved nothing: the track came
+# back with its old filters, and for the gnomAD v4.1 track Jairo reported an empty view.
+#
+# The dropdowns are the dropdownchecklist widget, which draws its own checkboxes over a
+# hidden <select> and syncs the two.  e4d45c038f7 adds the line the clear path was missing:
+#
+#     self.sourceSelect.trigger("change", 'ddcl_internal');
+#
+# so the real select is told as well, and a Submit has something to save.
+#
+# That is why this script submits and comes back.  The bug is invisible on the page where
+# the button is clicked -- the checkboxes all read All either way -- and only the round
+# trip through the cart can tell the two builds apart.  The assertion is on the SELECTED
+# attribute the server writes into the reloaded page, which is the cart's own answer.
+#
+# gnomAD v4.1.1 Genomes is the ticket's track.  Its FILTER dropdown comes up on PASS from
+# trackDb rather than on All, which is what makes it a filter worth clearing: a field that
+# already reads All would pass this test on any build.
+proof:
+  - "assertion-only 2026-09-12 -- written from the ticket and from e4d45c038f7, after the fix shipped"
+
+target: genome-test
+db: hg38
+position: chr17:43044295-43045295
+reset: true
+fast: true
+steps:
+  - goto: "/cgi-bin/hgTrackUi?db=hg38&g=gnomadGenomesVariantsV4_1"
+  - expect:
+      has:
+        - '#filterClearButton'
+        - 'select[name="gnomadGenomesVariantsV4_1.filterBy.FILTER"]'
+      noHas: 'select[name="gnomadGenomesVariantsV4_1.filterBy.FILTER"] option[value="All"][selected]'
+
+  - click: '#filterClearButton'
+  - click: '#Submit'
+
+  # Back to the settings page, which is now reading the cart rather than the trackDb
+  # default.  On the build this was filed against the FILTER dropdown came back on PASS.
+  - goto: "/cgi-bin/hgTrackUi?db=hg38&g=gnomadGenomesVariantsV4_1"
+  - expect:
+      has: 'select[name="gnomadGenomesVariantsV4_1.filterBy.FILTER"] option[value="All"][selected]'
+      text: "gnomAD v4.1.1 Genomes"