79aa96ab96eaf59b3d4779e60b9e5a4f012884f3
braney
  Sun Sep 6 15:04:38 2026 -0700
docent: three scripts that assert a value rather than the shape of a page

34 scripts, all green.

I told Brian this class had no coverage.  That was wrong, and the correction
matters more than the three scripts: rm36061 already asserts five fields off a
Decipher hgc page, rm37615 asserts an exact lifted coordinate and names the
source coordinate in noText:, and rm37326 asserts a CRISPR score triple.  What is
thin is not value assertions, it is value assertions anywhere other than an hgc
page reached by clicking an item.  These three are each somewhere else.

rm37489  a lifted track printed the TEMPLATE of its dataVersion setting,
"/gbdb/$D/bbi/clinvar/version.txt", where a release date belongs.
The positive check is the prefix "ClinVar Release:" only -- the date
after it changes every month and asserting it would fail on the next
ClinVar update, which is not a regression.
rm36810  trackDb's `urls` statement stopped turning data fields into links.
The assertion is the HREF, a value the browser BUILT from the data
rather than text it copied, and it asks for /clinvar/RCV specifically:
every ClinVar hgc page carries NCBI links in its boilerplate, so a
bare ncbi.nlm.nih.gov would have passed on the broken page.  Measured:
exactly one RCV link on the page, and it is the substituted one.
rm35865  hgGene's Microarray Expression Data section was empty.  The heading is
on the page either way, so the two data set names under it are the
check.  First script here to open hgGene at all.

Three things learned, all in the script comments.  A lifted session cannot be
reused: Gerardo's RM_37489 comes back as plain hg38 with no hub_ prefix on
anything, because a lift dies with the trash it points at, so a script that needs
one has to make it.  A lifted composite has no hgTrackUi link for its subtrack --
every settings link points at the container, and there are four of them.  And
hgGene writes its sections with style='display:none', so expect: text cannot see
the contents until the + is clicked; a has: written to dodge that would have
passed on the empty page the ticket is about.

Nothing in these three names a transcript accession or a variant accession.
Those are data, and the next knownGene or ClinVar build can retire them.  Items
are taken by gene symbol or by position instead.

refs #38252

diff --git src/hg/utils/docent/tests/regress/rm35865.docent.yaml src/hg/utils/docent/tests/regress/rm35865.docent.yaml
new file mode 100644
index 00000000000..8fffb60b5b9
--- /dev/null
+++ src/hg/utils/docent/tests/regress/rm35865.docent.yaml
@@ -0,0 +1,50 @@
+# #35865 -- the Microarray Expression Data section of hgGene was empty on hg19 and hg38.
+#
+# A user wrote in (#35845) because hg18 showed expression data for a gene and hg38 showed
+# the section heading with nothing under it. The section was there; what was missing was
+# everything in it.
+#
+# So the assertion cannot be the heading. A page with the heading and no data is exactly
+# what was reported, and "Microarray Expression Data" is on it either way. The two data set
+# names under the heading are the check: GNF Expression Atlas 2 and the Gladstone set are
+# what the section is supposed to list, and neither can appear unless hgGene found data to
+# put there.
+#
+# This is also the first script here that opens hgGene at all. The suite reaches hgTracks,
+# hgTrackUi, hgc, hgSearch, hgCustom, hgConvert and hgPhyloPlace; hgGene had no coverage.
+#
+# The gene is reached by its coordinates and a click, not by pasting the hgGene URL from
+# the ticket. That URL names a transcript (ENST00000269305.9), and a transcript accession is
+# data: the next knownGene update can retire it and the script would then fail for a reason
+# that is not a bug. Clicking by POSITION rather than by item name keeps the same accession
+# out of the click. TP53's window on hg38 is a genome coordinate, which does not move.
+target: genome-test
+db: hg38
+reset: true
+fast: true
+position: chr17:7668421-7687490
+steps:
+  - go: chr17:7668421-7687490
+  - hide: all
+  - track: {knownGene: pack}
+  - expect: {rows: [knownGene], noText: "Warning/Error"}
+
+  # By TITLE, which for knownGene is the gene symbol. Not by item:, which would be the
+  # transcript accession this script is trying to avoid, and not by position: a positional
+  # click looks for a box carrying an hgc href, and knownGene's boxes link to hgGene, so
+  # areaXY finds nothing at all there.
+  - click: {track: knownGene, title: "TP53"}
+  - expect: {url: "hgGene", text: "TP53"}
+
+  - expect: {text: "Microarray Expression Data"}
+
+  # The section is COLLAPSED when hgGene draws it: its table is written with
+  # style='display:none' and opened by the + button beside the heading. Its contents are in
+  # the DOM the whole time, but expect: text reads innerText, which leaves out anything
+  # hidden -- so without this click the two checks below fail on a perfectly good page, and
+  # a has: written to dodge that would pass on the empty page the ticket is about. Clicking
+  # the + is also what the user in #35845 did.
+  - click: '#microarrayBtn'
+
+  - expect: {text: "GNF Expression Atlas 2"}
+  - expect: {text: "Gladstone Microarray Data"}