Skip to content
Snippets Groups Projects
Commit ba7ae4cf authored by David Hoksza's avatar David Hoksza
Browse files

tests of variants and highlights

parent c181311b
No related branches found
No related tags found
No related merge requests found
Pipeline #24546 passed
......@@ -88,6 +88,5 @@ const ancestorsContainDisease = function(ancestorsJson) {
module.exports = {
suggestDiseases: suggestDiseases
,suggestDiseasesSimple: suggestDiseasesSimple
, getDisease: getDisease
};
\ No newline at end of file
......@@ -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(30000);
this.timeout(60000);
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 countHighlighted(){
async function getHighlighted(){
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";
}, 25000);
}, 30000);
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);
});
})
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment