bcfcb704e8296f881896ee6197365ae719ea61d6 braney Wed Sep 23 11:06:11 2026 -0700 docent: rm38283 finds the container link by its text and a delimiter, refs #38252 #38283 Since 09f26ed9a7d (#38380) the page adds &hgsid= to every cgi-bin link, so the description page's link no longer ends with the track name and the $= check failed. A plain *= would pass without the substitution, because hgc prints its own hgTrackUi and hgTables links that name the composite. So the check now requires the fixture's link text, and "&" or the end of the href after the name. The delimiter matters because _rm38283Super is a prefix of _rm38283SuperKid. Passes on genome-test. Fails at step 5 on the v503 docker image, and fails when either check is pointed at a wrong name or a prefix of the right one. diff --git src/hg/utils/docent/tests/regress/rm38283.docent.yaml src/hg/utils/docent/tests/regress/rm38283.docent.yaml index 83f54d656b4..40c8c2c24aa 100644 --- src/hg/utils/docent/tests/regress/rm38283.docent.yaml +++ src/hg/utils/docent/tests/regress/rm38283.docent.yaml @@ -51,40 +51,49 @@ - "release-ab 2026-09-17 -- fails on v503 and passes on genome-test (v504). v503_branch 707b184e329 built into ticket sandbox 38316, CGIs, js and htdocs: the hub description page emits no $parentTrack link to its container" target: genome-test db: hg38 position: chr17:7667000-7676000 reset: true fast: true steps: - hub: {url: "https://hgwdev.gi.ucsc.edu/~braney/docentFixtures/rm38283/hub.txt", db: hg38} - go: chr17:7667000-7676000 - expect: {rows: [rm38283Sub, rm38283SuperKid]} # hgc, for the subtrack that sits under a view inside a composite. - click: {track: rm38283Sub, item: itemA} - expect: - # $parentTrack skipped the view and named the composite. The href is matched at its - # END because the hub id in front of the name changes every run. - has: 'a[href$="_rm38283Comp"]' + # $parentTrack skipped the view and named the composite. The hub id in front of the + # name changes every run, so the name is matched after its "_". Since #38380 the page + # adds &hgsid= to every cgi-bin link, so the name is followed by "&" or by nothing. + # Two things keep this a test of the substitution and not of the page around it: + # the link text, because hgc prints its own hgTrackUi and hgTables links naming the + # composite, and the delimiter, because "_rm38283Super" below is a prefix of + # "_rm38283SuperKid". + has: >- + a:has-text("go to the container")[href*="_rm38283Comp&"], + a:has-text("go to the container")[href$="_rm38283Comp"] noHas: 'a[href*="rm38283View"]' - expect: {text: "DBIS hg38"} - expect: {text: "BRACEDDB hg38"} - expect: {text: "ORGANISMIS human"} - expect: {text: "HGSIDIS $hgsid"} - expect: {text: "DECOYS $5 $HOME ${notAVariable} $type $bigDataUrl and a bare $ sign"} # Follow the link the substitution built. hgTrackUi substitutes the same page through its # own call, so this step covers the second CGI as well as proving the link works. - click: 'a:has-text("go to the container")' - expect: url: hgTrackUi text: "rm38283 composite container" - expect: {text: "DECOYS $5 $HOME ${notAVariable} $type $bigDataUrl and a bare $ sign"} - expect: {text: "HGSIDIS $hgsid"} # And a superTrack child, where $parentTrack has a container of a different kind to name. - go: chr17:7667000-7676000 - click: {track: rm38283SuperKid, item: itemB} - expect: - has: 'a[href$="_rm38283Super"]' + has: >- + a:has-text("go to the container")[href*="_rm38283Super&"], + a:has-text("go to the container")[href$="_rm38283Super"] text: "DBIS hg38"