Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
disease-associations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
plugins
disease-associations
Commits
ba7ae4cf
Commit
ba7ae4cf
authored
4 years ago
by
David Hoksza
Browse files
Options
Downloads
Patches
Plain Diff
tests of variants and highlights
parent
c181311b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#24546
passed
4 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/js/ols.js
+0
-1
0 additions, 1 deletion
src/js/ols.js
tests/test.js
+28
-6
28 additions, 6 deletions
tests/test.js
with
28 additions
and
7 deletions
src/js/ols.js
+
0
−
1
View file @
ba7ae4cf
...
...
@@ -88,6 +88,5 @@ const ancestorsContainDisease = function(ancestorsJson) {
module
.
exports
=
{
suggestDiseases
:
suggestDiseases
,
suggestDiseasesSimple
:
suggestDiseasesSimple
,
getDisease
:
getDisease
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tests/test.js
+
28
−
6
View file @
ba7ae4cf
...
...
@@ -74,7 +74,7 @@ async function getPluginHash(){
describe
(
"
disease-association plugin
"
,
async
function
()
{
//Some functions can take a lot of time as they need, for isntance, start MINERVA interface
this
.
timeout
(
3
0000
);
this
.
timeout
(
6
0000
);
let
driver
;
let
minervaProxy
;
...
...
@@ -90,7 +90,7 @@ describe("disease-association plugin", async function() {
return
driver
.
executeScript
(
`minervaProxy =
${
minervaProxyCode
}
; minervaProxy.project.map.getHighlightedBioEntities().then( highlighted => minervaProxy.project.map.hideBioEntity(highlighted) )`
);
}
async
function
coun
tHighlighted
(){
async
function
ge
tHighlighted
(){
return
driver
.
executeAsyncScript
(
`
var callback = arguments[arguments.length - 1];
${
minervaProxyCode
}
.project.map.getHighlightedBioEntities().then(highlighted => callback(highlighted));
...
...
@@ -126,7 +126,7 @@ describe("disease-association plugin", async function() {
return
$
(
'
.disease-input-group .tt-menu.tt-open
'
).
css
(
"
display
"
)
});
return
display
===
"
block
"
;
},
25
000
);
},
30
000
);
await
wait
(
1000
);
});
...
...
@@ -165,12 +165,34 @@ describe("disease-association plugin", async function() {
assert
.
isAbove
(
genes
.
length
,
1
);
});
describe
(
"
clicking on SNCA
"
,
function
()
{
before
(
async
function
()
{
it
(
"
should show variants
"
,
async
function
()
{
driver
.
executeScript
(
function
()
{
$
(
$
(
'
table.variation-table a.detail-icon i.fa-plus
'
)[
0
]).
parent
().
click
();
});
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
#tree-LRRK2-Homo_sapiens li
'
)),
2000
);
const
variants
=
await
driver
.
findElements
(
By
.
css
(
'
table.variation-table tr.detail-view li
'
));
assert
.
isAbove
(
variants
.
length
,
1
);
const
plus
=
await
variants
[
0
].
findElements
(
By
.
css
(
'
.fa-plus
'
));
plus
[
0
].
click
();
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
#tree-LRRK2-Homo_sapiens span.indent
'
)),
2000
);
const
detail
=
await
driver
.
executeScript
(
function
()
{
return
$
(
'
#tree-LRRK2-Homo_sapiens span.indent
'
).
parent
().
find
(
'
a
'
)[
0
];
});
assert
.
include
(
await
detail
.
getText
(),
'
A0A1B0GUQ3
'
);
});
describe
(
"
clicking on LRRK
"
,
function
()
{
before
(
async
function
()
{
const
markers
=
await
driver
.
findElements
(
By
.
css
(
'
table.variation-table .fa-map-marker-alt
'
));
markers
[
0
].
click
();
await
wait
(
500
);
});
it
(
"
should highlight in map
"
);
it
(
"
should highlight in map
"
,
async
function
()
{
highlighted
=
await
getHighlighted
();
assert
.
equal
(
highlighted
.
length
,
2
);
});
})
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment