Skip to content

Commit

Permalink
remove comments, give more time for test
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkxie committed Jan 6, 2021
1 parent 7a0c8e4 commit ad9a2fd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
1 change: 0 additions & 1 deletion plugins/dotplot-view/src/DotplotView/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export default function stateModelFactory(pluginManager: PluginManager) {
}))
.views(self => ({
get width(): number {
console.log(self, self.volatileWidth)
if (!self.volatileWidth) {
throw new Error('width not initialized')
}
Expand Down
39 changes: 20 additions & 19 deletions products/jbrowse-web/src/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,26 +396,27 @@ const Renderer = observer(
received this URL from another user, request that they send you
a session generated with the "Share" button instead of copying
and pasting their URL`,
)
}
} else if (sessionSnapshot) {
try {
rootModel.setSession(loader.sessionSnapshot)
} catch (error) {
console.error(error)
rootModel.setDefaultSession()
const errorMessage = (error.message || '')
.replace('[mobx-state-tree] ', '')
.replace(/\(.+/, '')
rootModel.session?.notify(
`Session could not be loaded. ${errorMessage}`,
)
}
} else {
const defaultJBrowseSession = rootModel.jbrowse.defaultSession
if (defaultJBrowseSession?.views) {
if (defaultJBrowseSession.views.length > 0) {
)
}
} else if (sessionSnapshot) {
try {
rootModel.setSession(loader.sessionSnapshot)
} catch (err) {
console.error(err)
rootModel.setDefaultSession()
const errorMessage = (err.message || '')
.replace('[mobx-state-tree] ', '')
.replace(/\(.+/, '')
rootModel.session?.notify(
`Session could not be loaded. ${errorMessage}`,
)
}
} else {
const defaultJBrowseSession = rootModel.jbrowse.defaultSession
if (defaultJBrowseSession?.views) {
if (defaultJBrowseSession.views.length > 0) {
rootModel.setDefaultSession()
}
}
}

Expand Down
1 change: 0 additions & 1 deletion products/jbrowse-web/src/rootModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ export default function RootModel(
// validate all references in the session snapshot
try {
filterSessionInPlace(self.session, getType(self.session))
console.log('done')
} catch (error) {
// throws error if session filtering failed
self.session = oldSession
Expand Down
2 changes: 1 addition & 1 deletion products/jbrowse-web/src/tests/Dotplot.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('dotplot view', () => {
)
const { findByTestId } = render(<JBrowse pluginManager={pluginManager} />)

const canvas = await findByTestId('prerendered_canvas', { timeout: 10000 })
const canvas = await findByTestId('prerendered_canvas', { timeout: 20000 })

const img = canvas.toDataURL()
const data = img.replace(/^data:image\/\w+;base64,/, '')
Expand Down

0 comments on commit ad9a2fd

Please sign in to comment.