Skip to content

Commit b7fa1c0

Browse files
committed
Update snaps
1 parent 3a13169 commit b7fa1c0

File tree

9 files changed

+33
-1405
lines changed

9 files changed

+33
-1405
lines changed

packages/web-core/src/BaseWebSession/index.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ import CopyIcon from '@mui/icons-material/FileCopy'
2121
import InfoIcon from '@mui/icons-material/Info'
2222
import SettingsIcon from '@mui/icons-material/Settings'
2323
import { autorun } from 'mobx'
24-
import {
25-
addDisposer,
26-
cast,
27-
getParent,
28-
getSnapshot,
29-
types,
30-
} from 'mobx-state-tree'
24+
import { addDisposer, cast, getParent, types } from 'mobx-state-tree'
3125

3226
import { WebSessionConnectionsMixin } from '../SessionConnections'
3327

@@ -403,13 +397,13 @@ export function BaseWebSession({
403397
priority: 999,
404398
disabled: isRefSeq,
405399
onClick: () => {
406-
const snap = structuredClone(getSnapshot(config)) as {
400+
const snap = structuredClone(config) as {
407401
[key: string]: unknown
408-
displays: Display[]
402+
displays?: Display[]
409403
}
410404
const now = Date.now()
411405
snap.trackId += `-${now}`
412-
snap.displays.forEach(display => {
406+
snap.displays?.forEach(display => {
413407
display.displayId += `-${now}`
414408
})
415409
// the -sessionTrack suffix to trackId is used as metadata for

plugins/data-management/src/HierarchicalTrackSelectorWidget/facetedModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function facetedStateTreeF() {
143143
) as string,
144144
adapter: readConfObject(track, 'adapter')?.type as string,
145145
description: readConfObject(track, 'description') as string,
146-
metadata: (track.metadata || {}) as Record<string, unknown>,
146+
metadata: (track.metadata || {}) as Record<string, unknown>,
147147
}) as const,
148148
)
149149
},

plugins/linear-comparative-view/src/LinearSyntenyViewHelper/stateModelFactory.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import {
2+
hideTrackGeneric,
3+
showTrackGeneric,
4+
toggleTrackGeneric,
5+
} from '@jbrowse/core/util/tracks'
16
import { ElementId } from '@jbrowse/core/util/types/mst'
27
import { getParent, types } from 'mobx-state-tree'
38

49
import type PluginManager from '@jbrowse/core/PluginManager'
510
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
611
import type { Instance } from 'mobx-state-tree'
7-
import {
8-
hideTrackGeneric,
9-
showTrackGeneric,
10-
toggleTrackGeneric,
11-
} from '@jbrowse/core/util/tracks'
1212

1313
export function linearSyntenyViewHelperModelFactory(
1414
pluginManager: PluginManager,

products/jbrowse-desktop/src/rootModel/rootModel.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test('adds track and connection configs to an assembly', () => {
103103
type: 'FeatureTrack',
104104
trackId: 'trackId0',
105105
})
106-
expect(getSnapshot(newTrackConf)).toMatchSnapshot()
106+
expect(newTrackConf).toMatchSnapshot()
107107
expect(root.jbrowse.tracks.length).toBe(1)
108108
const newConnectionConf = root.jbrowse.addConnectionConf({
109109
type: 'JBrowse1Connection',

products/jbrowse-react-app/src/rootModel/__snapshots__/rootModel.test.ts.snap

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,6 @@ exports[`adds track and connection configs to an assembly 1`] = `
216216

217217
exports[`adds track and connection configs to an assembly 2`] = `
218218
{
219-
"displays": [
220-
{
221-
"displayId": "trackId0-LinearBasicDisplay",
222-
"type": "LinearBasicDisplay",
223-
},
224-
{
225-
"displayId": "trackId0-LinearArcDisplay",
226-
"type": "LinearArcDisplay",
227-
},
228-
],
229219
"trackId": "trackId0",
230220
"type": "FeatureTrack",
231221
}

products/jbrowse-react-app/src/rootModel/rootModel.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ test('adds track and connection configs to an assembly', () => {
9999
type: 'FeatureTrack',
100100
trackId: 'trackId0',
101101
})
102-
expect(getSnapshot(newTrackConf)).toMatchSnapshot()
102+
expect(newTrackConf).toMatchSnapshot()
103103
expect(root.jbrowse.tracks.length).toBe(1)
104104
const newConnectionConf = root.jbrowse.addConnectionConf({
105105
type: 'JBrowse1Connection',

0 commit comments

Comments
 (0)