Skip to content

Commit

Permalink
fixup(browser): minor edit to snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyhgrant committed Oct 23, 2024
1 parent 3c6d5f7 commit 55db87c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
31 changes: 15 additions & 16 deletions browser/src/GenePage/TissueExpressionTrack.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,21 @@ import { RegionViewerContext } from '@gnomad/region-viewer'
import geneFactory from '../__factories__/Gene'

describe('TissueExpressionTrack', () => {
const childProps = {
centerPanelWidth: 500,
isPositionDefined: true,
leftPanelWidth: 100,
// same regions as pext factory regions
regions: [
{
start: 0,
stop: 100,
},
],
rightPanelWidth: 100,
scalePosition: (i: number) => i,
}
test('snapshot has no unexpected changes', () => {
const regionViewerProps = {
centerPanelWidth: 500,
isPositionDefined: true,
leftPanelWidth: 100,
regions: [
{
start: 0,
stop: 100,
},
],
rightPanelWidth: 100,
scalePosition: (i: number) => i,
}

test('has no unexpected changes', () => {
const testTranscriptId = 'transcript-1337'
const gene = geneFactory.build({ canonical_transcript_id: testTranscriptId })

Expand All @@ -48,7 +47,7 @@ describe('TissueExpressionTrack', () => {
]

const tree = renderer.create(
<RegionViewerContext.Provider value={childProps}>
<RegionViewerContext.Provider value={regionViewerProps}>
<TissueExpressionTrack
exons={testExons}
expressionRegions={gene.pext!.regions}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`TissueExpressionTrack has no unexpected changes 1`] = `
exports[`TissueExpressionTrack snapshot has no unexpected changes 1`] = `
<div
className="TissueExpressionTrack__Wrapper-sc-1t85ku0-3 iexARk"
>
Expand Down

0 comments on commit 55db87c

Please sign in to comment.