Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-web
ensembl-client
Commits
d1a44c9a
Unverified
Commit
d1a44c9a
authored
Feb 11, 2021
by
Manoj Pandian Sakthivel
Committed by
GitHub
Feb 11, 2021
Browse files
Fix types (#454)
parent
7ec4831b
Pipeline
#132723
passed with stages
in 8 minutes and 38 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
24 deletions
+76
-24
src/ensembl/src/content/app/browser/track-panel/track-panel-list/TrackPanelList.test.tsx
...wser/track-panel/track-panel-list/TrackPanelList.test.tsx
+1
-2
src/ensembl/src/content/app/entity-viewer/gene-view/components/transcripts-filter/TranscriptsFilter.test.tsx
.../components/transcripts-filter/TranscriptsFilter.test.tsx
+1
-1
src/ensembl/tests/fixtures/ens-object.ts
src/ensembl/tests/fixtures/ens-object.ts
+3
-2
src/ensembl/tests/fixtures/entity-viewer/gene.ts
src/ensembl/tests/fixtures/entity-viewer/gene.ts
+1
-1
src/ensembl/tests/fixtures/entity-viewer/product.ts
src/ensembl/tests/fixtures/entity-viewer/product.ts
+1
-1
src/ensembl/tests/fixtures/entity-viewer/slice.ts
src/ensembl/tests/fixtures/entity-viewer/slice.ts
+2
-2
src/ensembl/tests/fixtures/entity-viewer/transcript.ts
src/ensembl/tests/fixtures/entity-viewer/transcript.ts
+27
-11
src/ensembl/tests/fixtures/genomes.ts
src/ensembl/tests/fixtures/genomes.ts
+18
-1
src/ensembl/tests/fixtures/track-panel.ts
src/ensembl/tests/fixtures/track-panel.ts
+22
-3
No files found.
src/ensembl/src/content/app/browser/track-panel/track-panel-list/TrackPanelList.test.tsx
View file @
d1a44c9a
...
...
@@ -41,8 +41,7 @@ describe('<TrackPanelList />', () => {
activeEnsObject
:
createEnsObject
(),
selectedTrackPanelTab
:
TrackSet
.
GENOMIC
,
genomeTrackCategories
:
createGenomeCategories
(),
trackStates
:
createTrackStates
(),
toggleDrawer
:
jest
.
fn
()
trackStates
:
createTrackStates
()
};
const
mountTrackPanelList
=
(
props
?:
Partial
<
TrackPanelListProps
>
)
=>
...
...
src/ensembl/src/content/app/entity-viewer/gene-view/components/transcripts-filter/TranscriptsFilter.test.tsx
View file @
d1a44c9a
...
...
@@ -88,7 +88,7 @@ const wrapInRedux = (
return
mount
(
<
Provider
store
=
{
store
}
>
<
TranscriptsFilter
filterL
abel
=
{
filterLabel
}
l
abel
=
{
filterLabel
}
transcripts
=
{
transcripts
}
toggleFilter
=
{
mockToggleFilter
}
/>
...
...
src/ensembl/tests/fixtures/ens-object.ts
View file @
d1a44c9a
...
...
@@ -20,7 +20,7 @@ import {
EnsObject
,
EnsObjectType
}
from
'
src/shared/state/ens-object/ensObjectTypes
'
;
import
{
Strand
}
from
'
src/
content/app/entity-viewer/type
s/strand
'
;
import
{
Strand
}
from
'
src/
shared/types/thoa
s/strand
'
;
export
const
createEnsObject
=
(
objectType
?:
EnsObjectType
):
EnsObject
=>
{
const
genome_id
=
faker
.
lorem
.
word
();
...
...
@@ -57,5 +57,6 @@ const createTrackInfo = () => ({
object_id
:
faker
.
lorem
.
word
(),
support_level
:
null
,
track_id
:
faker
.
lorem
.
word
(),
description
:
null
description
:
null
,
stable_id
:
faker
.
lorem
.
words
()
});
src/ensembl/tests/fixtures/entity-viewer/gene.ts
View file @
d1a44c9a
...
...
@@ -21,7 +21,7 @@ import { scaleLinear } from 'd3';
import
{
createSlice
}
from
'
./slice
'
;
import
{
createTranscript
}
from
'
./transcript
'
;
import
{
Gene
}
from
'
src/
content/app/entity-viewer/type
s/gene
'
;
import
{
Gene
}
from
'
src/
shared/types/thoa
s/gene
'
;
import
{
TicksAndScale
}
from
'
src/content/app/entity-viewer/gene-view/components/base-pairs-ruler/BasePairsRuler
'
;
export
const
createGene
=
(
fragment
:
Partial
<
Gene
>
=
{}):
Gene
=>
{
...
...
src/ensembl/tests/fixtures/entity-viewer/product.ts
View file @
d1a44c9a
...
...
@@ -21,7 +21,7 @@ import {
ProteinDomain
,
Product
,
ProductType
}
from
'
src/
content/app/entity-viewer/type
s/product
'
;
}
from
'
src/
shared/types/thoa
s/product
'
;
export
const
createProduct
=
(
fragment
:
Partial
<
Product
>
=
{}):
Product
=>
{
const
length
=
fragment
?.
length
||
faker
.
random
.
number
({
min
:
10
,
max
:
100
});
...
...
src/ensembl/tests/fixtures/entity-viewer/slice.ts
View file @
d1a44c9a
...
...
@@ -16,8 +16,8 @@
import
faker
from
'
faker
'
;
import
{
Slice
}
from
'
src/
content/app/entity-viewer/type
s/slice
'
;
import
{
Strand
}
from
'
src/
content/app/entity-viewer/type
s/strand
'
;
import
{
Slice
}
from
'
src/
shared/types/thoa
s/slice
'
;
import
{
Strand
}
from
'
src/
shared/types/thoa
s/strand
'
;
export
const
createSlice
=
():
Slice
=>
{
const
start
=
faker
.
random
.
number
({
min
:
1
,
max
:
1000000
});
...
...
src/ensembl/tests/fixtures/entity-viewer/transcript.ts
View file @
d1a44c9a
...
...
@@ -21,17 +21,14 @@ import { createSlice } from './slice';
import
{
createProduct
}
from
'
./product
'
;
import
{
getFeatureCoordinates
}
from
'
src/content/app/entity-viewer/shared/helpers/entity-helpers
'
;
import
{
Transcript
}
from
'
src/content/app/entity-viewer/types/transcript
'
;
import
{
Exon
,
SplicedExon
,
PhasedExon
}
from
'
src/content/app/entity-viewer/types/exon
'
;
import
{
Slice
}
from
'
src/content/app/entity-viewer/types/slice
'
;
import
{
CDS
}
from
'
src/content/app/entity-viewer/types/cds
'
;
import
{
CDNA
}
from
'
src/content/app/entity-viewer/types/cdna
'
;
import
{
ProductGeneratingContext
}
from
'
src/content/app/entity-viewer/types/productGeneratingContext
'
;
import
{
ProductType
}
from
'
src/content/app/entity-viewer/types/product
'
;
import
{
Transcript
}
from
'
src/shared/types/thoas/transcript
'
;
import
{
Exon
,
SplicedExon
,
PhasedExon
}
from
'
src/shared/types/thoas/exon
'
;
import
{
Slice
}
from
'
src/shared/types/thoas/slice
'
;
import
{
CDS
}
from
'
src/shared/types/thoas/cds
'
;
import
{
CDNA
}
from
'
src/shared/types/thoas/cdna
'
;
import
{
ProductGeneratingContext
}
from
'
src/shared/types/thoas/productGeneratingContext
'
;
import
{
ProductType
}
from
'
src/shared/types/thoas/product
'
;
import
{
ExternalReference
}
from
'
src/shared/types/thoas/externalReference
'
;
export
const
createTranscript
=
(
fragment
:
Partial
<
Transcript
>
=
{}
...
...
@@ -51,6 +48,7 @@ export const createTranscript = (
symbol
:
faker
.
lorem
.
word
(),
so_term
:
faker
.
lorem
.
word
(),
slice
:
transcriptSlice
,
external_references
:
createExternalReferences
(),
relative_location
:
{
start
:
1
,
end
:
transcriptSlice
.
location
.
end
,
...
...
@@ -64,6 +62,24 @@ export const createTranscript = (
};
};
const
createExternalReferences
=
():
ExternalReference
[]
=>
{
const
numberOfExternalReferences
=
faker
.
random
.
number
({
min
:
1
,
max
:
10
});
return
times
(
numberOfExternalReferences
,
()
=>
{
return
{
accession_id
:
faker
.
random
.
uuid
(),
name
:
faker
.
random
.
words
(),
description
:
faker
.
random
.
words
(),
url
:
faker
.
internet
.
url
(),
source
:
{
name
:
faker
.
random
.
words
(),
id
:
faker
.
random
.
uuid
(),
url
:
faker
.
internet
.
url
()
}
};
});
};
const
createSplicedExons
=
(
transcriptSlice
:
Slice
,
exons
:
Exon
[]
...
...
src/ensembl/tests/fixtures/genomes.ts
View file @
d1a44c9a
/**
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
faker
from
'
faker
'
;
import
times
from
'
lodash/times
'
;
...
...
@@ -21,7 +37,8 @@ export const createGenomeCategories = (): GenomeTrackCategory[] => [
{
description
:
faker
.
lorem
.
words
(),
label
:
faker
.
lorem
.
words
(),
track_id
:
faker
.
lorem
.
words
()
track_id
:
faker
.
lorem
.
words
(),
stable_id
:
faker
.
lorem
.
words
()
}
],
types
:
[
TrackSet
.
VARIATION
]
...
...
src/ensembl/tests/fixtures/track-panel.ts
View file @
d1a44c9a
/**
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
faker
from
'
faker
'
;
import
{
Status
}
from
'
src/shared/types/status
'
;
...
...
@@ -17,7 +33,8 @@ export const createTrackInfo = (): EnsObjectTrack => ({
additional_info
:
faker
.
lorem
.
words
(),
description
:
faker
.
lorem
.
words
(),
label
:
faker
.
lorem
.
words
(),
track_id
:
'
gene-pc-fwd
'
track_id
:
'
gene-pc-fwd
'
,
stable_id
:
faker
.
lorem
.
words
()
});
export
const
createMainTrackInfo
=
():
EnsObjectTrack
=>
({
...
...
@@ -29,11 +46,13 @@ export const createMainTrackInfo = (): EnsObjectTrack => ({
description
:
faker
.
lorem
.
words
(),
label
:
faker
.
lorem
.
words
(),
support_level
:
faker
.
lorem
.
words
(),
track_id
:
'
gene-feat-1
'
track_id
:
'
gene-feat-1
'
,
stable_id
:
faker
.
lorem
.
words
()
}
],
description
:
faker
.
lorem
.
words
(),
ensembl_object_id
:
faker
.
lorem
.
words
(),
label
:
faker
.
lorem
.
words
(),
track_id
:
'
gene-feat
'
track_id
:
'
gene-feat
'
,
stable_id
:
faker
.
lorem
.
words
()
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment