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

increased timeout for retrieving hgncs from map

parent 695067a7
No related branches found
No related tags found
No related merge requests found
Pipeline #24717 passed
......@@ -9,6 +9,7 @@ const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
// do not run in the same scope as the plugin and thus they do not have access to the Proxy. Therefore, the plugin
// exposes the proxy by attaching it as a data attribute to the main div element.
const pluginName = 'disease-associations';
const pluginLabel = 'Disease-variant associations';
const minervaProxyContainerClass = pluginName + '-container';
const minervaProxyCode = `$('.${minervaProxyContainerClass}').data('minervaProxy')`;
......@@ -66,9 +67,12 @@ async function getRequest(uri) {
async function getPluginHash(){
return getRequest('http://localhost:8080/minerva/api/plugins/').then(function (pluginsResponse) {
// !!!!! This expects the plugin to be tested to be the last registered which might not be true when tested outside of CI
const hashes = JSON.parse(pluginsResponse.responseText);//.filter(plugin => plugin.name === pluginLabel);
return hashes[hashes.length -1 ].hash;
let hashes = JSON.parse(pluginsResponse.responseText).filter(plugin => plugin.name === pluginLabel);
if (hashes.length === 0){
// when tested withing CI there is only one plugin, the current one and it's name is test
hashes = JSON.parse(pluginsResponse.responseText);
}
return hashes[hashes.length -1].hash;
});
}
......@@ -115,7 +119,7 @@ describe("disease-association plugin", async function() {
await driver.get(`http://localhost:8080/minerva/index.xhtml?id=single-map&plugins=${pluginHash}`);
pluginContainer = await driver.wait(until.elementLocated(By.css(`.${minervaProxyContainerClass}`)),10000);
await driver.wait(until.elementLocated(By.css(`.disease-input-group .input-disease`)),5000);
await driver.wait(until.elementLocated(By.css(`.disease-input-group .input-disease`)),15000);
});
describe("Parkinson's disease by EFO", function () {
......
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