From 0cdf3432bfd6f28a361544374f5a713be4819db3 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 22 Feb 2023 10:05:06 -0700 Subject: [PATCH] Update snaps --- .../LinearGenomeView.test.tsx.snap | 4 +- .../JBrowseCircularGenomeView.test.tsx | 46 +- .../JBrowseCircularGenomeView.test.tsx.snap | 516 +++++++++--------- .../JBrowseLinearGenomeView.test.tsx.snap | 2 +- yarn.lock | 145 +---- 5 files changed, 295 insertions(+), 418 deletions(-) diff --git a/plugins/linear-genome-view/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap b/plugins/linear-genome-view/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap index 42e5c21d35..c257bac268 100644 --- a/plugins/linear-genome-view/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap +++ b/plugins/linear-genome-view/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.tsx.snap @@ -177,7 +177,7 @@ exports[`renders one track, one region 1`] = ` autocapitalize="none" autocomplete="off" class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputAdornedEnd MuiAutocomplete-input MuiAutocomplete-inputFocused css-nxo287-MuiInputBase-input-MuiOutlinedInput-input" - id="mui-7" + id=":r5:" placeholder="Search for location" role="combobox" spellcheck="false" @@ -753,7 +753,7 @@ exports[`renders two tracks, two regions 1`] = ` autocapitalize="none" autocomplete="off" class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputAdornedEnd MuiAutocomplete-input MuiAutocomplete-inputFocused css-nxo287-MuiInputBase-input-MuiOutlinedInput-input" - id="mui-9" + id=":r7:" placeholder="Search for location" role="combobox" spellcheck="false" diff --git a/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/JBrowseCircularGenomeView.test.tsx b/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/JBrowseCircularGenomeView.test.tsx index 1fe099905e..43bf446665 100644 --- a/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/JBrowseCircularGenomeView.test.tsx +++ b/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/JBrowseCircularGenomeView.test.tsx @@ -3,16 +3,6 @@ import { render } from '@testing-library/react' import { createViewState } from '..' import JBrowseCircularGenomeView from './JBrowseCircularGenomeView' -window.requestIdleCallback = ( - cb: (deadline: { didTimeout: boolean; timeRemaining: () => number }) => void, -) => { - cb({ didTimeout: false, timeRemaining: () => 0 }) - return 0 -} -window.cancelIdleCallback = () => {} -window.requestAnimationFrame = cb => setTimeout(cb) -window.cancelAnimationFrame = () => {} - const assembly = { name: 'volvox', sequence: { @@ -62,21 +52,23 @@ const defaultSession = { tracks: [], }, } +beforeEach(() => jest.useFakeTimers()) + +test('', async () => { + const state = createViewState({ + assembly, + tracks: [], + defaultSession, + }) + state.session.view.setWidth(800) + const { container, findAllByText } = render( + Loading...}> + + , + ) + await findAllByText('ctgA', {}, { timeout: 10000 }) -describe('', () => { - it('renders successfully', async () => { - const state = createViewState({ - assembly, - tracks: [], - defaultSession, - }) - state.session.view.setWidth(800) - const { container, findAllByText } = render( - Loading...}> - - , - ) - await findAllByText('ctgA', {}, { timeout: 10000 }) - expect(container.firstChild).toMatchSnapshot() - }, 10000) -}) + // xref https://stackoverflow.com/a/64875069/2129219 without this ripples non-deterministically show up in snapshot + jest.runAllTimers() + expect(container).toMatchSnapshot() +}, 10000) diff --git a/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/__snapshots__/JBrowseCircularGenomeView.test.tsx.snap b/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/__snapshots__/JBrowseCircularGenomeView.test.tsx.snap index f0e135c819..c90604a847 100644 --- a/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/__snapshots__/JBrowseCircularGenomeView.test.tsx.snap +++ b/products/jbrowse-react-circular-genome-view/src/JBrowseCircularGenomeView/__snapshots__/JBrowseCircularGenomeView.test.tsx.snap @@ -1,306 +1,308 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` renders successfully 1`] = ` -
+exports[` 1`] = ` +
- -
- +
- -
-
-
+
-
- - - +
+
+
+
- - - + - - - + + + +
+
-
diff --git a/products/jbrowse-react-linear-genome-view/src/JBrowseLinearGenomeView/__snapshots__/JBrowseLinearGenomeView.test.tsx.snap b/products/jbrowse-react-linear-genome-view/src/JBrowseLinearGenomeView/__snapshots__/JBrowseLinearGenomeView.test.tsx.snap index 7f39ce6f22..763b9974ec 100644 --- a/products/jbrowse-react-linear-genome-view/src/JBrowseLinearGenomeView/__snapshots__/JBrowseLinearGenomeView.test.tsx.snap +++ b/products/jbrowse-react-linear-genome-view/src/JBrowseLinearGenomeView/__snapshots__/JBrowseLinearGenomeView.test.tsx.snap @@ -266,7 +266,7 @@ exports[` renders successfully 1`] = ` autocapitalize="none" autocomplete="off" class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedEnd MuiAutocomplete-input MuiAutocomplete-inputFocused css-19qh8xo-MuiInputBase-input-MuiOutlinedInput-input" - id="mui-3" + id=":r1:" placeholder="Search for location" role="combobox" spellcheck="false" diff --git a/yarn.lock b/yarn.lock index 6f5c989617..03caa19666 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1718,18 +1718,6 @@ resolved "https://registry.yarnpkg.com/@gmod/vcf/-/vcf-5.0.10.tgz#6c2d7952b15f61642454be90119ea89fd3c227de" integrity sha512-o7QuPcOeXlJpzwQaFmgojhNvJE4yB9fhrfVEDKpkDjV27pAqwMy89367vtXu4JfBFE9t4zZ6sQRkqYaJ+cIheg== -"@happy-dom/jest-environment@^8.2.6": - version "8.4.0" - resolved "https://registry.yarnpkg.com/@happy-dom/jest-environment/-/jest-environment-8.4.0.tgz#f6cba40dd7ba594027cd4b9dd1721d788c90f237" - integrity sha512-1ITjq9uFXVgaKy4k1nXRMpE5e19mfksBuDJfBkdV0UI30DbV9FQu9XvfdXPAEqHAZHKDAhsLby46r/hpGeFi4g== - dependencies: - "@jest/environment" "^29.4.0" - "@jest/fake-timers" "^29.4.0" - "@jest/types" "^29.4.0" - happy-dom "^8.4.0" - jest-mock "^29.4.0" - jest-util "^29.4.0" - "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" @@ -1889,16 +1877,6 @@ "@types/node" "*" jest-mock "^27.5.1" -"@jest/environment@^29.4.0": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.4.2.tgz#ee92c316ee2fbdf0bcd9d2db0ef42d64fea26b56" - integrity sha512-JKs3VUtse0vQfCaFGJRX1bir9yBdtasxziSyu+pIiEllAQOe4oQhdCYIf3+Lx+nGglFktSKToBnRJfD5QKp+NQ== - dependencies: - "@jest/fake-timers" "^29.4.2" - "@jest/types" "^29.4.2" - "@types/node" "*" - jest-mock "^29.4.2" - "@jest/environment@^29.4.1": version "29.4.1" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.4.1.tgz#52d232a85cdc995b407a940c89c86568f5a88ffe" @@ -1936,18 +1914,6 @@ jest-mock "^27.5.1" jest-util "^27.5.1" -"@jest/fake-timers@^29.4.0", "@jest/fake-timers@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.4.2.tgz#af43ee1a5720b987d0348f80df98f2cb17d45cd0" - integrity sha512-Ny1u0Wg6kCsHFWq7A/rW/tMhIedq2siiyHyLpHCmIhP7WmcAmd2cx95P+0xtTZlj5ZbJxIRQi4OPydZZUoiSQQ== - dependencies: - "@jest/types" "^29.4.2" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.4.2" - jest-mock "^29.4.2" - jest-util "^29.4.2" - "@jest/fake-timers@^29.4.1": version "29.4.1" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.4.1.tgz#7b673131e8ea2a2045858f08241cace5d518b42b" @@ -2054,13 +2020,6 @@ dependencies: "@sinclair/typebox" "^0.25.16" -"@jest/schemas@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.2.tgz#cf7cfe97c5649f518452b176c47ed07486270fc1" - integrity sha512-ZrGzGfh31NtdVH8tn0mgJw4khQuNHiKqdzJAFbCaERbyCP9tHlxWuL/mnMu8P7e/+k4puWjI1NOzi/sFsjce/g== - dependencies: - "@sinclair/typebox" "^0.25.16" - "@jest/source-map@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" @@ -2194,18 +2153,6 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jest/types@^29.4.0", "@jest/types@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.4.2.tgz#8f724a414b1246b2bfd56ca5225d9e1f39540d82" - integrity sha512-CKlngyGP0fwlgC1BRUtPZSiWLBhyS9dKwKmyGxk8Z6M82LBEGB2aLQSg+U1MyLsU+M7UjnlLllBM2BLWKVm/Uw== - dependencies: - "@jest/schemas" "^29.4.2" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - "@jest/types@^29.4.1": version "29.4.1" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.4.1.tgz#f9f83d0916f50696661da72766132729dcb82ecb" @@ -8830,10 +8777,10 @@ domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: dependencies: domelementtype "^2.2.0" -dompurify@^2.3.4: - version "2.4.3" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.3.tgz#f4133af0e6a50297fc8874e2eaedc13a3c308c03" - integrity sha512-q6QaLcakcRjebxjg8/+NP+h0rPfatOgOzc46Fst9VAA3jF2ApfKBNKMzdP4DYTqtUMXSCd5pRS/8Po/OmoCHZQ== +dompurify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.0.tgz#6adc6f918376d93419ed1ee35811850680027cba" + integrity sha512-0g/yr2IJn4nTbxwL785YxS7/AvvgGFJw6LLWP+BzWzB1+BYOqPUT9Hy0rXrZh5HLdHnxH72aDdzvC9SdTjsuaA== domutils@^1.7.0: version "1.7.0" @@ -9032,10 +8979,10 @@ electron-window-state@^5.0.3: jsonfile "^4.0.0" mkdirp "^0.5.1" -electron@22.0.0: - version "22.0.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-22.0.0.tgz#ef84ab9cf23aa3f8c2f42a1e8e000ad7fd941058" - integrity sha512-cgRc4wjyM+81A0E8UGv1HNJjL1HBI5cWNh/DUIjzYvoUuiEM0SS0hAH/zaFQ18xOz2ced6Yih8SybpOiOYJhdg== +electron@23.1.1: + version "23.1.1" + resolved "https://registry.yarnpkg.com/electron/-/electron-23.1.1.tgz#20b603e69919b263ef9e4a51b72a9615ce86dc5b" + integrity sha512-junV1NzPx5T8Mx9+o8fMWK1Q5WOtG5vggiM09PGYg/6zTcGDL3DjGVHeUa/97gx7ErXL37DrFnxNg6+ePWprDg== dependencies: "@electron/get" "^2.0.0" "@types/node" "^16.11.26" @@ -9532,13 +9479,6 @@ eslint-plugin-testing-library@^5.0.1: dependencies: "@typescript-eslint/utils" "^5.43.0" -eslint-plugin-testing-library@^5.10.0: - version "5.10.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.10.1.tgz#16ef8adb74d59a4dda24db1d5e750a0ee9b79471" - integrity sha512-GRy87AqUi2Ij69pe0YnOXm3oGBCgnFwfIv+Hu9q/kT3jL0pX1cXA7aO+oJnvdpbJy2+riOPqGsa3iAkL888NLg== - dependencies: - "@typescript-eslint/utils" "^5.43.0" - eslint-plugin-tsdoc@^0.2.4: version "0.2.17" resolved "https://registry.yarnpkg.com/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz#27789495bbd8778abbf92db1707fec2ed3dfe281" @@ -10769,18 +10709,6 @@ handlebars@^4.7.7: optionalDependencies: uglify-js "^3.1.4" -happy-dom@^8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/happy-dom/-/happy-dom-8.4.0.tgz#9ae358ff7f210a201af04af36c9d72de09fe2c03" - integrity sha512-FLqMCrgTAh3dK9YAQk0cFI0E2icr/E1SzSvCsEHATzHCpB92jfSaCCSVD/cRdmLjm0eLkh1vbBe90wi3qGU0kQ== - dependencies: - css.escape "^1.5.1" - he "^1.2.0" - node-fetch "^2.x.x" - webidl-conversions "^7.0.0" - whatwg-encoding "^2.0.0" - whatwg-mimetype "^3.0.0" - hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -12254,21 +12182,6 @@ jest-message-util@^29.4.1: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.4.2.tgz#309a2924eae6ca67cf7f25781a2af1902deee717" - integrity sha512-SElcuN4s6PNKpOEtTInjOAA8QvItu0iugkXqhYyguRvQoXapg5gN+9RQxLAkakChZA7Y26j6yUCsFWN+hlKD6g== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.4.2" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.4.2" - slash "^3.0.0" - stack-utils "^2.0.3" - jest-mock@^27.0.6, jest-mock@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" @@ -12277,15 +12190,6 @@ jest-mock@^27.0.6, jest-mock@^27.5.1: "@jest/types" "^27.5.1" "@types/node" "*" -jest-mock@^29.4.0, jest-mock@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.4.2.tgz#e1054be66fb3e975d26d4528fcde6979e4759de8" - integrity sha512-x1FSd4Gvx2yIahdaIKoBjwji6XpboDunSJ95RpntGrYulI1ByuYQCKN/P7hvk09JB74IonU3IPLdkutEWYt++g== - dependencies: - "@jest/types" "^29.4.2" - "@types/node" "*" - jest-util "^29.4.2" - jest-mock@^29.4.1: version "29.4.1" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.4.1.tgz#a218a2abf45c99c501d4665207748a6b9e29afbd" @@ -12564,18 +12468,6 @@ jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.4.0, jest-util@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.4.2.tgz#3db8580b295df453a97de4a1b42dd2578dabd2c2" - integrity sha512-wKnm6XpJgzMUSRFB7YF48CuwdzuDIHenVuoIb1PLuJ6F+uErZsuDkU+EiExkChf6473XcawBrSfDSnXl+/YG4g== - dependencies: - "@jest/types" "^29.4.2" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-util@^29.4.1: version "29.4.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.4.1.tgz#2eeed98ff4563b441b5a656ed1a786e3abc3e4c4" @@ -13445,12 +13337,12 @@ matcher@^3.0.0: dependencies: escape-string-regexp "^4.0.0" -material-ui-popup-state@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/material-ui-popup-state/-/material-ui-popup-state-3.1.1.tgz#a8310e4472ec05628fff62105acbe20b68fe634a" - integrity sha512-ACUvVEiAZHngoeptRcledKYxmK6lJMI2KIXpcDpnKaEZXWnxOH6fWzhrgiglXK+52FTfdGRzXWVA6KqKcUAIjg== +material-ui-popup-state@^5.0.0: + version "5.0.4" + resolved "https://registry.yarnpkg.com/material-ui-popup-state/-/material-ui-popup-state-5.0.4.tgz#7b02ff6df10b4a3cc3b55d897fcb81ea0928ac9f" + integrity sha512-QdlKHiKv498UNsH3zpQNJ7SN9RYiEjR5MSJIg+a9gqCp43G0A8fo1r0kmX1qFTLGTfYKgXix5RANJkNTujWtxA== dependencies: - "@babel/runtime" "^7.12.5" + "@babel/runtime" "^7.20.6" "@mui/material" "^5.0.0" classnames "^2.2.6" prop-types "^15.7.2" @@ -13979,7 +13871,7 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" -node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7, node-fetch@^2.x.x: +node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.9" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== @@ -15623,15 +15515,6 @@ pretty-format@^29.0.0, pretty-format@^29.4.1: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.4.2.tgz#64bf5ccc0d718c03027d94ac957bdd32b3fb2401" - integrity sha512-qKlHR8yFVCbcEWba0H0TOC8dnLlO4vPlyEjRPw31FZ2Rupy9nLa8ZLbYny8gWEl8CkEhJqAE6IzdNELTBVcBEg== - dependencies: - "@jest/schemas" "^29.4.2" - ansi-styles "^5.0.0" - react-is "^18.0.0" - pretty-hrtime@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"