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 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
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/README.txt src/hg/utils/docent/tests/regress/README.txt index df58a6e4934..68bf0cced2c 100644 --- src/hg/utils/docent/tests/regress/README.txt +++ src/hg/utils/docent/tests/regress/README.txt @@ -171,15 +171,48 @@ carries a per-run `hub__` prefix on every row id and every map box, so `rows:` matches by suffix and a `has:` selector has to use a substring (`area[href*="clinvarSubLolly"]`), never an exact id. **Do not assert a count that a data update can move.** rm38042 and rm36048 both read the spanned-item merge box, and the tooltip on it counts the items merged -- 45 for ClinVar on 2026-09-12. That number is reloaded by an otto cron every month. Both scripts assert that the box is THERE (`area[data-tooltip^="Merged "]`) and leave the count to a comment, so a red morning is news about quickLift rather than about ClinVar. **A details page carries the track's own labels, so name something else.** rm36125 asserts SHH's N-terminal peptide, rm36059 a UniProtKB section, rm36370 two section headings that were missing, rm38146 the query sequence read out of a two bit file. Each of those is absent from the page the ticket was filed about and present on the fixed one; the track name and longLabel are on both. + +Ten for hgTrackUi, and what makes that page testable +------------------------------------------------------ + +rm20460, rm32263, rm34651, rm35906, rm36484, rm36668, rm36917, rm37130, rm37282 and +rm37743 are one batch, written 2026-09-12. 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. + +They are also the cheapest scripts in the directory -- one to three seconds each, because +hgTrackUi draws no image and most of them never leave it. + +**There is no track image, so `rows:` is not available and a positive `text:` is +mandatory.** A crash gives the browser an empty document, where every `noText:` and every +`noHas:` passes. Every script here names something the real page says. + +**Most of what hgTrackUi does is in ids, names and classes, so `has:`/`noHas:` carries +these tests.** README says to reach for a selector last, and that is still right for +hgTracks, where rows, height, text and color can usually say it instead. On a settings +page the bug often IS the markup: a shared id that should be per-track (rm34651), a stray +tag inside a select (rm36484), a control that should not be offered for this track type +(rm20460), a class that greys a dropdown (rm37282). Name the id or class the commit +changed, and say in the header which one it is. + +**A cart round trip is what tells a control that works from one that only looks right.** +rm35906's clear-filters button set every dropdown to All on screen on the buggy build too; +only submitting and coming back shows whether anything was saved. rm36668 does the same in +reverse, checking after the fact that the two checkboxes it clicked really are on. + +**A dropdown cannot be driven.** Docent has no verb that picks an option from a select, so +a visibility is set on the way in through the URL (rm36668) and a button is clicked +instead where one exists (rm36917, rm37282).