4bf8479a43a493e2899953b7358c9464abbc3959
braney
  Wed Sep 23 17:15:55 2026 -0700
docent: regression scripts load sessions from text files, not from one machine's hgcentral, refs #38252

A named session runs only on the machine whose hgcentral holds it, so hgwbeta and the RR
answered "Could not find session".  The sessions are now text files in
regress/sessionFiles, saved with hgSession's own save to file, and the scripts load them
by raw GitHub URL.  rm36805, rm35580 and rm36340 pass on genome-test and hgwbeta.

rm36340's session held its custom tracks as a customTrash table on genome-test.  The
track source is a file of its own now, loaded through hgt.customText, without two
commented-out tracks whose URLs carry a password.  Its first check now asks for a custom
track row and the hub's row, and fails when the session file does not load.

A lifted session cannot be a file: it names its quickLift hub by a path on the server
that made it, and re-pointing it does not work (#38046).  rm37388, rm37389 and rm38272
build that lift in steps instead, the GenArk GCA_018466835.2 mitochondrion lifted to hg38,
and pass on genome-test and hgwbeta.  rm38272 also fails on genome.ucsc.edu (v503) at its
settings page, with the bug's own error, so it gains a release-ab proof line.

diff --git src/hg/utils/docent/tests/regress/rm36805.docent.yaml src/hg/utils/docent/tests/regress/rm36805.docent.yaml
index 07d2211188b..294a24c996e 100644
--- src/hg/utils/docent/tests/regress/rm36805.docent.yaml
+++ src/hg/utils/docent/tests/regress/rm36805.docent.yaml
@@ -1,51 +1,53 @@
 # #36805 -- clicking a TOGA item a SECOND time hung the display.
 #
 # Reported by Hiram on mm10: turn on only "TOGA vs hg38", click an item to get the details
 # pop-up, dismiss it, click any item again, and the display hangs. Gerardo's recipe on the
 # ticket is exact and is what this follows: load the session, click
 # ENST00000518529.SFTA3.1, click the x on the pop-up, click the same item again.
 #
 # This is the first script here that does anything TWICE. Everything else in the suite is a
 # straight line from a fresh cart: reset, a few steps, assert. A bug that only exists on the
 # repeat is invisible to that shape, and there are at least two of them in the pool (#36805
 # and #37014). One click of this item passes on the broken build as happily as on the fixed
 # one, so the second click is not a flourish, it IS the test.
 #
 # raw: true on the click is the other half. Docent's ordinary item click follows the item's
 # own map-box href straight to hgc, which is the right thing when the assertion is about the
 # details PAGE. Here the bug is in the DIALOG: hgTracks answers a real click with an ajax
 # pop-up (popUpHgcOrHgGene.hgc in hg/js/hgTracks.js), and following the href never opens one,
 # so it could never see this. raw: presses the mouse where a user presses it and lets the
 # page do what it does.
 #
 # :visible matters on both checks. jQuery UI HIDES #hgcDialog on close, it does not remove
 # it, so a bare has: "#hgcDialog" would match the closed dialog and the second assertion
 # would pass without the pop-up ever coming back.
 #
 # No build left to watch this fail on: fixed for v492 in December 2025, so hgwbeta and the
 # RR have had it for months.
 proof:
   - "assertion-only 2026-09-06 -- written from the ticket after the fix had shipped"
 
 target: genome-test
 db: mm10
 reset: true
 fast: true
 steps:
-  - loadSession: {user: Gerardo, name: RM_36805_TOGA_hangs}
+  # Gerardo/RM_36805_TOGA_hangs, saved as a text file (sessionFiles/README.txt) so the script
+  # runs on any server, not only the one whose hgcentral holds the session.
+  - loadSession: "https://raw.githubusercontent.com/ucscGenomeBrowser/kent/master/src/hg/utils/docent/tests/regress/sessionFiles/RM_36805_TOGA_hangs.txt"
 
-  # A session that has gone away is not an error -- hgTracks serves a 200 with no image and
+  # A session that did not load is not an error -- hgTracks serves a 200 with no image and
   # every noText on it passes -- so the row check is what says the session really loaded.
   - expect: {noText: "Could not find session", rows: [HLTOGAannotvHg38v1]}
 
   - click: {track: HLTOGAannotvHg38v1, item: "ENST00000518529.SFTA3.1", raw: true}
   - expect: {has: "#hgcDialog:visible"}
 
   # The x button, which is the gesture the ticket names. Scoped to the visible dialog: the
   # page carries more than one jQuery UI dialog in its DOM.
   - click: '.ui-dialog:visible .ui-dialog-titlebar-close'
   - expect: {noHas: "#hgcDialog:visible"}
 
   # The whole point. Same item, same gesture, second time.
   - click: {track: HLTOGAannotvHg38v1, item: "ENST00000518529.SFTA3.1", raw: true}
   - expect: {has: "#hgcDialog:visible"}