Skip to content

Commit

Permalink
Updat
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 11, 2024
1 parent 0365b0d commit 5d01212
Show file tree
Hide file tree
Showing 4 changed files with 1,259 additions and 1,190 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"globals": "^15.9.0",
"html-webpack-plugin": "^5.5.0",
"husky": "^9.0.10",
"jest": "^30.0.0-alpha.6",
"jest": "^29.0.0",
"jest-environment-jsdom": "^29.3.1",
"jest-fetch-mock": "^3.0.3",
"jest-image-snapshot": "^6.1.0",
Expand Down
10 changes: 8 additions & 2 deletions products/jbrowse-web/src/tests/NcbiAliasAdapter.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { waitFor } from '@testing-library/dom'

import { createView, doBeforeEach, setup } from './util'
import config from '../../test_data/cfam2/config.json'

Expand All @@ -8,7 +10,11 @@ const opts = [{}, delay]

test('ncbi config', async () => {
doBeforeEach(url => require.resolve(`../../test_data/cfam2/${url}`))
const { findByTestId } = await createView(config)
const features = await findByTestId('box-test-offset-272549-0-1', ...opts)
const { queryAllByTestId, getAllByTestId } = await createView(config)

await waitFor(() => {
expect(queryAllByTestId('svgfeatures').length).toBe(2)
}, delay)
const features = getAllByTestId('svgfeatures', ...opts)
expect(features).toMatchSnapshot()
}, 50000)
Original file line number Diff line number Diff line change
@@ -1,13 +1,179 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ncbi config 1`] = `
<rect
data-testid="box-test-offset-272549-0-1"
fill="goldenrod"
height="5"
stroke=""
width="8.142447399308901"
x="796.1137449697653"
y="0"
/>
[
<svg
data-testid="svgfeatures"
height="122"
style="display: block;"
width="800.0241275715338"
>
<g>
<line
data-testid="test-offset-272549-0"
stroke="#000000"
x1="705.4"
x2="1910.0234856667703"
y1="2.5"
y2="2.5"
/>
<rect
data-testid="box-test-offset-272549-0_three_prime_UTR_0"
fill="#357089"
height="3.25"
stroke=""
width="90.71374496976537"
x="705.4"
y="0.875"
/>
<rect
data-testid="box-test-offset-272549-0-1"
fill="goldenrod"
height="5"
stroke=""
width="8.142447399308901"
x="796.1137449697653"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-2"
fill="goldenrod"
height="5"
stroke=""
width="177.52828977648142"
x="804.4855570845477"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-3"
fill="goldenrod"
height="5"
stroke=""
width="27.867812930029057"
x="1085.4573335395733"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-4"
fill="goldenrod"
height="5"
stroke=""
width="15.252753578987097"
x="1249.4531051031186"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-5"
fill="goldenrod"
height="5"
stroke=""
width="30.276142442500703"
x="1879.7473432242696"
y="0"
/>
<line
stroke="#000000"
x1="705.4"
x2="698.4"
y1="2.5"
y2="2.5"
/>
<polygon
fill="#000000"
points="701.9,0,701.9,5,698.4,2.5"
stroke="#000000"
/>
<text
fill="#000000"
font-size="12"
x="705.4"
y="17"
>
DACT2
</text>
</g>
</svg>,
<svg
data-testid="svgfeatures"
height="122"
style="display: block;"
width="800.0241275715338"
>
<g>
<line
data-testid="test-offset-272549-0"
stroke="#000000"
x1="-94.6"
x2="1110.0234856667705"
y1="2.5"
y2="2.5"
/>
<rect
data-testid="box-test-offset-272549-0-1"
fill="goldenrod"
height="5"
stroke=""
width="4.256192369074279"
x="0"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-2"
fill="goldenrod"
height="5"
stroke=""
width="177.52828977648142"
x="4.485557084547764"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-3"
fill="goldenrod"
height="5"
stroke=""
width="27.867812930029057"
x="285.45733353957326"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-4"
fill="goldenrod"
height="5"
stroke=""
width="15.252753578987097"
x="449.4531051031187"
y="0"
/>
<rect
data-testid="box-test-offset-272549-0-5"
fill="goldenrod"
height="5"
stroke=""
width="30.276142442500703"
x="1079.7473432242698"
y="0"
/>
<line
stroke="#000000"
x1="-94.6"
x2="-101.6"
y1="2.5"
y2="2.5"
/>
<polygon
fill="#000000"
points="-98.1,0,-98.1,5,-101.6,2.5"
stroke="#000000"
/>
<text
fill="#000000"
font-size="12"
x="-94.6"
y="17"
>
DACT2
</text>
</g>
</svg>,
]
`;
Loading

0 comments on commit 5d01212

Please sign in to comment.