From b969d2cc2149c872b1da8f8e82b9189e834891c7 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 19 Feb 2024 00:12:19 -0500 Subject: [PATCH] Update snaps --- .../src/BaseLinearDisplay/models/renderSvg.tsx | 2 +- .../linear-genome-view/src/BaseLinearDisplay/models/util.ts | 2 +- .../__image_snapshots__/breakpoint_split_view_snapshot.svg | 2 +- .../src/tests/__image_snapshots__/lgv_snapshot.svg | 2 +- .../src/tests/__image_snapshots__/synteny_snapshot.svg | 2 +- .../src/tests/__snapshots__/ExportSvg.test.tsx.snap | 4 ++-- .../__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/linear-genome-view/src/BaseLinearDisplay/models/renderSvg.tsx b/plugins/linear-genome-view/src/BaseLinearDisplay/models/renderSvg.tsx index cd3031794e..b37850558d 100644 --- a/plugins/linear-genome-view/src/BaseLinearDisplay/models/renderSvg.tsx +++ b/plugins/linear-genome-view/src/BaseLinearDisplay/models/renderSvg.tsx @@ -74,7 +74,7 @@ export async function renderBaseLinearDisplaySvg( {renderings.map(([block, rendering], index) => { const { offsetPx, widthPx } = block const offset = offsetPx - viewOffsetPx - const clipid = `${getId(id, index)}-${Math.random()}` + const clipid = getId(id, index) return ( diff --git a/plugins/linear-genome-view/src/BaseLinearDisplay/models/util.ts b/plugins/linear-genome-view/src/BaseLinearDisplay/models/util.ts index 4d5464f536..9c1c848804 100644 --- a/plugins/linear-genome-view/src/BaseLinearDisplay/models/util.ts +++ b/plugins/linear-genome-view/src/BaseLinearDisplay/models/util.ts @@ -33,7 +33,7 @@ export function getDisplayStr(totalBytes: number) { // stabilize clipid under test for snapshot export function getId(id: string, index: number) { const isJest = typeof jest === 'undefined' - return `clip-${isJest ? id : 'jest'}-${index}` + return `clip-${isJest ? id : 'jest'}-${index}-${isJest ? '' : Math.random()}` } export async function getFeatureDensityStatsPre( diff --git a/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg b/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg index 546a9a0109..2861b45e8c 100644 --- a/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg +++ b/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg @@ -1 +1 @@ -hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds \ No newline at end of file +hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds \ No newline at end of file diff --git a/products/jbrowse-web/src/tests/__image_snapshots__/lgv_snapshot.svg b/products/jbrowse-web/src/tests/__image_snapshots__/lgv_snapshot.svg index 93a3728dfb..4e1875ecfd 100644 --- a/products/jbrowse-web/src/tests/__image_snapshots__/lgv_snapshot.svg +++ b/products/jbrowse-web/src/tests/__image_snapshots__/lgv_snapshot.svg @@ -1 +1 @@ -volvox80bpctgA020406080001111GTACAGAGTGACGCTCAAAGCvolvox-sorted.bam (ctgA, canvas) \ No newline at end of file +volvox80bpctgA020406080001111GTACAGAGTGACGCTCAAAGCvolvox-sorted.bam (ctgA, canvas) \ No newline at end of file diff --git a/products/jbrowse-web/src/tests/__image_snapshots__/synteny_snapshot.svg b/products/jbrowse-web/src/tests/__image_snapshots__/synteny_snapshot.svg index 096d96e287..9f648b2944 100644 --- a/products/jbrowse-web/src/tests/__image_snapshots__/synteny_snapshot.svg +++ b/products/jbrowse-web/src/tests/__image_snapshots__/synteny_snapshot.svg @@ -1 +1 @@ -volvoxctgA1,8001,9002,0002,100333619537636283334354210515volvox_inv_indelsvolvox_random_invctgA1,8001,9002,0002,1003345844231067567193728415volvox_inv_indels \ No newline at end of file +volvoxctgA1,8001,9002,0002,100333619537636283334354210515volvox_inv_indelsvolvox_random_invctgA1,8001,9002,0002,1003345844231067567193728415volvox_inv_indels \ No newline at end of file diff --git a/products/jbrowse-web/src/tests/__snapshots__/ExportSvg.test.tsx.snap b/products/jbrowse-web/src/tests/__snapshots__/ExportSvg.test.tsx.snap index 760caf150d..305f8e401b 100644 --- a/products/jbrowse-web/src/tests/__snapshots__/ExportSvg.test.tsx.snap +++ b/products/jbrowse-web/src/tests/__snapshots__/ExportSvg.test.tsx.snap @@ -4,6 +4,6 @@ exports[`export svg of circular 1`] = `"ctgA16,00018,00020,00022,00024,000volvoxctgA13,00014,00015,00016,00017,00018,00019,00020,000volvox_random_inv"`; -exports[`export svg of lgv 1`] = `"volvox80bpctgA020406080001111GTACAGAGTGACGCTCAAAGCvolvox-sorted.bam (ctgA, canvas)"`; +exports[`export svg of lgv 1`] = `"volvox80bpctgA020406080001111GTACAGAGTGACGCTCAAAGCvolvox-sorted.bam (ctgA, canvas)"`; -exports[`export svg of synteny 1`] = `"volvoxctgA1,8001,9002,0002,100333619537636283334354210515volvox_inv_indelsvolvox_random_invctgA1,8001,9002,0002,1003345844231067567193728415volvox_inv_indels"`; +exports[`export svg of synteny 1`] = `"volvoxctgA1,8001,9002,0002,100333619537636283334354210515volvox_inv_indelsvolvox_random_invctgA1,8001,9002,0002,1003345844231067567193728415volvox_inv_indels"`; diff --git a/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap b/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap index 9251451449..202284faf1 100644 --- a/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap +++ b/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`export svg of breakpoint split view 1`] = `"hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds"`; +exports[`export svg of breakpoint split view 1`] = `"hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds"`;