Commit 81568ab2 authored by David Hoksza's avatar David Hoksza
Browse files

fix minor issues

parent 30907b6f
Pipeline #25043 failed with stages
in 7 minutes and 54 seconds
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
"build-css": "node-sass --include-path src/css src/css/styles.scss src/css/styles.css", "build-css": "node-sass --include-path src/css src/css/styles.scss src/css/styles.css",
"build": "mkdirp dist && npm run build-css && npm run babel && browserify -t browserify-css __tmp_minerva_plugin/js/index.js | uglifyjs --compress --mangle > dist/plugin.js && npm run clean-babel", "build": "mkdirp dist && npm run build-css && npm run babel && browserify -t browserify-css __tmp_minerva_plugin/js/index.js | uglifyjs --compress --mangle > dist/plugin.js && npm run clean-babel",
"build-debug": "mkdirp dist && npm run build-css && npm run babel && browserify -t browserify-css __tmp_minerva_plugin/js/index.js > dist/plugin.js && npm run clean-babel", "build-debug": "mkdirp dist && npm run build-css && npm run babel && browserify -t browserify-css __tmp_minerva_plugin/js/index.js > dist/plugin.js && npm run clean-babel",
"clean": "rimraf dist && npm run clean-babel" "clean": "rimraf dist && npm run clean-babel",
"test": "mocha tests"
}, },
"author": "Marek Ostaszewski, David Hoksza", "author": "Marek Ostaszewski, David Hoksza",
"license": "MIT", "license": "MIT",
......
...@@ -301,10 +301,10 @@ function calculateGSEA() { ...@@ -301,10 +301,10 @@ function calculateGSEA() {
//calculate intersect //calculate intersect
const isect = [...ovHgncNames].filter(name => mpHgncNames.has(name)); const isect = [...ovHgncNames].filter(name => mpHgncNames.has(name));
var m = mpHgncNames.size; var m = mpHgncNames.size; //number of entities in the pathway (with HGNC_SYMBOL)
var k = isect.length; var k = isect.length; //number of entities in both pathway and overlay (with HGNC_SYMBOL)
var N = globals.allProteinRnaGene.length; var N = globals.allProteinRnaGene.length; // number of all entities (with HGNC_SYMBOL)
var n = ovHgncNames.size; var n = ovHgncNames.size; //number of entities in the overlay (with HGNC_SYMBOL)
console.log('pw', pwName); console.log('pw', pwName);
console.log('m', m); console.log('m', m);
......
...@@ -9,6 +9,7 @@ const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; ...@@ -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 // 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. // exposes the proxy by attaching it as a data attribute to the main div element.
const pluginName = 'GSEA'; const pluginName = 'GSEA';
const pluginLabel = 'GSEA';
const minervaProxyContainerClass = pluginName + '-container'; const minervaProxyContainerClass = pluginName + '-container';
const minervaProxyCode = `$('.${minervaProxyContainerClass}').data('minervaProxy')`; const minervaProxyCode = `$('.${minervaProxyContainerClass}').data('minervaProxy')`;
...@@ -66,14 +67,19 @@ async function getRequest(uri) { ...@@ -66,14 +67,19 @@ async function getRequest(uri) {
async function getPluginHash(){ async function getPluginHash(){
return getRequest('http://localhost:8080/minerva/api/plugins/').then(function (pluginsResponse) { return getRequest('http://localhost:8080/minerva/api/plugins/').then(function (pluginsResponse) {
return JSON.parse(pluginsResponse.responseText).filter(plugin => plugin.name === pluginName && plugin.isPublic)[0].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;
}); });
} }
describe('GSEA plugin', async function() { describe('GSEA plugin', async function() {
//Some functions can take a lot of time as they need, for isntance, start MINERVA interface //Some functions can take a lot of time as they need, for isntance, start MINERVA interface
this.timeout(20000); this.timeout(40000);
let driver; let driver;
let minervaProxy; let minervaProxy;
...@@ -128,7 +134,7 @@ describe('GSEA plugin', async function() { ...@@ -128,7 +134,7 @@ describe('GSEA plugin', async function() {
$('.gsea-buttons .btn-calc').click(); $('.gsea-buttons .btn-calc').click();
}); });
await driver.wait(until.elementLocated(By.css(`.gsea-results button`)),5000); await driver.wait(until.elementLocated(By.css(`.gsea-results button`)));
}); });
let elPanelTitle; let elPanelTitle;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment