From b766f037fd1854cd3a276391f7e95da7f54eeed0 Mon Sep 17 00:00:00 2001 From: Colin Diesh Date: Thu, 23 Mar 2023 23:27:44 -0600 Subject: [PATCH] Use local data instead of remote data for LGV component test (#3611) --- component_tests/cgv/src/App.tsx | 80 +---------- .../lgv/cypress/integration/basic.spec.ts | 12 +- component_tests/lgv/public/volvox-sorted.cram | Bin 0 -> 141022 bytes .../lgv/public/volvox-sorted.cram.crai | Bin 0 -> 63 bytes component_tests/lgv/public/volvox.2bit | Bin 0 -> 14103 bytes component_tests/lgv/src/App.tsx | 134 +----------------- component_tests/lgv/src/assembly.ts | 54 +++---- component_tests/lgv/src/tracks.ts | 93 ++---------- 8 files changed, 50 insertions(+), 323 deletions(-) create mode 100644 component_tests/lgv/public/volvox-sorted.cram create mode 100644 component_tests/lgv/public/volvox-sorted.cram.crai create mode 100644 component_tests/lgv/public/volvox.2bit diff --git a/component_tests/cgv/src/App.tsx b/component_tests/cgv/src/App.tsx index 1e9673d10f..0012db1d53 100644 --- a/component_tests/cgv/src/App.tsx +++ b/component_tests/cgv/src/App.tsx @@ -1,5 +1,4 @@ import React, { useState, useEffect } from 'react' -import '@fontsource/roboto' import { createViewState, JBrowseCircularGenomeView, @@ -8,19 +7,14 @@ import { import assembly from './assembly' import tracks from './tracks' -function View() { +export default function View() { const [viewState, setViewState] = useState>() - const [patches, setPatches] = useState('') - const [stateSnapshot, setStateSnapshot] = useState('') useEffect(() => { const state = createViewState({ assembly, tracks, - onChange: (patch: any) => { - setPatches(previous => previous + JSON.stringify(patch) + '\n') - }, }) state.session.view.showTrack('volvox_sv_test_renamed') setViewState(state) @@ -30,75 +24,5 @@ function View() { return null } - return ( - <> -

- JBrowse 2 React Circular Genome View Demo (with create-react-app v4) -

- -

Code

-

- The code for this app is available at{' '} - - https://github.com/GMOD/jbrowse-components/tree/main/demos/jbrowse-react-circular-genome-view - - . -

-

Control the view

-
-

- This is an example of controlling the view from other elements on the - page. Clicking on a button will rotate the view. -

- - -
-

See the state

-
-

- The button below will show you the current session, which includes - things like what region the view is showing and which tracks are open. - This session JSON object can be used in the{' '} - defaultSession of createViewState. -

- -
-