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/rm37489.docent.yaml src/hg/utils/docent/tests/regress/rm37489.docent.yaml new file mode 100644 index 00000000000..2b1adfae954 --- /dev/null +++ src/hg/utils/docent/tests/regress/rm37489.docent.yaml @@ -0,0 +1,50 @@ +# #37489 -- a quickLifted track showed the TEMPLATE of its dataVersion setting instead of +# the version. +# +# ClinVar's trackDb carries `dataVersion /gbdb/$D/bbi/clinvar/version.txt`, and the browser +# reads that file and prints what is in it. On a lifted track $D was never substituted, so +# the settings page showed the reader: +# +# Version: /gbdb/$D/bbi/clinvar/version.txt +# +# a path with an unexpanded variable in it, where a release date belongs. +# +# This is the first script here that asserts a VALUE rather than the shape of a page. +# Everything else says a row was drawn, or that a page does not carry an error. None of +# them would notice a track that draws perfectly and tells the reader something false, and +# that is most of what a data bug looks like. +# +# The positive check is the PREFIX only. "ClinVar Release:" is written by the pipeline and +# does not move; the date after it changes every month, and asserting it would make this +# script fail on the next ClinVar update, which is not a browser regression. noText: "$D" +# is the symptom itself, and it cannot stand alone: a page that failed to render carries no +# "$D" either. +# +# The lift is done here rather than loaded from Gerardo's RM_37489 session. That session +# still exists on genome-test but its quickLift is gone -- it comes back as plain hg38 with +# clinvarMain, clinvarCnv and clinvarSubLolly and no hub_ prefix on any of them. A lifted +# session dies with the trash it points at, so a script that needs a lift has to make one. +target: genome-test +db: hg38 +position: chr13:32396673-32400065 +reset: true +fast: true +steps: + - go: chr13:32396673-32400065 + - hide: all + - track: {clinvarMain: pack} + - expect: {rows: [clinvarMain]} + + - convert: {to: hs1, quicklift: true} + - open: lift + - expect: {rows: [clinvarMain], noText: "Warning/Error"} + + # The lifted COMPOSITE's settings page, which is where dataVersion is printed. Measured + # on genome-test: a lifted view carries no hgTrackUi link for the subtrack at all. Every + # settings link under ClinVar points at the container, g=hub_<n>_clinvar, and there are + # four of them on the page, so the first one is named explicitly rather than left to a + # selector that matches several. + - click: 'a[href*="hgTrackUi"][href*="_clinvar"] >> nth=0' + - expect: + text: "ClinVar Release:" + noText: "$D"