e040e51d90b1b7af95a56c14199e4238e6912b48 braney Sat Sep 5 09:21:54 2026 -0700 docent: the four regression scripts that were failing, now green These were written yesterday, failed, and were left out of the last commit so the suite stayed green. None of the four was a browser bug. Each was the test being wrong, and each was wrong in a way worth writing into the script. rm36387 had lost the bug. The term the ticket quotes carries a ZERO-WIDTH SPACE (U+200B) between "):" and "n.46G>A", which is how it arrived from a clinical report; hgTracks passed it to encodeURIComponent unstripped, hgSuggest put it in a LIKE, and MySQL died on a collation mismatch. Without that character there is no bug at all and the test passes on any build ever shipped, so the term is now written as a escape. The fixed behavior is also not what the test assumed: the position box submits to hgSearch, which reports no results for an HGVS term. The old script waited for #imgTbl and timed out. rm37805 sat at a position where the track cannot draw. gnomadGenomesVariantsV3_1_1 carries filterValuesDefault.annot pLoF,missense,synonymous, and all 258 v3.1.1 variants in chr17:43044295-43045295 are annotated "other", so the row does not exist. Moved to chr17:43091000-43092000, inside BRCA1 exon 11, which holds 80 missense, 13 pLoF and 29 synonymous. gnomadVariants is also a superTrack, so hideKids is needed to keep its coverage siblings off. rm37326 hovered into a gap. at: sets x from the coordinate but forces y to the MIDDLE of the row, and in pack mode that track is 324px of stacked guides. It now hovers by title:, which lands on the item's own row and waits for that item's tooltip. rm37553 asserted label text that does not exist. "GFF example" is not a label: the file says `track name=GFF example description=` with the name unquoted, so hgCustom takes the name as "GFF". Nor is the description on the page, since hgTracks puts a longLabel in the control's title attribute, which innerText does not see. All 46 tracks were loading the whole time. refs #38252 diff --git src/hg/utils/docent/tests/regress/rm36387.docent.yaml src/hg/utils/docent/tests/regress/rm36387.docent.yaml new file mode 100644 index 00000000000..a7b1aad988e --- /dev/null +++ src/hg/utils/docent/tests/regress/rm36387.docent.yaml @@ -0,0 +1,47 @@ +# #36387 -- an HGVS term pasted into the position box crashed the browser at once. +# +# The term the Stanford reader sent, and the whole of the bug, is that it carries a +# ZERO-WIDTH SPACE (U+200B) between "):" and "n.46G>A". Pasting from a clinical report is +# how it got there. hgTracks' search handler passed the raw term to encodeURIComponent, so +# the zero-width character reached hgSuggest, which put it in a LIKE and died: +# +# mySQL error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and +# (utf8mb4_general_ci,COERCIBLE) for operation 'like' +# +# From hgTracks that came back as an Error 500. Fixed in the JS by stripping zero-width +# characters before the term is encoded (#36412 is the build patch that carried it). +# +# So the term below MUST keep its \u200b escape. Without it there is no bug and the test +# passes on any build ever shipped. +# +# What the fixed behavior actually is, measured on genome-test 2026-09-05: the position box +# submits to hgSearch, which reports no results for the term. That is right and is what +# Christopher Lee described on the ticket -- an HGVS term is not something hgSearch +# resolves, and the bug was never that it should. An earlier version of this test waited +# for #imgTbl and timed out, because it assumed a fix meant landing on the variant. +# +# The assertion that carries the weight is noUrl. The stripped character is invisible in +# the rendered page, so the only evidence that the fix is in place is that %E2%80%8B did +# not survive into the search URL. text: is the companion half: on the buggy build hgTracks +# returned 500 and the search page never rendered at all. +target: genome-test +db: hg38 +position: chr12:120291800-120291900 +reset: true +fast: true +steps: + - go: chr12:120291800-120291900 + - hide: all + - track: {mane: pack} + - expect: {rows: [mane], noText: "Warning/Error"} + + # goShow: rather than go:, because the position box is where the term was typed and + # where the crash happened. The zero-width space is written as an escape so it survives + # a copy and is visible to the next reader. + - goShow: "RNU4-2 (NR_003137.3):\u200bn.46G>A" + + - expect: + url: "/hgSearch" + noUrl: "%E2%80%8B" + text: "Search across the Genome Browser site" + noText: "Internal Server Error"