diff --git a/.circleci/config.yml b/.circleci/config.yml
index bb6e976efe9..171121d88e7 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -45,7 +45,7 @@ run_e2e_and_save_artifacts: &run_e2e_and_save_artifacts
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev & \
yarn serveDist & \
cd end-to-end-test && \
- yarn install --frozen-lockfile && \
+ yarn install --frozen-lockfile --ignore-engines && \
../scripts/env_vars.sh && \
eval "$(../scripts/env_vars.sh)" && \
curl $CBIOPORTAL_URL > /dev/null && \
@@ -82,8 +82,8 @@ run_e2e_and_save_artifacts: &run_e2e_and_save_artifacts
path: /tmp/repo/end-to-end-test/shared/imageCompare.html
destination: /imageCompare.html
- store_artifacts:
- path: /tmp/repo/end-to-end-test/remote/junit/customReport.json
- destination: /customReport.json
+ path: /tmp/repo/end-to-end-test/remote/junit/completeResults.json
+ destination: /completeResults.json
- store_artifacts:
path: /tmp/repo/end-to-end-test/remote/junit/errors
destination: /errors
@@ -133,7 +133,7 @@ jobs:
DISABLE_SOURCEMAP: true
NO_PARALLEL: true
no_output_timeout: 25m
- - run: cd /tmp/repo/end-to-end-test && (ls node_modules || yarn install --frozen-lockfile)
+ - run: cd /tmp/repo/end-to-end-test && (ls node_modules || yarn install --frozen-lockfile --ignore-engines)
- save_cache:
paths:
- node_modules
@@ -343,10 +343,10 @@ jobs:
path: /tmp/repo/end-to-end-test/shared/imageCompare.html
destination: /imageCompare.html
- store_artifacts:
- path: /tmp/repo/end-to-end-test/local/junit/customReport.json
- destination: /customReport.json
+ path: /tmp/repo/end-to-end-test/local/junit/completeResults.json
+ destination: /completeResults.json
- store_artifacts:
- path: /tmp/repo/end-to-end-test/remote/junit/errors
+ path: /tmp/repo/end-to-end-test/local/junit/errors
destination: /errors
- unless:
condition: << pipeline.parameters.enable_localdb_e2e >>
diff --git a/end-to-end-test/ie11/specs/ie.js b/end-to-end-test/ie11/specs/ie.js
deleted file mode 100644
index cd69c02c178..00000000000
--- a/end-to-end-test/ie11/specs/ie.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var assert = require('assert');
-var goToUrlAndSetLocalStorage = require('../../shared/specUtils')
- .goToUrlAndSetLocalStorage;
-var waitForOncoprint = require('../../shared/specUtils').waitForOncoprint;
-
-const CBIOPORTAL_URL = 'http://localhost:3000';
-
-describe('Application in IE11', function() {
- it('renders query page study items', function() {
- goToUrlAndSetLocalStorage(CBIOPORTAL_URL);
- $('[data-test="StudySelect"]').waitForExist(30000);
- });
-
- // it('renders the oncoprint', function() {
- // $('.exampleQueries').waitForExist();
- // $('.exampleQueries')
- // .$$('a')[1]
- // .click();
- // waitForOncoprint(10000);
- // });
-});
diff --git a/end-to-end-test/local/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png b/end-to-end-test/local/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png
index 3a33f0bb835..ac074124181 100644
Binary files a/end-to-end-test/local/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png and b/end-to-end-test/local/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png b/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png
index 3959effa534..1401764a2af 100644
Binary files a/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png and b/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png b/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png
index 2f99205d104..cdd56447de7 100644
Binary files a/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png and b/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png b/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png
index 2f99205d104..cdd56447de7 100644
Binary files a/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png and b/end-to-end-test/local/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/local/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png b/end-to-end-test/local/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png
index aa521f883f6..b0f2ea1801e 100644
Binary files a/end-to-end-test/local/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png and b/end-to-end-test/local/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/local/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png b/end-to-end-test/local/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png
index d5985e15062..29af7e01e17 100644
Binary files a/end-to-end-test/local/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png and b/end-to-end-test/local/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js b/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js
index 8ce2f0faab4..58ecefc5a41 100644
--- a/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js
+++ b/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js
@@ -78,7 +78,7 @@ describe('oncoprint', function() {
describe('generic assay categorical tracks', () => {
it('shows binary and multiple category tracks', () => {
goToUrlAndSetLocalStorage(genericArrayUrl, true);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
const res = checkOncoprintElement();
assertScreenShotMatch(res);
});
@@ -95,7 +95,7 @@ describe('oncoprint', function() {
),
}
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
});
it('initializes as configured by default', () => {
@@ -133,7 +133,7 @@ describe('oncoprint', function() {
MANUAL_TRACK_CONFIG
);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
const res = checkOncoprintElement();
assertScreenShotMatch(res);
@@ -172,7 +172,7 @@ describe('oncoprint', function() {
);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// Check save button enabled
openTracksMenu();
@@ -183,7 +183,7 @@ describe('oncoprint', function() {
// Click save button
$saveSessionBtn.click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// Check save button disabled
classes = $saveSessionBtn.getAttribute('class').split(' ');
const saveBtnIsDisabled = classes.includes('disabled');
@@ -245,7 +245,7 @@ describe('oncoprint', function() {
SERVER_CLINICAL_TRACK_CONFIG
),
});
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
});
it('shows oql structural variant variations', function() {
@@ -265,7 +265,7 @@ function createUrlWithSettingsQueryParam(config) {
function openTracksMenu() {
const $tracksDropdown = $('#addTracksDropdown');
$tracksDropdown.click();
- waitForOncoprint(2000);
+ waitForOncoprint();
}
function changeNthTrack(track, menuOptionButtonText) {
@@ -275,7 +275,7 @@ function changeNthTrack(track, menuOptionButtonText) {
timeout: 1000,
});
$(`li=${menuOptionButtonText}`).click();
- waitForOncoprint(2000);
+ waitForOncoprint();
}
function getBookmarkUrl(browser) {
@@ -308,6 +308,6 @@ function createOncoprintFromLegacyFormat() {
).join(',');
const legacyUrl = `${studyes0_oncoprintTabUrl}&clinicallist=${legacyFormatQueryParam}`;
goToUrlAndSetLocalStorage(legacyUrl, false);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
return legacyFormatQueryParam;
}
diff --git a/end-to-end-test/local/specs/core/settings-menu.spec.js b/end-to-end-test/local/specs/core/settings-menu.spec.js
index 818c78b3bf1..6c9a5a44a2e 100644
--- a/end-to-end-test/local/specs/core/settings-menu.spec.js
+++ b/end-to-end-test/local/specs/core/settings-menu.spec.js
@@ -80,6 +80,6 @@ describe('results view settings/annotation menu', function() {
const openOncoprint = (url, property) => {
goToUrlAndSetLocalStorageWithProperty(url, true, property);
- waitForOncoprint(100000);
+ waitForOncoprint();
setSettingsMenuOpen(true, 'GlobalSettingsButton');
};
diff --git a/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js b/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js
index 5467b7e6834..8589618b33c 100644
--- a/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js
+++ b/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js
@@ -22,7 +22,7 @@ describe('custom driver annotations feature in result view', function() {
describe('oncoprint tab - mutations', () => {
beforeEach(() => {
goToUrlAndSetLocalStorage(oncoprintTabUrl, true);
- waitForOncoprint(100000);
+ waitForOncoprint();
setSettingsMenuOpen(true, 'GlobalSettingsButton');
});
diff --git a/end-to-end-test/local/specs/gsva.screenshot.spec.js b/end-to-end-test/local/specs/gsva.screenshot.spec.js
index 9d293ce55e3..72e29be6361 100644
--- a/end-to-end-test/local/specs/gsva.screenshot.spec.js
+++ b/end-to-end-test/local/specs/gsva.screenshot.spec.js
@@ -54,7 +54,7 @@ describe('gsva feature', () => {
describe('oncoprint tab', () => {
beforeEach(() => {
goToUrlAndSetLocalStorage(oncoprintTabUrl, true);
- waitForOncoprint(20000);
+ waitForOncoprint();
});
it('shows GSVA heatmap track', () => {
@@ -76,7 +76,7 @@ describe('gsva feature', () => {
).waitForDisplayed();
$(trackOptionsElts.dropdown_selector + ' li:nth-child(7)').click();
- waitForOncoprint(20000);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
diff --git a/end-to-end-test/local/specs/web-tour.spec.js b/end-to-end-test/local/specs/web-tour.spec.js
index fa4a35e1bd9..03b42f3abf9 100644
--- a/end-to-end-test/local/specs/web-tour.spec.js
+++ b/end-to-end-test/local/specs/web-tour.spec.js
@@ -353,11 +353,17 @@ describe('Virtual Study Tour', () => {
});
});
-describe('Group Comparison Tour', () => {
+describe('Group Comparison Tour', function() {
let step = -1;
+ this.retries(0);
+
before(() => {
- goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false);
+ goToUrlAndSetLocalStorage(CBIOPORTAL_URL, true);
+ });
+
+ beforeEach(() => {
+ browser.setWindowSize(1600, 1200);
});
it('Initial step with -1.', () => {
@@ -473,6 +479,11 @@ describe('Group Comparison Tour', () => {
!tourModal.$(SKIP_ALL_BTN).isDisplayed();
!tourModal.$(NEXT_STEP_BTN).isDisplayed();
+ browser.setWindowSize(
+ browser.getWindowSize().width + 400,
+ browser.getWindowSize().height
+ );
+
browser.pause(1000);
// There should be the Mutated Genes table [data-tour="mutated-genes-table"]
const mutatedGenesTable = $('[data-tour="mutated-genes-table"]').$(
@@ -482,6 +493,8 @@ describe('Group Comparison Tour', () => {
// Select samples, IDH1 mutations, TP53 mutant and EGFR amplified samples
mutatedGenesTable.$$('input')[0].waitForDisplayed();
+
+ //browser.debug();
mutatedGenesTable.$$('input')[0].click();
mutatedGenesTable.$$('input')[1].click();
@@ -633,7 +646,7 @@ describe('Group Comparison Tour', () => {
step++;
});
- it('Step 8: Intro to the Survival tab, on the group comparison page.', () => {
+ it.skip('Step 8: Intro to the Survival tab, on the group comparison page.', () => {
// The tour should be at step = 8
assert.equal(step, 8);
@@ -657,7 +670,7 @@ describe('Group Comparison Tour', () => {
step++;
});
- it('Step 9: Intro to the Clinical tab, on the group comparison page.', () => {
+ it.skip('Step 9: Intro to the Clinical tab, on the group comparison page.', () => {
// The tour should be at step = 9
assert.equal(step, 9);
@@ -681,7 +694,7 @@ describe('Group Comparison Tour', () => {
step++;
});
- it('Step 10: Intro to the Genomic Alterations tab, on the group comparison page.', () => {
+ it.skip('Step 10: Intro to the Genomic Alterations tab, on the group comparison page.', () => {
// The tour should be at step = 10
assert.equal(step, 10);
diff --git a/end-to-end-test/package.json b/end-to-end-test/package.json
index a31f72b5db4..da5ca23f9a4 100644
--- a/end-to-end-test/package.json
+++ b/end-to-end-test/package.json
@@ -4,7 +4,7 @@
"description": "Dependencies for running tests with webdriverio and browserstack",
"main": "index.js",
"scripts": {
- "test-webdriver-manager": "npx wdio ./shared/wdio/wdio.conf.js",
+ "test-webdriver-manager": "npx wdio ./shared/wdio/wdio.conf.js",
"test-webdriver-manager-local": "export TEST_TYPE=local && export MANAGER_MAX_INSTANCES=2 && yarn run test-webdriver-manager",
"test-webdriver-manager-remote": "export TEST_TYPE=remote && yarn run test-webdriver-manager",
"test-webdriver-manager-debug": "(DEBUG=true npx wdio ./shared/wdio/wdio.conf.js --inspect || bash shared/image-compare/upload_failed_screenshots.sh)",
@@ -15,8 +15,10 @@
"author": "",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@wdio/cli": "^6.10.5",
- "@wdio/junit-reporter": "^6.11.0",
+ "@wdio/cli": "7.35",
+ "@wdio/codemod": "^0.12.0",
+ "@wdio/junit-reporter": "7",
+ "@wdio/sync": "^7.27.0",
"browserstack-local": "1.3.0",
"canvas": "^2.6.1",
"clipboardy": "^2.0.0",
@@ -27,15 +29,15 @@
"wdio-image-comparison-service": "^2.0.0",
"wdio-junit-reporter": "^0.3.1",
"wdio-novus-visual-regression-service": "^1.2.4",
- "wdio-spec-reporter": "0.1.0"
+ "wdio-spec-reporter": "0.1.0",
+ "wdio-timeline-reporter": "^5.1.4"
},
"devDependencies": {
- "@wdio/local-runner": "^6.10.5",
- "@wdio/mocha-framework": "^6.10.4",
- "@wdio/spec-reporter": "^6.8.1",
- "@wdio/sync": "^6.10.4",
+ "@wdio/local-runner": "7",
+ "@wdio/mocha-framework": "7",
+ "@wdio/spec-reporter": "7",
"chromedriver": "^87.0.1",
- "wdio-chromedriver-service": "^6.0.4",
+ "wdio-chromedriver-service": "7",
"wdio-json-reporter": "^2.0.0"
}
}
diff --git a/end-to-end-test/remote/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png
new file mode 100644
index 00000000000..ac074124181
Binary files /dev/null and b/end-to-end-test/remote/screenshots/reference/breadcrumbs_are_editable_for_mutation_count_chart_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png
new file mode 100644
index 00000000000..4703e85f64c
Binary files /dev/null and b/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_dbs_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png
new file mode 100644
index 00000000000..cdd56447de7
Binary files /dev/null and b/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_id_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png
new file mode 100644
index 00000000000..cdd56447de7
Binary files /dev/null and b/end-to-end-test/remote/screenshots/reference/show_mutational_bar_chart_sbs_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/remote/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png
new file mode 100644
index 00000000000..b0f2ea1801e
Binary files /dev/null and b/end-to-end-test/remote/screenshots/reference/show_the_bar_chart_with_percentage_on_y_axis_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/remote/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png b/end-to-end-test/remote/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png
new file mode 100644
index 00000000000..10a86b218b6
Binary files /dev/null and b/end-to-end-test/remote/screenshots/reference/switch_between_samples_to_update_mutational_bar_chart_element_chrome_1600x1000.png differ
diff --git a/end-to-end-test/remote/specs/core/customTabs.spec.js b/end-to-end-test/remote/specs/core/customTabs.spec.js
index 9fc32ce2c44..b9687fc8d15 100644
--- a/end-to-end-test/remote/specs/core/customTabs.spec.js
+++ b/end-to-end-test/remote/specs/core/customTabs.spec.js
@@ -104,12 +104,9 @@ function runTests(pageName, url, tabLocation) {
goToUrlWithCustomTabConfig(url, conf);
- $('.mainTabs').waitForDisplayed();
+ browser.setWindowSize(2000, browser.getWindowSize().height);
- if (tabLocation === 'STUDY_PAGE') {
- $('i.fa-chevron-right').waitForDisplayed();
- $('i.fa-chevron-right').click();
- }
+ $('.mainTabs').waitForDisplayed();
assert.equal(
$('=Patient Tab').isDisplayed(),
@@ -146,12 +143,9 @@ function runTests(pageName, url, tabLocation) {
goToUrlWithCustomTabConfig(url, conf);
- $('.mainTabs').waitForDisplayed();
+ browser.setWindowSize(2000, browser.getWindowSize().height);
- if (tabLocation === 'STUDY_PAGE') {
- $('i.fa-chevron-right').waitForDisplayed();
- $('i.fa-chevron-right').click();
- }
+ $('.mainTabs').waitForDisplayed();
assert.equal(
$('=Hidden Tab').isDisplayed(),
@@ -220,7 +214,7 @@ function runTests(pageName, url, tabLocation) {
);
});
- it('Remounts tab only when tracked url param changes (part of hash in url wrapper)', () => {
+ it('Remounts tab only when tracked url param changes (part of hash in url wrapper)', function() {
const conf = [
{
title: 'Async Tab',
@@ -239,6 +233,8 @@ function runTests(pageName, url, tabLocation) {
goToUrlWithCustomTabConfig(url, conf);
+ browser.setWindowSize(1600, browser.getWindowSize().height);
+
browser.execute(() => {
window.renderCustomTab1 = function(div, tab) {
$(div).append(`
First render
`);
@@ -246,7 +242,7 @@ function runTests(pageName, url, tabLocation) {
});
// offset to avoid overlapping elements
- $('=Async Tab').click({ x: -10 });
+ $('=Async Tab').click();
browser.pause(1000);
diff --git a/end-to-end-test/remote/specs/core/genomicEvolution.screenshot.spec.js b/end-to-end-test/remote/specs/core/genomicEvolution.screenshot.spec.js
index 234fe690ce5..daf954d1604 100644
--- a/end-to-end-test/remote/specs/core/genomicEvolution.screenshot.spec.js
+++ b/end-to-end-test/remote/specs/core/genomicEvolution.screenshot.spec.js
@@ -7,7 +7,7 @@ var checkElementWithMouseDisabled = require('../../../shared/specUtils')
.checkElementWithMouseDisabled;
var waitForNetworkQuiet = require('../../../shared/specUtils')
.waitForNetworkQuiet;
-var { setCheckboxChecked } = require('../../../shared/specUtils');
+var { setCheckboxChecked, jsApiClick } = require('../../../shared/specUtils');
var assertScreenShotMatch = require('../../../shared/lib/testUtils')
.assertScreenShotMatch;
var { jsApiHover } = require('../../../shared/specUtils');
@@ -74,17 +74,20 @@ describe('Patient View Genomic Evolution tab screenshot tests', function() {
it('pvge only show highlighted in line chart', function() {
setCheckboxChecked(false, 'input[data-test="VAFSequentialMode"]');
- $('input[data-test="VAFOnlyHighlighted"]').click();
+ setCheckboxChecked(true, 'input[data-test="VAFOnlyHighlighted"]');
+
const res = browser.checkElement('[data-test=VAFChartWrapper]');
assertScreenShotMatch(res);
});
it('pvge line chart log scale', function() {
- $('input[data-test="VAFLogScale"]').click();
+ jsApiClick('input[data-test="VAFLogScale"]');
+
const res = browser.checkElement('[data-test=VAFChartWrapper]');
assertScreenShotMatch(res);
});
it('pvge line chart with data range y axis', function() {
- $('input[data-test="VAFDataRange"]').click();
+ jsApiClick('input[data-test="VAFDataRange"]');
+
const res = browser.checkElement('[data-test=VAFChartWrapper]');
assertScreenShotMatch(res);
});
diff --git a/end-to-end-test/remote/specs/core/home.spec.js b/end-to-end-test/remote/specs/core/home.spec.js
index e5bee9b28ee..bcc5f4b857b 100644
--- a/end-to-end-test/remote/specs/core/home.spec.js
+++ b/end-to-end-test/remote/specs/core/home.spec.js
@@ -637,7 +637,7 @@ describe('auto-selecting needed profiles for oql in query form', () => {
$('button[data-test="queryButton"]').click();
// wait for query to load
- waitForOncoprint(30000);
+ waitForOncoprint();
const profileFilter = (
browser.execute(function() {
@@ -739,7 +739,7 @@ describe('results page quick oql edit', () => {
$('button[data-test="oqlQuickEditSubmitButton"]').click();
// wait for query to load
- waitForOncoprint(20000);
+ waitForOncoprint();
// mutation, cna, mrna profiles are there
let profileFilter = (
diff --git a/end-to-end-test/remote/specs/core/mutationsTab.spec.js b/end-to-end-test/remote/specs/core/mutationsTab.spec.js
index ee9fe0ea713..5812872478c 100644
--- a/end-to-end-test/remote/specs/core/mutationsTab.spec.js
+++ b/end-to-end-test/remote/specs/core/mutationsTab.spec.js
@@ -14,7 +14,7 @@ describe('mutations tab', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=acc_tcga_pan_can_atlas_2018&case_set_id=acc_tcga_pan_can_atlas_2018_cnaseq&data_priority=0&gene_list=HSD17B4&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_pan_can_atlas_2018_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_pan_can_atlas_2018_mutations&tab_index=tab_visualize`
);
- waitForOncoprint(60000);
+ waitForOncoprint();
setSettingsMenuOpen(true);
$('input[data-test="HideVUS"]').click();
setSettingsMenuOpen(false);
diff --git a/end-to-end-test/remote/specs/core/oncoprint.gaps.spec.js b/end-to-end-test/remote/specs/core/oncoprint.gaps.spec.js
index 911fdc20f96..ea892769dcb 100644
--- a/end-to-end-test/remote/specs/core/oncoprint.gaps.spec.js
+++ b/end-to-end-test/remote/specs/core/oncoprint.gaps.spec.js
@@ -28,7 +28,7 @@ describe('oncoprint gap screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?cancer_study_list=coadread_tcga_pub&cancer_study_id=coadread_tcga_pub&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&Z_SCORE_THRESHOLD=2.0&case_set_id=coadread_tcga_pub_cna&gene_list=BCHE%252CCDK8%252CCTBP1%252CACKR3&gene_set_choice=user-defined-list&&clinicallist=SEX,CANCER_TYPE_DETAILED&profileFilter=mutations%2Cgistic&geneset_list=%20&tab_index=tab_visualize&Action=Submit`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
});
it('shows gaps for sex track with correct subgroup percentages', function() {
const sexElements = getNthOncoprintTrackOptionsElements(1);
@@ -41,7 +41,7 @@ describe('oncoprint gap screenshot tests', function() {
$(`${sexElements.dropdown_selector} li:nth-child(9)`).click(); // Click "show gaps"
browser.pause(100); // give time to sort and insert gaps
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
$('.oncoprint__zoom-controls .fa-search-minus').click();
$('.oncoprint__zoom-controls .fa-search-minus').click();
@@ -67,7 +67,7 @@ describe('oncoprint gap screenshot tests', function() {
).click(); // Click "show gaps"
browser.pause(100); // give time to sort and insert gaps
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
const res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
diff --git a/end-to-end-test/remote/specs/core/oncoprint.screenshot.spec.js b/end-to-end-test/remote/specs/core/oncoprint.screenshot.spec.js
index 107a2de6730..b6e2715a775 100644
--- a/end-to-end-test/remote/specs/core/oncoprint.screenshot.spec.js
+++ b/end-to-end-test/remote/specs/core/oncoprint.screenshot.spec.js
@@ -27,28 +27,28 @@ describe('oncoprint screenshot tests', function() {
it('ov_tcga_pub with germline mutations', function() {
var url = `${CBIOPORTAL_URL}/results/oncoprint?cancer_study_list=ov_tcga_pub&cancer_study_id=ov_tcga_pub&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=ov_tcga_pub_mutations&Z_SCORE_THRESHOLD=2.0&case_set_id=ov_tcga_pub_3way_complete&gene_list=BRCA1%20BRCA2&gene_set_choice=user-defined-list`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('coadread_tcga_pub with clinical and heatmap tracks', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=coadread_tcga_pub&Z_SCORE_THRESHOLD=1&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=coadread_tcga_pub_nonhypermut&gene_list=KRAS%20NRAS%20BRAF&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=coadread_tcga_pub_rna_seq_mrna_median_Zscores&show_samples=false&clinicallist=0%2C2%2CMETHYLATION_SUBTYPE&heatmap_track_groups=coadread_tcga_pub_rna_seq_mrna_median_Zscores%2CKRAS%2CNRAS%2CBRAF&`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('acc_tcga with clinical and heatmap tracks', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=acc_tcga&Z_SCORE_THRESHOLD=1&RPPA_SCORE_THRESHOLD=1&data_priority=0&case_set_id=acc_tcga_all&gene_list=SOX9%20RAN%20TNK2%20EP300%20PXN%20NCOA2%20AR%20NRIP1%20NCOR1%20NCOR2&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=acc_tcga_rna_seq_v2_mrna_median_Zscores&genetic_profile_ids_PROFILE_PROTEIN_EXPRESSION=acc_tcga_rppa_Zscores&show_samples=false&clinicallist=0%2C1%2CMETASTATIC_DX_CONFIRMED_BY&heatmap_track_groups=acc_tcga_rna_seq_v2_mrna_median_Zscores%2CSOX9%2CRAN%2CTNK2%2CEP300%2CPXN%2CNCOA2%2CAR%2CNRIP1%2CNCOR1%2CNCOR2`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('blca_tcga with clinical and heatmap tracks', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=blca_tcga_pub&Z_SCORE_THRESHOLD=1&RPPA_SCORE_THRESHOLD=1&data_priority=0&case_set_id=blca_tcga_pub_all&gene_list=SOX9%20RAN%20TNK2%20EP300%20PXN%20NCOA2%20AR%20NRIP1%20NCOR1%20NCOR2&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=blca_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=blca_tcga_pub_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=blca_tcga_pub_rna_seq_mrna_median_Zscores&genetic_profile_ids_PROFILE_PROTEIN_EXPRESSION=blca_tcga_pub_rppa_Zscores&show_samples=false&heatmap_track_groups=blca_tcga_pub_rna_seq_mrna_median_Zscores%2CSOX9%2CRAN%2CTNK2%2CEP300%2CPXN%2CNCOA2%2CAR%2CNRIP1%2CNCOR1%2CNCOR2&clinicallist=CANCER_TYPE_DETAILED%2CMETASTATIC_SITE_OTHER%2CNEW_TUMOR_EVENT_AFTER_INITIAL_TREATMENT`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
@@ -56,42 +56,42 @@ describe('oncoprint screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=hcc_inserm_fr_2015&Z_SCORE_THRESHOLD=2.0&RPPA_SCORE_THRESHOLD=2.0&data_priority=0&case_set_id=hcc_inserm_fr_2015_sequenced&gene_list=SOX9%2520RAN%2520TNK2%2520EP300%2520PXN%2520NCOA2%2520AR%2520NRIP1%2520NCOR1%2520NCOR2%2520TERT&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=hcc_inserm_fr_2015_mutations`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('msk_impact_2017 with SOS1 - SOS1 should be not sequenced', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=msk_impact_2017&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=msk_impact_2017_all&gene_list=SOS1&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=msk_impact_2017_mutations`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('msk_impact_2017 with ALK and SOS1 - SOS1 should be not sequenced', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=msk_impact_2017&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=msk_impact_2017_all&gene_list=ALK%2520SOS1&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=msk_impact_2017_mutations`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('msk_impact_2017 with SOS1 with CNA profile - SOS1 should not be sequenced', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=msk_impact_2017&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=msk_impact_2017_all&gene_list=SOS1&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=msk_impact_2017_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=msk_impact_2017_cna`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('brca_tcga_pub with KRAS NRAS BRAF and methylation heatmap tracks', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=brca_tcga_pub&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=brca_tcga_pub_cnaseq&gene_list=KRAS%2520NRAS%2520BRAF&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=brca_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=brca_tcga_pub_gistic&show_samples=false&heatmap_track_groups=brca_tcga_pub_methylation_hm27%2CKRAS%2CNRAS%2CBRAF%2CTP53%2CBRCA1%2CBRCA2`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('profiled in tracks in msk impact with 3 not profiled genes', function() {
var url = `${CBIOPORTAL_URL}/index.do?cancer_study_id=msk_impact_2017&Z_SCORE_THRESHOLD=2.0&RPPA_SCORE_THRESHOLD=2.0&data_priority=0&case_set_id=msk_impact_2017_cnaseq&gene_list=AKR1C1%2520AKR1C2%2520AKR1C4&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=msk_impact_2017_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=msk_impact_2017_cna`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
@@ -99,14 +99,14 @@ describe('oncoprint screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?session_id=5c38e4c0e4b05228701fb0c9&show_samples=false`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
it('profiled in tracks in multiple study with SOS1', function() {
var url = `${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=msk_impact_2017%2Cbrca_tcga_pub&case_set_id=all&data_priority=0&gene_list=SOS1&geneset_list=%20&tab_index=tab_visualize`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
@@ -114,7 +114,7 @@ describe('oncoprint screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=acc_tcga_pan_can_atlas_2018&case_set_id=acc_tcga_pan_can_atlas_2018_cnaseq&data_priority=0&gene_list=EGFR%253AAMP%253BEGFR%253AMUT%253B%2520PTEN%253B%2520EGFR%2520EGFR&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_pan_can_atlas_2018_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_pan_can_atlas_2018_mutations&tab_index=tab_visualize`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
@@ -122,7 +122,7 @@ describe('oncoprint screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=ccle_broad_2019&case_set_id=ccle_broad_2019_cnaseq&data_priority=0&gene_list=TP53&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=ccle_broad_2019_cna&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=ccle_broad_2019_mutations&profileFilter=0&tab_index=tab_visualize&heatmap_track_groups=ccle_broad_2019_CCLE_drug_treatment_IC50%2CAfatinib-2%2CAKTinhibitorVIII-1&treatment_list=Afatinib-2%3BAKTinhibitorVIII-1`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
const elements = getNthOncoprintTrackOptionsElements(2);
setDropdownOpen(
@@ -132,7 +132,7 @@ describe('oncoprint screenshot tests', function() {
'Couldnt open top treatment track options'
);
$(elements.dropdown_selector + ' li:nth-child(3)').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement('.oncoprintContainer');
assertScreenShotMatch(res);
@@ -141,7 +141,7 @@ describe('oncoprint screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results?Z_SCORE_THRESHOLD=2.0&cancer_study_id=coadread_tcga_pub&cancer_study_list=coadread_tcga_pub&case_set_id=coadread_tcga_pub_nonhypermut&clinicallist=CANCER_TYPE_DETAILED&gene_list=KRAS%20NRAS%20BRAF&gene_set_choice=user-defined-list&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
const cancerTypeDetailedElements = getNthOncoprintTrackOptionsElements(
1
@@ -177,7 +177,7 @@ describe('track group headers', function() {
`${CBIOPORTAL_URL}/results/oncoprint?Z_SCORE_THRESHOLD=2.0&cancer_study_id=coadread_tcga_pub&cancer_study_list=coadread_tcga_pub&case_set_id=coadread_tcga_pub_nonhypermut&gene_list=KRAS%20NRAS%20BRAF&gene_set_choice=user-defined-list&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&heatmap_track_groups=coadread_tcga_pub_rna_seq_mrna_median_Zscores%2CKRAS%2CNRAS%2CBRAF%3Bcoadread_tcga_pub_methylation_hm27%2CKRAS%2CNRAS%2CBRAF&show_samples=false`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// Cluster the mrna heatmap group
var mrnaElements = getGroupHeaderOptionsElements(2);
@@ -206,7 +206,7 @@ describe('track group headers', function() {
);
$(mrnaElements.dropdown_selector + ' li:nth-child(4)').click(); // Click Delete
- waitForOncoprint(10000);
+ waitForOncoprint();
var res = checkOncoprintElement();
assertScreenShotMatch(res);
@@ -222,7 +222,7 @@ describe('track group headers', function() {
'could not open mrna group options dropdown'
);
$(methylElements.dropdown_selector + ' li:nth-child(4)').click(); // Click Delete
- waitForOncoprint(10000);
+ waitForOncoprint();
var res = checkOncoprintElement();
assertScreenShotMatch(res);
@@ -280,7 +280,7 @@ describe('sorting', function() {
$('[data-test="queryButton"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement();
assertScreenShotMatch(res);
@@ -294,7 +294,7 @@ describe('sorting', function() {
);
$(eventsPerSampleRadioButton).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
setDropdownOpen(
false,
@@ -334,7 +334,7 @@ describe('sorting', function() {
$('[data-test="queryButton"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = checkOncoprintElement();
assertScreenShotMatch(res);
@@ -348,7 +348,7 @@ describe('sorting', function() {
);
$(eventsPerSampleRadioButton).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
setDropdownOpen(
false,
@@ -366,7 +366,7 @@ describe('sorting', function() {
'/index.do?cancer_study_id=gbm_tcga_pub&Z_SCORE_THRESHOLD=2.0&RPPA_SCORE_THRESHOLD=2.0&data_priority=0&case_set_id=gbm_tcga_pub_cnaseq&gene_list=TP53%20MDM2%20MDM4&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=gbm_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=gbm_tcga_pub_cna_rae&clinicallist=FRACTION_GENOME_ALTERED%2CDFS_MONTHS%2CKARNOFSKY_PERFORMANCE_SCORE%2COS_STATUS&heatmap_track_groups=gbm_tcga_pub_mrna_median_Zscores%2CTP53%2CMDM2%2CMDM4%3Bgbm_tcga_pub_mrna_merged_median_Zscores%2CTP53%2CMDM2%2CMDM4'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// first get rid of the Profiled track
var profiledElements = getNthOncoprintTrackOptionsElements(5);
@@ -375,7 +375,7 @@ describe('sorting', function() {
timeout: 1000,
}); // wait for menu to appear
$(profiledElements.dropdown_selector + ' li:nth-child(3)').click(); // Click Remove Track
- waitForOncoprint(2000);
+ waitForOncoprint();
var res = checkOncoprintElement();
assertScreenShotMatch(res);
@@ -389,7 +389,7 @@ describe('sorting', function() {
);
$(eventsPerSampleRadioButton).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
$(eventsPerPatientRadioButton).waitForDisplayed({ timeout: 2000 });
setDropdownOpen(
@@ -410,7 +410,7 @@ describe('sorting', function() {
);
$(eventsPerPatientRadioButton).click(); // go to patient mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var overallSurvivalElements = getNthOncoprintTrackOptionsElements(4);
overallSurvivalElements.button.click();
@@ -487,7 +487,7 @@ describe('sorting', function() {
);
$(eventsPerSampleRadioButton).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
setDropdownOpen(
false,
@@ -583,7 +583,7 @@ describe('sorting', function() {
'/index.do?cancer_study_id=gbm_tcga_pub&Z_SCORE_THRESHOLD=2.0&RPPA_SCORE_THRESHOLD=2.0&data_priority=0&case_set_id=gbm_tcga_pub_cnaseq&gene_list=TP53%2520MDM2%2520MDM4&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=gbm_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=gbm_tcga_pub_cna_rae&clinicallist=FRACTION_GENOME_ALTERED%2CDFS_MONTHS%2CKARNOFSKY_PERFORMANCE_SCORE%2COS_STATUS&heatmap_track_groups=gbm_tcga_pub_mrna_median_Zscores%2CTP53%2CMDM2%2CMDM4%3Bgbm_tcga_pub_mrna_merged_median_Zscores%2CTP53%2CMDM2%2CMDM4&show_samples=true'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// Sort heatmap tracks
var TP53HeatmapElements = getNthOncoprintTrackOptionsElements(8);
@@ -671,7 +671,7 @@ describe('sorting', function() {
eventsPerPatientRadioButton
);
$(eventsPerPatientRadioButton).click(); // go to patient mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
setDropdownOpen(
false,
diff --git a/end-to-end-test/remote/specs/core/oncoprint.spec.js b/end-to-end-test/remote/specs/core/oncoprint.spec.js
index 797503dd049..fe73c393f59 100644
--- a/end-to-end-test/remote/specs/core/oncoprint.spec.js
+++ b/end-to-end-test/remote/specs/core/oncoprint.spec.js
@@ -34,7 +34,7 @@ describe('merged tracks', () => {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=coadread_tcga&case_set_id=coadread_tcga_cnaseq&data_priority=0&gene_list=%255B%2522RAS%2522%2520KRAS%2520NRAS%2520HRAS%255D&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_mutations&tab_index=tab_visualize`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var trackOptionsElts = getNthOncoprintTrackOptionsElements(1);
// open menu
@@ -44,7 +44,7 @@ describe('merged tracks', () => {
});
// click expand
$(trackOptionsElts.dropdown_selector + ' li:nth-child(3)').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = browser.checkElement('.oncoprintContainer', '', {
hide: ['.oncoprint__controls'],
@@ -61,7 +61,7 @@ describe('oncoprint', function() {
CBIOPORTAL_URL +
'/index.do?cancer_study_id=acc_tcga&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=acc_tcga_cnaseq&gene_list=KRAS%2520NRAS%2520BRAF&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_gistic'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
const patient_id_order =
'VENHQS1PUi1BNUpZOmFjY190Y2dh,VENHQS1PUi1BNUo0OmFjY190Y2dh,VENHQS1PUi1BNUpCOmFjY190Y2dh,VENHQS1PUi1BNUoxOmFjY190Y2dh,VENHQS1PUi1BNUoyOmFjY190Y2dh,VENHQS1PUi1BNUozOmFjY190Y2dh,VENHQS1PUi1BNUo1OmFjY190Y2dh,VENHQS1PUi1BNUo2OmFjY190Y2dh,VENHQS1PUi1BNUo3OmFjY190Y2dh,VENHQS1PUi1BNUo4OmFjY190Y2dh,VENHQS1PUi1BNUo5OmFjY190Y2dh,VENHQS1PUi1BNUpBOmFjY190Y2dh,VENHQS1PUi1BNUpDOmFjY190Y2dh,VENHQS1PUi1BNUpEOmFjY190Y2dh,VENHQS1PUi1BNUpFOmFjY190Y2dh,VENHQS1PUi1BNUpGOmFjY190Y2dh,VENHQS1PUi1BNUpHOmFjY190Y2dh,VENHQS1PUi1BNUpIOmFjY190Y2dh,VENHQS1PUi1BNUpJOmFjY190Y2dh,VENHQS1PUi1BNUpKOmFjY190Y2dh,VENHQS1PUi1BNUpLOmFjY190Y2dh,VENHQS1PUi1BNUpMOmFjY190Y2dh,VENHQS1PUi1BNUpNOmFjY190Y2dh,VENHQS1PUi1BNUpPOmFjY190Y2dh,VENHQS1PUi1BNUpQOmFjY190Y2dh,VENHQS1PUi1BNUpROmFjY190Y2dh,VENHQS1PUi1BNUpSOmFjY190Y2dh,VENHQS1PUi1BNUpTOmFjY190Y2dh,VENHQS1PUi1BNUpUOmFjY190Y2dh,VENHQS1PUi1BNUpVOmFjY190Y2dh,VENHQS1PUi1BNUpWOmFjY190Y2dh,VENHQS1PUi1BNUpXOmFjY190Y2dh,VENHQS1PUi1BNUpYOmFjY190Y2dh,VENHQS1PUi1BNUpaOmFjY190Y2dh,VENHQS1PUi1BNUswOmFjY190Y2dh,VENHQS1PUi1BNUsxOmFjY190Y2dh,VENHQS1PUi1BNUsyOmFjY190Y2dh,VENHQS1PUi1BNUszOmFjY190Y2dh,VENHQS1PUi1BNUs0OmFjY190Y2dh,VENHQS1PUi1BNUs1OmFjY190Y2dh,VENHQS1PUi1BNUs2OmFjY190Y2dh,VENHQS1PUi1BNUs4OmFjY190Y2dh,VENHQS1PUi1BNUs5OmFjY190Y2dh,VENHQS1PUi1BNUtCOmFjY190Y2dh,VENHQS1PUi1BNUtPOmFjY190Y2dh,VENHQS1PUi1BNUtQOmFjY190Y2dh,VENHQS1PUi1BNUtROmFjY190Y2dh,VENHQS1PUi1BNUtTOmFjY190Y2dh,VENHQS1PUi1BNUtUOmFjY190Y2dh,VENHQS1PUi1BNUtVOmFjY190Y2dh,VENHQS1PUi1BNUtWOmFjY190Y2dh,VENHQS1PUi1BNUtXOmFjY190Y2dh,VENHQS1PUi1BNUtYOmFjY190Y2dh,VENHQS1PUi1BNUtZOmFjY190Y2dh,VENHQS1PUi1BNUtaOmFjY190Y2dh,VENHQS1PUi1BNUwxOmFjY190Y2dh,VENHQS1PUi1BNUwyOmFjY190Y2dh,VENHQS1PUi1BNUwzOmFjY190Y2dh,VENHQS1PUi1BNUw0OmFjY190Y2dh,VENHQS1PUi1BNUw1OmFjY190Y2dh,VENHQS1PUi1BNUw2OmFjY190Y2dh,VENHQS1PUi1BNUw4OmFjY190Y2dh,VENHQS1PUi1BNUw5OmFjY190Y2dh,VENHQS1PUi1BNUxBOmFjY190Y2dh,VENHQS1PUi1BNUxCOmFjY190Y2dh,VENHQS1PUi1BNUxDOmFjY190Y2dh,VENHQS1PUi1BNUxEOmFjY190Y2dh,VENHQS1PUi1BNUxFOmFjY190Y2dh,VENHQS1PUi1BNUxGOmFjY190Y2dh,VENHQS1PUi1BNUxHOmFjY190Y2dh,VENHQS1PUi1BNUxIOmFjY190Y2dh,VENHQS1PUi1BNUxJOmFjY190Y2dh,VENHQS1PUi1BNUxKOmFjY190Y2dh,VENHQS1PUi1BNUxLOmFjY190Y2dh,VENHQS1PUi1BNUxMOmFjY190Y2dh,VENHQS1PUi1BNUxOOmFjY190Y2dh,VENHQS1PUi1BNUxPOmFjY190Y2dh,VENHQS1PUi1BNUxQOmFjY190Y2dh,VENHQS1PUi1BNUxSOmFjY190Y2dh,VENHQS1PUi1BNUxTOmFjY190Y2dh,VENHQS1PUi1BNUxUOmFjY190Y2dh,VENHQS1PVS1BNVBJOmFjY190Y2dh,VENHQS1QNi1BNU9IOmFjY190Y2dh,VENHQS1QQS1BNVlHOmFjY190Y2dh,VENHQS1QSy1BNUg5OmFjY190Y2dh,VENHQS1QSy1BNUhBOmFjY190Y2dh,VENHQS1QSy1BNUhCOmFjY190Y2dh,VENHQS1QSy1BNUhDOmFjY190Y2dh';
@@ -79,7 +79,7 @@ describe('oncoprint', function() {
'/index.do?cancer_study_id=acc_tcga&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&show_samples=false&data_priority=0&case_set_id=acc_tcga_cnaseq&gene_list=KRAS%2520NRAS%2520BRAF&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_gistic'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.equal(
browser.execute(function() {
@@ -95,7 +95,7 @@ describe('oncoprint', function() {
CBIOPORTAL_URL +
'/index.do?cancer_study_id=acc_tcga&show_samples=true&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=acc_tcga_cnaseq&gene_list=KRAS%2520NRAS%2520BRAF&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_gistic'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.equal(
browser.execute(function() {
@@ -111,7 +111,7 @@ describe('oncoprint', function() {
CBIOPORTAL_URL +
'/index.do?cancer_study_id=acc_tcga&show_samples=true&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=acc_tcga_cnaseq&gene_list=KRAS%2520NRAS%2520BRAF&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_gistic&clinicallist=asodifjpaosidjfa'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.equal(
browser.execute(function() {
@@ -135,7 +135,7 @@ describe('oncoprint', function() {
CBIOPORTAL_URL +
'/index.do?cancer_study_id=acc_tcga&show_samples=true&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=acc_tcga_cnaseq&gene_list=KRAS%2520NRAS%2520BRAF&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_gistic&clinicallist=CANCER_TYPE,asodifjpaosidjfa,CANCER_TYPE_DETAILED,FRACTION_GENOME_ALTERED,aposdijfpoai,MUTATION_COUNT'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.equal(
browser.execute(function() {
@@ -161,7 +161,7 @@ describe('oncoprint', function() {
`${CBIOPORTAL_URL}/results/oncoprint?Z_SCORE_THRESHOLD=2.0&cancer_study_id=coadread_tcga_pub&cancer_study_list=coadread_tcga_pub&case_set_id=coadread_tcga_pub_nonhypermut&gene_list=KRAS%20NRAS%20BRAF&gene_set_choice=user-defined-list&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&heatmap_track_groups=coadread_tcga_pub_rna_seq_mrna_median_Zscores%2CKRAS%2CNRAS%2CBRAF%3Bcoadread_tcga_pub_methylation_hm27%2CKRAS%2CNRAS%2CBRAF&show_samples=false`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var FONT_WEIGHT_NORMAL = 400;
var FONT_WEIGHT_BOLD = 700;
@@ -276,7 +276,7 @@ describe('oncoprint', function() {
CBIOPORTAL_URL +
'/index.do?cancer_study_id=coadread_tcga_pub&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=coadread_tcga_pub_cna_seq&gene_list=FBXW7&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations'
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
resultsPageSettingsDropdown =
'div[data-test="GlobalSettingsDropdown"]';
@@ -316,7 +316,7 @@ describe('oncoprint', function() {
$('[data-test="queryButton"]').scrollIntoView();
$('[data-test="queryButton"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// All patient/samples with germline mutation should be displayed first
// ====================================================================
@@ -339,7 +339,7 @@ describe('oncoprint', function() {
'.oncoprintContainer .oncoprint__controls input[type="radio"][name="columnType"][value="0"]'
).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// check if samples are sorted
assert.equal(
@@ -355,7 +355,7 @@ describe('oncoprint', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=ov_tcga_pub&case_set_id=ov_tcga_pub_cna_seq&data_priority=0&gene_list=BRCA1&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=ov_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=ov_tcga_pub_mutations&tab_index=tab_visualize`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
let oncoprintDivText = $('#oncoprintDiv').getText();
let legendText = getTextInOncoprintLegend();
assert(
@@ -371,7 +371,7 @@ describe('oncoprint', function() {
const hideGermlineButton = 'input[data-test="HideGermline"]';
$(hideGermlineButton).waitForDisplayed({ timeout: 1000 });
$(hideGermlineButton).click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
legendText = getTextInOncoprintLegend();
oncoprintDivText = $('#oncoprintDiv').getText();
assert(
@@ -383,7 +383,7 @@ describe('oncoprint', function() {
setSettingsMenuOpen(true);
$(hideGermlineButton).waitForDisplayed({ timeout: 1000 });
$(hideGermlineButton).click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
legendText = getTextInOncoprintLegend();
oncoprintDivText = $('#oncoprintDiv').getText();
assert(
@@ -397,7 +397,7 @@ describe('oncoprint', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=ov_tcga_pub&case_set_id=ov_tcga_pub_cna_seq&data_priority=0&gene_list=BRCA1&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=ov_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=ov_tcga_pub_mutations&tab_index=tab_visualize`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
let legendText = getTextInOncoprintLegend();
let oncoprintDivText = $('#oncoprintDiv').getText();
assert(
@@ -410,7 +410,7 @@ describe('oncoprint', function() {
const colorByGermline = 'input[data-test="ColorByGermline"]';
$(colorByGermline).waitForDisplayed({ timeout: 1000 });
$(colorByGermline).click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
legendText = getTextInOncoprintLegend();
oncoprintDivText = $('#oncoprintDiv').getText();
assert(
@@ -422,7 +422,7 @@ describe('oncoprint', function() {
setOncoprintMutationsMenuOpen(true);
$(colorByGermline).waitForDisplayed({ timeout: 1000 });
$(colorByGermline).click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
legendText = getTextInOncoprintLegend();
oncoprintDivText = $('#oncoprintDiv').getText();
assert(
@@ -440,7 +440,7 @@ describe('oncoprint', function() {
it('should sort patients and samples by custom case list order correctly', () => {
function doCustomCaseOrderTest() {
// now we're on results page
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// make sure we are in sample mode
$(
@@ -453,7 +453,7 @@ describe('oncoprint', function() {
'.oncoprintContainer .oncoprint__controls input[type="radio"][name="columnType"][value="1"]'
).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
$('#sortDropdown').click();
$(
@@ -481,7 +481,7 @@ describe('oncoprint', function() {
$(
'.oncoprintContainer .oncoprint__controls input[type="radio"][name="columnType"][value="0"]'
).click(); // go to sample mode
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.equal(
browser.execute(function() {
@@ -584,7 +584,7 @@ describe('oncoprint', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=coadread_tcga_pub&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=-1&case_ids=coadread_tcga_pub%3ATCGA-AA-A00D-01%2Bcoadread_tcga_pub%3ATCGA-A6-2677-01&gene_list=BRAF&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&show_samples=false&clinicallist=SEX`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
let legendText = getTextInOncoprintLegend();
assert(legendText.indexOf('Male') > -1, 'a patient is male');
assert(legendText.indexOf('Female') > -1, 'a patient is female');
@@ -594,7 +594,7 @@ describe('oncoprint', function() {
).click(); // open view menu
$(checkboxSelector).waitForExist({ timeout: 1000 });
$(checkboxSelector).click(); // turn off legend for unaltered cases
- waitForOncoprint(3000); // wait for oncoprint to reset
+ waitForOncoprint(); // wait for oncoprint to reset
legendText = getTextInOncoprintLegend();
assert(legendText.indexOf('Male') > -1, 'altered patient is male');
assert(
@@ -605,7 +605,7 @@ describe('oncoprint', function() {
$(
'.oncoprintContainer .oncoprint__controls input[type="radio"][name="columnType"][value="0"]'
).click(); // go to sample mode
- waitForOncoprint(3000); // wait for oncoprint to reset
+ waitForOncoprint(); // wait for oncoprint to reset
legendText = getTextInOncoprintLegend();
assert(legendText.indexOf('Male') > -1, 'altered sample is male');
assert(
@@ -614,7 +614,7 @@ describe('oncoprint', function() {
);
$(checkboxSelector).click(); // turn back on legend for unaltered cases
- waitForOncoprint(3000); // wait for oncoprint to reset
+ waitForOncoprint(); // wait for oncoprint to reset
legendText = getTextInOncoprintLegend();
assert(legendText.indexOf('Male') > -1, 'a sample is male');
assert(legendText.indexOf('Female') > -1, 'a sample is female');
@@ -623,7 +623,7 @@ describe('oncoprint', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=coadread_tcga_pub&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=-1&case_ids=coadread_tcga_pub%3ATCGA-A6-2677-01&gene_list=BRAF&geneset_list=%20&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&show_samples=false&clinicallist=SEX`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
let legendText = getTextInOncoprintLegend();
assert(
legendText.indexOf('Sex') > -1,
@@ -639,7 +639,7 @@ describe('oncoprint', function() {
).click(); // open view menu
$(checkboxSelector).waitForExist({ timeout: 1000 });
$(checkboxSelector).click(); // turn off legend for unaltered cases
- waitForOncoprint(3000); // wait for oncoprint to reset
+ waitForOncoprint(); // wait for oncoprint to reset
legendText = getTextInOncoprintLegend();
assert(
legendText.indexOf('Sex') === -1,
@@ -653,7 +653,7 @@ describe('oncoprint', function() {
$(
'.oncoprintContainer .oncoprint__controls input[type="radio"][name="columnType"][value="0"]'
).click(); // go to sample mode
- waitForOncoprint(3000); // wait for oncoprint to reset
+ waitForOncoprint(); // wait for oncoprint to reset
legendText = getTextInOncoprintLegend();
assert(
legendText.indexOf('Sex') === -1,
@@ -665,7 +665,7 @@ describe('oncoprint', function() {
);
$(checkboxSelector).click(); // turn back on legend for unaltered cases
- waitForOncoprint(3000); // wait for oncoprint to reset
+ waitForOncoprint(); // wait for oncoprint to reset
legendText = getTextInOncoprintLegend();
assert(
legendText.indexOf('Sex') > -1,
diff --git a/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js b/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js
index a6aa1302622..cccf8a4908e 100644
--- a/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js
+++ b/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js
@@ -172,7 +172,7 @@ describe('oncoprinter screenshot tests', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=msk_impact_2017&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=msk_impact_2017_Non-Small_Cell_Lung_Cancer&gene_list=STK11%253A%2520HOMDEL%2520MUT&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=msk_impact_2017_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=msk_impact_2017_cna`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
var res = browser.checkElement('.oncoprintContainer');
assertScreenShotMatch(res);
});
diff --git a/end-to-end-test/remote/specs/core/oncoprinterColorConfig.spec.js b/end-to-end-test/remote/specs/core/oncoprinterColorConfig.spec.js
index 52fc007dc61..cc422545002 100644
--- a/end-to-end-test/remote/specs/core/oncoprinterColorConfig.spec.js
+++ b/end-to-end-test/remote/specs/core/oncoprinterColorConfig.spec.js
@@ -39,7 +39,7 @@ describe('oncoprinter clinical example data, color configuration', () => {
getElementByTestHandle('color-picker-icon').click();
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
$('.circle-picker [title="#990099"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
getElementByTestHandle('color-picker-icon').waitForDisplayed();
getElementByTestHandle('color-picker-icon').click();
$('.circle-picker').waitForDisplayed({ reverse: true });
@@ -47,7 +47,7 @@ describe('oncoprinter clinical example data, color configuration', () => {
$$('[data-test="color-picker-icon"]')[1].click();
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
$('.circle-picker [title="#109618"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
getElementByTestHandle('color-picker-icon').waitForDisplayed();
$$('[data-test="color-picker-icon"]')[1].click();
$('.circle-picker').waitForDisplayed({ reverse: true });
@@ -55,7 +55,7 @@ describe('oncoprinter clinical example data, color configuration', () => {
$$('[data-test="color-picker-icon"]')[2].click();
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
$('.circle-picker [title="#8b0707"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.strictEqual(
$('[data-test="color-picker-icon"] rect').getAttribute('fill'),
@@ -92,7 +92,7 @@ describe('oncoprinter clinical example data, color configuration', () => {
it('oncoprinter color configuration modal reflects default colors', () => {
// click "Reset Colors" track
getElementByTestHandle('resetColors').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.strictEqual(
$('[data-test="color-picker-icon"] rect').getAttribute('fill'),
diff --git a/end-to-end-test/remote/specs/core/redirect.spec.js b/end-to-end-test/remote/specs/core/redirect.spec.js
index 23d93c3d1f5..0c3f9963f5b 100644
--- a/end-to-end-test/remote/specs/core/redirect.spec.js
+++ b/end-to-end-test/remote/specs/core/redirect.spec.js
@@ -13,6 +13,6 @@ describe('/encodedRedirect', () => {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/encodedRedirect?encodedURL=aHR0cHM6Ly93d3cuY2Jpb3BvcnRhbC5vcmcvcmVzdWx0cy9vbmNvcHJpbnQ/Wl9TQ09SRV9USFJFU0hPTEQ9Mi4wJmNhbmNlcl9zdHVkeV9pZD1jb2FkcmVhZF90Y2dhX3B1YiZjYW5jZXJfc3R1ZHlfbGlzdD1jb2FkcmVhZF90Y2dhX3B1YiZjYXNlX3NldF9pZD1jb2FkcmVhZF90Y2dhX3B1Yl9ub25oeXBlcm11dCZnZW5lX2xpc3Q9S1JBUyUyME5SQVMlMjBCUkFGJmdlbmVfc2V0X2Nob2ljZT11c2VyLWRlZmluZWQtbGlzdCZnZW5ldGljX3Byb2ZpbGVfaWRzX1BST0ZJTEVfQ09QWV9OVU1CRVJfQUxURVJBVElPTj1jb2FkcmVhZF90Y2dhX3B1Yl9naXN0aWMmZ2VuZXRpY19wcm9maWxlX2lkc19QUk9GSUxFX01VVEFUSU9OX0VYVEVOREVEPWNvYWRyZWFkX3RjZ2FfcHViX211dGF0aW9ucw%3D%3D`
);
- waitForOncoprint(10000);
+ waitForOncoprint();
});
});
diff --git a/end-to-end-test/remote/specs/core/results.logic.spec.js b/end-to-end-test/remote/specs/core/results.logic.spec.js
index 4dd5a3e59f5..d2ba2ebabf0 100644
--- a/end-to-end-test/remote/specs/core/results.logic.spec.js
+++ b/end-to-end-test/remote/specs/core/results.logic.spec.js
@@ -1,7 +1,9 @@
var assert = require('assert');
var expect = require('chai').expect;
-var {
+const asyncUtils = require('../../../shared/specUtils_Async');
+
+const {
clickQueryByGeneButton,
waitForNumberOfStudyCheckboxes,
waitForOncoprint,
@@ -32,77 +34,84 @@ describe('Invalid query handling', () => {
});
describe('cross cancer query', function() {
- it('should show cross cancer bar chart be defai;t with TP53 in title when selecting multiple studies and querying for single gene TP53', function() {
- goToUrlAndSetLocalStorage(
+ it('should show cross cancer bar chart be defai;t with TP53 in title when selecting multiple studies and querying for single gene TP53', async function() {
+ await asyncUtils.goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/cancerTypesSummary?cancer_study_list=chol_tcga%2Cblca_tcga_pub%2Ccoadread_tcga&Z_SCORE_THRESHOLD=2.0&RPPA_SCORE_THRESHOLD=2.0&data_priority=0&profileFilter=0&case_set_id=all&gene_list=TP53&geneset_list=%20&tab_index=tab_visualize&Action=Submit`
);
// wait for cancer types summary to appear
- $('[data-test="cancerTypeSummaryChart"]').waitForExist({
+ await asyncUtils.getElementByTestHandle('cancerTypeSummaryChart', {
timeout: 60000,
});
// check if TP53 is in the navigation above the plots
- $('.nav-pills').waitForExist({ timeout: 30000 });
- var text = $('.nav-pills').getText();
- assert(text.search('TP53') > -1);
+ await browser.waitUntil(() => {
+ return $('.nav-pills*=TP53').isDisplayed();
+ });
});
});
-describe('single study query', function() {
- this.retries(1);
-
- describe('mutation mapper ', function() {
- it('should show somatic and germline mutation rate', function() {
- goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}`);
+describe('single study query', async function() {
+ this.retries(0);
- var input = $('[data-test=study-search] input[type=text]');
+ describe('mutation mapper ', async function() {
+ it('should show somatic and germline mutation rate', async () => {
+ await asyncUtils.goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}`);
- input.waitForExist({ timeout: 10000 });
+ const input = await $('[data-test=study-search] input[type=text]');
- input.setValue('ovarian nature 2011');
+ await input.waitForExist({ timeout: 10000 });
- waitForNumberOfStudyCheckboxes(1);
+ await input.setValue('ovarian nature 2011');
- var checkBox = $('[data-test="StudySelect"]');
+ await asyncUtils.waitForNumberOfStudyCheckboxes(1);
- checkBox.waitForExist({ timeout: 10000 });
+ await asyncUtils.clickElement('[data-test="StudySelect"] input');
- $('[data-test="StudySelect"] input').click();
-
- clickQueryByGeneButton();
+ await asyncUtils.clickQueryByGeneButton();
// query BRCA1 and BRCA2
- $('[data-test="geneSet"]').setValue('BRCA1 BRCA2');
+ const geneInput = await $('[data-test="geneSet"]');
+ geneInput.setValue('BRCA1 BRCA2');
- $('[data-test="queryButton"]').waitForEnabled({ timeout: 10000 });
- $('[data-test="queryButton"]').click();
+ await (await $('[data-test="queryButton"]')).waitForEnabled({
+ timeout: 10000,
+ });
- // click mutations tab
- $('a.tabAnchor_mutations').waitForExist({ timeout: 10000 });
- $('a.tabAnchor_mutations').click();
+ await asyncUtils.clickElement('handle=queryButton', {
+ timeout: 10000,
+ });
- $('[data-test="mutation-rate-summary"]').waitForExist({
- timeout: 60000,
+ await asyncUtils.clickElement('a.tabAnchor_mutations', {
+ timeout: 10000,
});
- var text = $('[data-test="mutation-rate-summary"]').getText();
+
+ await asyncUtils.clickElement('handle=mutation-rate-summary', {
+ timeout: 6000,
+ });
+
+ const text = await asyncUtils.getText(
+ '[data-test="mutation-rate-summary"]'
+ );
+
// check germline mutation rate
assert(text.search('8.2%') > -1);
// check somatic mutation
assert(text.search('3.5%') > -1);
});
- it('should show lollipop for MUC2', function() {
- goToUrlAndSetLocalStorage(
+ it('should show lollipop for MUC2', async function() {
+ await asyncUtils.goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=cellline_nci60&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=cellline_nci60_cnaseq&gene_list=MUC2&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=cellline_nci60_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=cellline_nci60_cna`
);
- // wait for mutations tab
- $('a.tabAnchor_mutations').waitForExist({ timeout: 10000 });
- $('a.tabAnchor_mutations').click();
+ await asyncUtils.clickElement('a.tabAnchor_mutations', {
+ timeout: 10000,
+ });
- // check lollipop plot appears
- $('[data-test="LollipopPlot"]').waitForExist({ timeout: 60000 });
+ await asyncUtils.getElementByTestHandle('LollipopPlot', {
+ timeout: 6000,
+ });
});
});
@@ -120,14 +129,14 @@ describe('single study query', function() {
});
describe('results page', function() {
- this.retries(1);
+ this.retries(0);
describe('tab hiding', function() {
it('should hide coexpression and cn segment tabs in a query without any data for those tabs', () => {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?session_id=5bc64b48498eb8b3d5685af7`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert(!$('a.tabAnchor_coexpression').isDisplayed());
assert(!$('a.tabAnchor_cnSegments').isDisplayed());
});
@@ -162,13 +171,13 @@ describe('results page', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=coadread_tcga_pub&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=coadread_tcga_pub_nonhypermut&gene_list=KRAS%253A%2520MUT&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert(!$('a.tabAnchor_mutualExclusivity').isDisplayed());
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/index.do?cancer_study_id=coadread_tcga_pub&Z_SCORE_THRESHOLD=2&RPPA_SCORE_THRESHOLD=2&data_priority=0&case_set_id=coadread_tcga_pub_nonhypermut&gene_list=KRAS&geneset_list=+&tab_index=tab_visualize&Action=Submit&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert(!$('a.tabAnchor_mutualExclusivity').isDisplayed());
});
it('should not appear in a multiple study query with one gene', function() {
@@ -320,97 +329,59 @@ describe('genetic profile selection in modify query form', function() {
$('#modifyQueryBtn').waitForExist({ timeout: 20000 });
});
- it('contains correct selected genetic profiles through a certain use flow involving two studies', () => {
+ it('contains correct selected genetic profiles through a certain use flow involving two studies', async () => {
//populates selected genetic profiles from current query, then goes back to defaults if another study is selected then deselected
// open modify query form
$('#modifyQueryBtn').click();
- // wait for profiles selector to load
- $(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"]'
- ).waitForExist({ timeout: 3000 });
- // mutations, CNA, and protein should be selected
- assert(
- $(
+
+ browser.waitUntil(() => {
+ return $(
'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="MUTATION_EXTENDED"]'
- ).isSelected(),
- 'mutation profile should be selected'
+ ).isSelected();
+ });
+
+ await asyncUtils.isSelected(
+ 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="MUTATION_EXTENDED"]'
);
- assert(
- $(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="COPY_NUMBER_ALTERATION"]'
- ).isSelected(),
- 'cna profile should be selected'
+
+ await asyncUtils.isSelected(
+ 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="COPY_NUMBER_ALTERATION"]'
);
- assert(
- !$(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="MRNA_EXPRESSION"]'
- ).isSelected(),
- 'mrna profile not selected'
+
+ await asyncUtils.isSelected(
+ 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="MRNA_EXPRESSION"]'
);
- assert(
- $(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="PROTEIN_LEVEL"]'
- ).isSelected(),
- 'protein level should be selected'
+
+ await asyncUtils.isSelected(
+ 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="PROTEIN_LEVEL"]'
);
// select another study
- var input = $('div[data-test=study-search] input[type=text]');
- input.waitForExist({ timeout: 10000 });
- input.setValue('ampullary baylor');
- waitForNumberOfStudyCheckboxes(1);
- var checkBox = $('[data-test="StudySelect"]');
- checkBox.waitForExist({ timeout: 10000 });
- $('[data-test="StudySelect"] input').click();
+ var input = await $('div[data-test=study-search] input[type=text]');
+ await input.waitForExist({ timeout: 10000 });
+ await input.setValue('ampullary baylor');
+ await asyncUtils.waitForNumberOfStudyCheckboxes(1);
+ const checkBox = await $('[data-test="StudySelect"]');
+ await checkBox.waitForExist({ timeout: 10000 });
- // wait for data type priority selector to load
- getElementByTestHandle('MUTATION_EXTENDED').waitForExist({
- timeout: 10000,
- });
- getElementByTestHandle('COPY_NUMBER_ALTERATION').waitForExist({
- timeout: 10000,
- });
- assert(
- getElementByTestHandle('MUTATION_EXTENDED').isSelected(),
- "'Mutation' should be selected"
- );
- assert(
- getElementByTestHandle('COPY_NUMBER_ALTERATION').isSelected(),
- "'Copy number alterations' should be selected"
- );
+ await asyncUtils.clickElement(`[data-test="StudySelect"] input`);
- //deselect other study
- $('[data-test="StudySelect"] input').click();
+ await asyncUtils.isSelected('handle=MUTATION_EXTENDED');
- // wait for profiles selector to load
- $(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"]'
- ).waitForExist({ timeout: 3000 });
- // mutations, CNA should be selected
- assert(
- $(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="MUTATION_EXTENDED"]'
- ).isSelected(),
- 'mutation profile should be selected'
- );
- assert(
- $(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="COPY_NUMBER_ALTERATION"]'
- ).isSelected(),
- 'cna profile should be selected'
- );
- assert(
- !$(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="MRNA_EXPRESSION"]'
- ).isSelected(),
- 'mrna profile not selected'
- );
- assert(
- !$(
- 'div[data-test="molecularProfileSelector"] input[type="checkbox"][data-test="PROTEIN_LEVEL"]'
- ).isSelected(),
- 'protein level not selected'
- );
+ await asyncUtils.isSelected('handle=COPY_NUMBER_ALTERATION');
+
+ await asyncUtils.isSelected('handle=COPY_NUMBER_ALTERATION');
+
+ //deselect other study so that available profile types will change
+ await asyncUtils.clickElement(`[data-test="StudySelect"] input`);
+
+ await asyncUtils.isSelected('handle=MUTATION_EXTENDED');
+
+ await asyncUtils.isSelected('handle=COPY_NUMBER_ALTERATION');
+
+ await asyncUtils.isUnselected('handle=MRNA_EXPRESSION');
+
+ await asyncUtils.isUnselected('handle=PROTEIN_LEVEL');
});
it('contains correct selected genetic profiles through a certain use flow involving the "select all filtered studies" checkbox', () => {
@@ -418,7 +389,7 @@ describe('genetic profile selection in modify query form', function() {
// open modify query form
$('#modifyQueryBtn').click();
// wait for profiles selector to load
- getElementByTestHandle('MUTATION_EXTENDED').waitForExist({
+ getElementByTestHandle('MUTATION_EXTENDED', {
timeout: 10000,
});
@@ -449,19 +420,22 @@ describe('genetic profile selection in modify query form', function() {
input.waitForExist({ timeout: 10000 });
input.setValue('tcga -firehose');
browser.pause(500);
+
$(
'div[data-test="cancerTypeListContainer"] input[data-test="selectAllStudies"]'
).click();
// wait for data type priority selector to load
- getElementByTestHandle('MUTATION_EXTENDED').waitForExist({
- timeout: 10000,
+ // getElementByTestHandle('MUTATION_EXTENDED').waitForExist({
+ // timeout: 10000,
+ // });
+
+ browser.waitUntil(() => {
+ return getElementByTestHandle('MUTATION_EXTENDED').isSelected();
});
- assert(
- getElementByTestHandle('MUTATION_EXTENDED').isSelected(),
- "'Mutation' should be selected"
- );
+ //browser.debug();
+
assert(
getElementByTestHandle('COPY_NUMBER_ALTERATION').isSelected(),
"'Copy number alterations' should be selected"
@@ -532,6 +506,6 @@ describe('invalid query from url', function() {
$('[data-test="queryButton"]').click();
$('#modifyQueryBtn').waitForExist({ timeout: 3000 });
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
});
});
diff --git a/end-to-end-test/remote/specs/core/results.spec.js b/end-to-end-test/remote/specs/core/results.spec.js
index cc5f460dbc1..3042e4d4544 100644
--- a/end-to-end-test/remote/specs/core/results.spec.js
+++ b/end-to-end-test/remote/specs/core/results.spec.js
@@ -255,7 +255,7 @@ describe('Results Page', function() {
before(() => {
goToUrlAndSetLocalStorage(simpleQueryUrl);
- waitForOncoprint(10000);
+ waitForOncoprint();
});
it('should not be present in oncoprint tab with simple query', function() {
@@ -382,7 +382,7 @@ describe('Results Page', function() {
it('should be present in oncoprint tab with explicit query', function() {
goToUrlAndSetLocalStorage(explicitOqlQueryUrl);
- waitForOncoprint(10000);
+ waitForOncoprint();
assert(
$(
`${yesBannerSelector}.oncoprint-oql-status-banner`
diff --git a/end-to-end-test/remote/specs/core/resultsOncoprintColorConfig.spec.js b/end-to-end-test/remote/specs/core/resultsOncoprintColorConfig.spec.js
index d03868f7576..259d47f6867 100644
--- a/end-to-end-test/remote/specs/core/resultsOncoprintColorConfig.spec.js
+++ b/end-to-end-test/remote/specs/core/resultsOncoprintColorConfig.spec.js
@@ -22,7 +22,7 @@ describe('oncoprint colors', () => {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=gbm_tcga&case_set_id=gbm_tcga_all&data_priority=0&gene_list=EGFR%250APTEN%250AIDH1%250ATP53&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=gbm_tcga_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=gbm_tcga_mrna_median_all_sample_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=gbm_tcga_mutations&hide_unprofiled_samples=false&profileFilter=0&tab_index=tab_visualize&show_samples=false`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
});
it('color configuration modal reflects user selected colors', () => {
@@ -37,7 +37,7 @@ describe('oncoprint colors', () => {
.click();
getElementByTestHandle('update-tracks').waitForDisplayed();
getElementByTestHandle('update-tracks').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
// check that mutation spectrum is added to the oncoprint
let legendText = getTextInOncoprintLegend();
@@ -57,7 +57,7 @@ describe('oncoprint colors', () => {
getElementByTestHandle('color-picker-icon').click();
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
$('.circle-picker [title="#990099"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
getElementByTestHandle('color-picker-icon').waitForDisplayed();
getElementByTestHandle('color-picker-icon').click();
$('.circle-picker').waitForDisplayed({ reverse: true });
@@ -65,7 +65,7 @@ describe('oncoprint colors', () => {
$$('[data-test="color-picker-icon"]')[1].click();
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
$('.circle-picker [title="#109618"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
getElementByTestHandle('color-picker-icon').waitForDisplayed();
$$('[data-test="color-picker-icon"]')[1].click();
$('.circle-picker').waitForDisplayed({ reverse: true });
@@ -73,7 +73,7 @@ describe('oncoprint colors', () => {
$$('[data-test="color-picker-icon"]')[2].click();
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
$('.circle-picker [title="#8b0707"]').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.strictEqual(
$('[data-test="color-picker-icon"] rect').getAttribute('fill'),
@@ -114,7 +114,7 @@ describe('oncoprint colors', () => {
it('color configuration modal reflects default colors', () => {
// click "Reset Colors" track
getElementByTestHandle('resetColors').click();
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
assert.strictEqual(
$('[data-test="color-picker-icon"] rect').getAttribute('fill'),
@@ -160,13 +160,13 @@ describe('oncoprint colors', () => {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=gbm_tcga&case_set_id=gbm_tcga_all&data_priority=0&gene_list=EGFR%250APTEN%250AIDH1%250ATP53&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=gbm_tcga_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=gbm_tcga_mrna_median_all_sample_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=gbm_tcga_mutations&hide_unprofiled_samples=false&profileFilter=0&tab_index=tab_visualize&show_samples=false`
);
- waitForOncoprint(ONCOPRINT_TIMEOUT);
+ waitForOncoprint();
});
it('oncoprint uses white background for glyphs when option toggled', () => {
// toggle on white backgrounds for glyphs
const $viewDropdown = $('#viewDropdownButton');
$viewDropdown.click();
- waitForOncoprint(2000);
+ waitForOncoprint();
getElementByTestHandle('toggleWhiteBackgroundForGlyphs').click();
$viewDropdown.click();
@@ -178,7 +178,7 @@ describe('oncoprint colors', () => {
// toggle off white backgrounds for glyphs
const $viewDropdown = $('#viewDropdownButton');
$viewDropdown.click();
- waitForOncoprint(2000);
+ waitForOncoprint();
getElementByTestHandle('toggleWhiteBackgroundForGlyphs').click();
$viewDropdown.click();
diff --git a/end-to-end-test/remote/specs/core/screenshot.spec.js b/end-to-end-test/remote/specs/core/screenshot.spec.js
index 89672709399..fc734a8af61 100644
--- a/end-to-end-test/remote/specs/core/screenshot.spec.js
+++ b/end-to-end-test/remote/specs/core/screenshot.spec.js
@@ -25,7 +25,7 @@ function waitForAndCheckPlotsTab() {
function runResultsTestSuite(prefix, options = {}) {
it(`${prefix} render the oncoprint`, function() {
- waitForOncoprint(10000);
+ waitForOncoprint();
var res = checkElementWithMouseDisabled('.oncoprintContainer');
assertScreenShotMatch(res);
});
@@ -182,7 +182,7 @@ describe('result page screenshot tests', function() {
before(function() {
var url = `${CBIOPORTAL_URL}/index.do?tab_index=tab_visualize&cancer_study_list=coadread_tcga_pub&cancer_study_id=coadread_tcga_pub&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&Z_SCORE_THRESHOLD=2.0&case_set_id=coadread_tcga_pub_nonhypermut&gene_list=KRAS+NRAS+BRAF&gene_set_choice=user-defined-list&Action=Submit&show_samples=false&`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(10000);
+ waitForOncoprint();
});
runResultsTestSuite('no session');
@@ -343,7 +343,7 @@ describe('result page tabs, loading from session id', function() {
var url = `${CBIOPORTAL_URL}/results?session_id=5bbe8197498eb8b3d5684271`;
goToUrlAndSetLocalStorage(url);
- waitForOncoprint(15000);
+ waitForOncoprint();
});
runResultsTestSuite('session');
@@ -354,11 +354,11 @@ describe('results page tabs while excluding unprofiled samples', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=gbm_tcga&case_set_id=gbm_tcga_all&data_priority=0&gene_list=EGFR%250APTEN%250AIDH1%250ATP53&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=gbm_tcga_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=gbm_tcga_mrna_median_all_sample_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=gbm_tcga_mutations&hide_unprofiled_samples=false&profileFilter=0&tab_index=tab_visualize`
);
- waitForOncoprint(10000);
+ waitForOncoprint();
setSettingsMenuOpen(true);
$('input[data-test="HideUnprofiled"]').waitForExist();
$('input[data-test="HideUnprofiled"]').click();
- waitForOncoprint(10000);
+ waitForOncoprint();
setSettingsMenuOpen(false);
});
diff --git a/end-to-end-test/remote/specs/core/studyview.spec.js b/end-to-end-test/remote/specs/core/studyview.spec.js
index 687a96951d9..6bc3125575a 100644
--- a/end-to-end-test/remote/specs/core/studyview.spec.js
+++ b/end-to-end-test/remote/specs/core/studyview.spec.js
@@ -703,7 +703,7 @@ describe('submit genes to results view query', () => {
browser.switchToWindow(resultsViewTabId);
// wait for query to load
- waitForOncoprint(20000);
+ waitForOncoprint();
// only mrna profile is there
const profileFilter = (
diff --git a/end-to-end-test/shared/image-compare/js/main.js b/end-to-end-test/shared/image-compare/js/main.js
index 57ba9b1a5f6..a757455a47f 100644
--- a/end-to-end-test/shared/image-compare/js/main.js
+++ b/end-to-end-test/shared/image-compare/js/main.js
@@ -24,8 +24,8 @@ function getRootUrl(href) {
var rootUrl = getRootUrl(window.location.href);
var reportUrl = isLocalHost
- ? './results/customReport.json'
- : `./customReport.json`;
+ ? './results/completeResults.json'
+ : `./completeResults.json`;
var diffSliderMode = true;
@@ -46,7 +46,7 @@ $(document).on('click', '#toggleDiffModeBtn', () => {
function buildData(reportData) {
const data = reportData.map(test => {
- const testName = test.title.replace(/\s/g, '_').toLowerCase();
+ const testName = test.name.replace(/\s/g, '_').toLowerCase();
const imagePath = `/${testName}_element_chrome_1600x1000.png`;
const rootUrl = isLocalHost
? `/${runMode}/screenshots/`
@@ -117,19 +117,58 @@ function renderList(data) {
});
}
+function deDupTests(reports) {
+ return _(reports)
+ .flatMap(r => r.suites)
+ .map(s => {
+ // for each suite group tests by name
+ // and filter for groups where ALL tests failed (retries all failed)
+ return _(s.tests)
+ .groupBy(s => s.name)
+ .values()
+ .filter(tests => {
+ return _.every(tests, t => t.state === 'failed');
+ })
+ .value();
+ })
+ .filter(a => a.length > 0)
+ .map(a => {
+ // the multiple failures are repeats
+ // we only need one them
+ return a.map(aa => aa[0]);
+ })
+ .flatMap()
+ .value();
+}
+
async function bootstrap() {
const reportData = await getResultsReport();
- //'https://circle-production-customer-artifacts.s3.amazonaws.com/picard/57cbb4ee69052f70a6140478/60021ce16cb7c3145511b486-0-build/artifacts'
- runMode = reportData.testHome || 'remote';
+ runMode =
+ reportData.length && reportData[0]?.specs[0]?.includes('/remote/')
+ ? 'remote'
+ : 'local';
+
+ console.log('reportData', reportData);
+
+ var tests = _(reportData)
+ .flatMap(r => r.suites)
+ .flatMap(s => s.tests)
+ .value();
- const filteredReportData = reportData.tests.filter(test => {
+ const de = deDupTests(reportData);
+
+ const filteredReportData = de.filter(test => {
return (
test.state === 'failed' &&
- /isWithinMisMatchTolerance/i.test(test.error.message)
+ /isWithinMisMatchTolerance/i.test(test.error)
);
});
+ //const filteredReportData = reportData[0].suites[0].tests;
+
+ console.log(filteredReportData);
+
const data = buildData(filteredReportData);
renderList(data);
diff --git a/end-to-end-test/shared/imageCompare.html b/end-to-end-test/shared/imageCompare.html
index 783e5a14b9d..f6c39bbd0ed 100644
--- a/end-to-end-test/shared/imageCompare.html
+++ b/end-to-end-test/shared/imageCompare.html
@@ -1,5 +1,6 @@
+
diff --git a/end-to-end-test/shared/specUtils.js b/end-to-end-test/shared/specUtils.js
index b005398225f..925695c077a 100644
--- a/end-to-end-test/shared/specUtils.js
+++ b/end-to-end-test/shared/specUtils.js
@@ -47,7 +47,7 @@ function waitForPatientView(timeout) {
});
}
-function waitForOncoprint(timeout) {
+function waitForOncoprint() {
browser.pause(200); // give oncoprint time to disappear
browser.waitUntil(
() => {
@@ -57,7 +57,7 @@ function waitForOncoprint(timeout) {
$('.oncoprint__controls').isExisting()
); // oncoprint controls are showing
},
- { timeout }
+ { timeout: 60000 }
);
browser.pause(200);
}
diff --git a/end-to-end-test/shared/specUtils_Async.js b/end-to-end-test/shared/specUtils_Async.js
new file mode 100644
index 00000000000..4daf290c9d2
--- /dev/null
+++ b/end-to-end-test/shared/specUtils_Async.js
@@ -0,0 +1,830 @@
+const clipboardy = require('clipboardy');
+const assertScreenShotMatch = require('./lib/testUtils').assertScreenShotMatch;
+
+const DEFAULT_TIMEOUT = 5000;
+
+function waitForStudyQueryPage(timeout) {
+ $('div[data-test="cancerTypeListContainer"]').waitForExist({
+ timeout: timeout || 10000,
+ });
+}
+
+function waitForGeneQueryPage(timeout) {
+ // wait until fade effect on studyList has finished (if running in forkedMode)
+ $('[data-test=studyList]').waitForExist({
+ timeout: timeout,
+ reverse: true,
+ });
+ $('div[data-test="molecularProfileSelector"]').waitForExist({
+ timeout: timeout || 10000,
+ });
+}
+
+function waitForPlotsTab(timeout) {
+ $('div.axisBlock').waitForDisplayed({ timeout: timeout || 20000 });
+}
+
+function waitForAndCheckPlotsTab() {
+ $('body').moveTo({ xOffset: 0, yOffset: 0 });
+ $('div[data-test="PlotsTabPlotDiv"]').waitForDisplayed({ timeout: 20000 });
+ var res = checkElementWithElementHidden(
+ 'div[data-test="PlotsTabEntireDiv"]',
+ '.popover',
+ { hide: ['.qtip'] }
+ );
+ assertScreenShotMatch(res);
+}
+
+function waitForCoExpressionTab(timeout) {
+ $('#coexpressionTabGeneTabs').waitForExist({ timeout: timeout || 20000 });
+}
+
+function waitForPatientView(timeout) {
+ $('#patientViewPageTabs').waitForExist({ timeout: timeout || 20000 });
+ $('[data-test=patientview-copynumber-table]').waitForDisplayed({
+ timeout: timeout || 20000,
+ });
+ $('[data-test=patientview-mutation-table]').waitForDisplayed({
+ timeout: timeout || 20000,
+ });
+}
+
+function waitForOncoprint(timeout) {
+ browser.pause(200); // give oncoprint time to disappear
+ browser.waitUntil(
+ () => {
+ return (
+ !$('.oncoprintLoadingIndicator').isExisting() && // wait for loading indicator to hide, and
+ $('#oncoprintDiv svg rect').isExisting() && // as a proxy for oncoprint being rendered, wait for an svg rectangle to appear in the legend
+ $('.oncoprint__controls').isExisting()
+ ); // oncoprint controls are showing
+ },
+ { timeout }
+ );
+ browser.pause(200);
+}
+
+function waitForComparisonTab() {
+ $('[data-test=GroupComparisonAlterationEnrichments]').waitForDisplayed();
+}
+
+function getTextInOncoprintLegend() {
+ return $$('#oncoprintDiv .oncoprint-legend-div svg text')
+ .map(t => {
+ return t.getHTML(false);
+ })
+ .join(' ');
+}
+
+function setSettingsMenuOpen(open, buttonId = 'GlobalSettingsButton') {
+ const button = 'button[data-test="' + buttonId + '"]';
+ const dropdown = 'div[data-test="GlobalSettingsDropdown"]';
+ $(button).waitForDisplayed();
+ browser.waitUntil(
+ () => {
+ if (open === $(dropdown).isDisplayedInViewport()) {
+ return true;
+ } else {
+ $(button).click();
+ $(dropdown).waitForDisplayed({
+ timeout: 6000,
+ reverse: !open,
+ });
+ return false;
+ }
+ },
+ {
+ timeout: 10000,
+ timeoutMsg: `Couldn't ${
+ open ? 'open' : 'close'
+ } results page settings menu`,
+ interval: 2000,
+ }
+ );
+}
+
+async function getElementByTestHandle(handle, options) {
+ if (options?.timeout) {
+ const el = await $(`[data-test="${handle}"]`);
+ await el.waitForExist(options);
+ }
+
+ return await $(`[data-test="${handle}"]`);
+}
+
+function setOncoprintMutationsMenuOpen(open) {
+ const mutationColorMenuButton = '#mutationColorDropdown';
+ const mutationColorMenuDropdown =
+ 'div.oncoprint__controls__mutation_color_menu';
+ $('div.oncoprint__controls').moveTo();
+ $(mutationColorMenuButton).waitForDisplayed();
+ browser.waitUntil(
+ () => {
+ if (open === $(mutationColorMenuDropdown).isDisplayedInViewport()) {
+ return true;
+ } else {
+ $(mutationColorMenuButton).click();
+ return false;
+ }
+ },
+ {
+ timeout: 10000,
+ timeoutMsg: `Couldn't ${
+ open ? 'open' : 'close'
+ } Mutations menu in Oncoprint`,
+ interval: 2000,
+ }
+ );
+}
+
+function setCheckboxChecked(checked, selector, failure_message) {
+ browser.waitUntil(
+ () => {
+ if ($(selector).isDisplayed()) {
+ $(selector).click();
+ return checked === $(selector).isSelected();
+ } else {
+ return false;
+ }
+ },
+ {
+ timeout: 30000,
+ timeoutMsg: failure_message,
+ interval: 2000,
+ }
+ );
+}
+
+/**
+ * Note: before calling this function,
+ * check if dropdown element is in correct state
+ * (i.e. displayed or not)qq
+ */
+function setDropdownOpen(
+ open,
+ button_selector_or_elt,
+ dropdown_selector_or_elt,
+ failure_message
+) {
+ browser.waitUntil(
+ () => {
+ const dropdown_elt =
+ typeof dropdown_selector_or_elt === 'string'
+ ? $(dropdown_selector_or_elt)
+ : dropdown_selector_or_elt;
+ // check if exists first because sometimes we get errors with isVisible if it doesn't exist
+ const isOpen = dropdown_elt.isExisting()
+ ? dropdown_elt.isDisplayedInViewport()
+ : false;
+ if (open === isOpen) {
+ return true;
+ } else {
+ const button_elt =
+ typeof button_selector_or_elt === 'string'
+ ? $(button_selector_or_elt)
+ : button_selector_or_elt;
+ button_elt.waitForExist();
+ button_elt.click();
+ return false;
+ }
+ },
+ {
+ timeout: 10000,
+ timeoutMsg: failure_message,
+ interval: 2000,
+ }
+ );
+}
+
+/**
+ * @param {string} url
+ * @returns {string} modifiedUrl
+ */
+function getUrl(url) {
+ if (!useExternalFrontend) {
+ console.log('Connecting to: ' + url);
+ } else {
+ const urlparam = 'localdev';
+ const prefix = url.indexOf('?') > 0 ? '&' : '?';
+ console.log('Connecting to: ' + `${url}${prefix}${urlparam}=true`);
+ url = `${url}${prefix}${urlparam}=true`;
+ }
+ return url;
+}
+
+async function goToUrlAndSetLocalStorage(url, authenticated = false) {
+ const currentUrl = await browser.getUrl();
+ const needToLogin =
+ authenticated && (!currentUrl || !currentUrl.includes('http'));
+ if (!useExternalFrontend) {
+ await browser.url(url);
+ console.log('Connecting to: ' + url);
+ } else if (useNetlifyDeployPreview) {
+ await browser.url(url);
+ await browser.execute(
+ function(config) {
+ this.localStorage.setItem('netlify', config.netlify);
+ },
+ { netlify: netlifyDeployPreview }
+ );
+ await browser.url(url);
+ console.log('Connecting to: ' + url);
+ } else {
+ var urlparam = useLocalDist ? 'localdist' : 'localdev';
+ var prefix = url.indexOf('?') > 0 ? '&' : '?';
+ await browser.url(`${url}${prefix}${urlparam}=true`);
+ console.log('Connecting to: ' + `${url}${prefix}${urlparam}=true`);
+ }
+ if (needToLogin) keycloakLogin(10000);
+}
+
+const goToUrlAndSetLocalStorageWithProperty = (url, authenticated, props) => {
+ goToUrlAndSetLocalStorage(url, authenticated);
+ setServerConfiguration(props);
+ goToUrlAndSetLocalStorage(url, authenticated);
+};
+
+function setServerConfiguration(props) {
+ browser.execute(
+ function(frontendConf) {
+ this.localStorage.setItem(
+ 'frontendConfig',
+ JSON.stringify(frontendConf)
+ );
+ },
+ { serverConfig: props }
+ );
+}
+
+function sessionServiceIsEnabled() {
+ return browser.execute(function() {
+ return window.getServerConfig().sessionServiceEnabled;
+ }).value;
+}
+
+function showGsva() {
+ setServerConfiguration({ skin_show_gsva: true });
+}
+
+async function waitForNumberOfStudyCheckboxes(expectedNumber, text) {
+ await browser.waitUntil(async () => {
+ const cbs = await jq(`[data-test="StudySelect"] input:checkbox`);
+ return cbs.length === expectedNumber;
+ });
+}
+
+function getNthOncoprintTrackOptionsElements(n) {
+ // n is one-indexed
+
+ const button_selector =
+ '#oncoprintDiv .oncoprintjs__track_options__toggle_btn_img.nth-' + n;
+ const dropdown_selector =
+ '#oncoprintDiv .oncoprintjs__track_options__dropdown.nth-' + n;
+
+ return {
+ button: $(button_selector),
+ button_selector,
+ dropdown: $(dropdown_selector),
+ dropdown_selector,
+ };
+}
+
+const netlifyDeployPreview = process.env.NETLIFY_DEPLOY_PREVIEW;
+const useNetlifyDeployPreview = !!netlifyDeployPreview;
+
+const useExternalFrontend = !process.env
+ .FRONTEND_TEST_DO_NOT_LOAD_EXTERNAL_FRONTEND;
+
+const useLocalDist = process.env.FRONTEND_TEST_USE_LOCAL_DIST;
+
+function waitForNetworkQuiet(timeout) {
+ browser.waitUntil(
+ () => {
+ return (
+ browser.execute(function() {
+ return window.ajaxQuiet === true;
+ }) == true
+ );
+ },
+ { timeout }
+ );
+}
+
+function getPortalUrlFromEnv() {
+ return process.env.CBIOPORTAL_URL.replace(/\/$/, '');
+}
+
+function toStudyViewSummaryTab() {
+ var summaryTab = '#studyViewTabs a.tabAnchor_summary';
+ var summaryContent = "[data-test='summary-tab-content']";
+ if (!$(summaryContent).isDisplayedInViewport()) {
+ $(summaryTab).waitForDisplayed({ timeout: 10000 });
+ $(summaryTab).click();
+ $(summaryContent).waitForDisplayed({ timeout: 10000 });
+ }
+}
+
+function toStudyViewClinicalDataTab() {
+ var clinicalDataTab = '#studyViewTabs a.tabAnchor_clinicalData';
+ var clinicalDataContent = "[data-test='clinical-data-tab-content']";
+ if (!$(clinicalDataContent).isDisplayedInViewport()) {
+ $(clinicalDataTab).waitForDisplayed({ timeout: 10000 });
+ $(clinicalDataTab).click();
+ $(clinicalDataContent).waitForDisplayed({ timeout: 10000 });
+ }
+}
+
+function removeAllStudyViewFilters() {
+ const clearAllFilter = "[data-test='clear-all-filters']";
+ if ($(clearAllFilter).isDisplayedInViewport()) {
+ $(clearAllFilter).click();
+ }
+}
+
+function waitForStudyViewSelectedInfo() {
+ $("[data-test='selected-info']").waitForDisplayed({ timeout: 5000 });
+ // pause to wait the animation finished
+ browser.pause(2000);
+}
+
+function waitForStudyView() {
+ browser.waitUntil(() => $$('.sk-spinner').length === 0, {
+ timeout: 100000,
+ });
+}
+
+function waitForGroupComparisonTabOpen(timeout) {
+ $('[data-test=ComparisonPageOverlapTabDiv]').waitForDisplayed({
+ timeout: timeout || 10000,
+ });
+}
+
+function getTextFromElement(element) {
+ return $(element)
+ .getText()
+ .trim();
+}
+
+function getNumberOfStudyViewCharts() {
+ return $$('div.react-grid-item').length;
+}
+
+function setInputText(selector, text) {
+ // backspace to delete current contents - webdriver is supposed to clear it but it doesnt always work
+ $(selector).click();
+ //browser.keys('\uE003'.repeat($(selector).getValue().length));
+
+ $(selector).clearValue();
+ //browser.pause(1000);
+
+ $(selector).setValue(text);
+}
+
+function getReactSelectOptions(parent) {
+ parent.$('.Select-control').click();
+ return parent.$$('.Select-option');
+}
+
+function selectReactSelectOption(parent, optionText) {
+ reactSelectOption(parent, optionText).click();
+}
+
+function reactSelectOption(parent, optionText, loose = false) {
+ setDropdownOpen(
+ true,
+ parent.$('.Select-control'),
+ loose
+ ? parent.$('.Select-option*=' + optionText)
+ : parent.$('.Select-option=' + optionText)
+ );
+ if (loose) {
+ return parent.$('.Select-option*=' + optionText);
+ }
+ return parent.$('.Select-option=' + optionText);
+}
+
+function selectCheckedOption(parent, optionText, loose = false) {
+ parent.$('.default-checked-select').click();
+ if (loose) {
+ return parent.$('.checked-select-option*=' + optionText);
+ }
+ return parent.$('.checked-select-option=' + optionText);
+}
+
+function getSelectCheckedOptions(parent) {
+ parent.$('.default-checked-select').click();
+ return parent.$$('.checked-select-option');
+}
+
+function pasteToElement(elementSelector, text) {
+ clipboardy.writeSync(text);
+ $(elementSelector).click();
+ browser.keys(['Shift', 'Insert']);
+}
+
+function checkOncoprintElement(selector, viewports) {
+ //browser.moveToObject('body', 0, 0);
+ browser.execute(function() {
+ frontendOnc.clearMouseOverEffects(); // clear mouse hover effects for uniform screenshot
+ });
+ return checkElementWithMouseDisabled(selector || '#oncoprintDiv', 0, {
+ hide: [
+ '.qtip',
+ '.dropdown-menu',
+ '.oncoprintjs__track_options__dropdown',
+ '.oncoprintjs__cell_overlay_div',
+ ],
+ viewports: viewports,
+ });
+}
+
+function jsApiHover(selector) {
+ browser.execute(function(_selector) {
+ $(_selector)[0].dispatchEvent(
+ new MouseEvent('mouseover', { bubbles: true })
+ );
+ }, selector);
+}
+
+function jsApiClick(selector) {
+ browser.execute(function(_selector) {
+ $(_selector)[0].dispatchEvent(
+ new MouseEvent('click', { bubbles: true })
+ );
+ }, selector);
+}
+
+function executeInBrowser(callback) {
+ return browser.execute(callback);
+}
+
+function checkElementWithTemporaryClass(
+ selectorForChecking,
+ selectorForTemporaryClass,
+ temporaryClass,
+ pauseTime,
+ options
+) {
+ browser.execute(
+ function(selectorForTemporaryClass, temporaryClass) {
+ $(selectorForTemporaryClass).addClass(temporaryClass);
+ },
+ selectorForTemporaryClass,
+ temporaryClass
+ );
+ browser.pause(pauseTime);
+ var res = browser.checkElement(selectorForChecking, '', options);
+ browser.execute(
+ function(selectorForTemporaryClass, temporaryClass) {
+ $(selectorForTemporaryClass).removeClass(temporaryClass);
+ },
+ selectorForTemporaryClass,
+ temporaryClass
+ );
+ return res;
+}
+
+function checkElementWithMouseDisabled(selector, pauseTime, options) {
+ browser.execute(function() {
+ const style = 'display:block !important;visibility:visible !important;';
+ $(``).appendTo(
+ 'body'
+ );
+ });
+
+ $(selector).waitForExist({ timeout: 5000 });
+
+ const ret = checkElementWithTemporaryClass(
+ selector,
+ selector,
+ 'disablePointerEvents',
+ pauseTime || 0,
+ options
+ );
+
+ browser.execute(function() {
+ $('#blockUIToDisableMouse').remove();
+ });
+
+ return ret;
+}
+
+function checkElementWithElementHidden(selector, selectorToHide, options) {
+ browser.execute(selectorToHide => {
+ $(
+ ``
+ ).appendTo('head');
+ }, selectorToHide);
+
+ var res = browser.checkElement(selector, '', options);
+
+ browser.execute(selectorToHide => {
+ $('#tempHiddenStyles').remove();
+ }, selectorToHide);
+
+ return res;
+}
+
+async function clickQueryByGeneButton() {
+ const el = await $('.disabled[data-test=queryByGeneButton]');
+ await el.waitForExist({
+ reverse: true,
+ });
+ //const el = await getElementByTestHandle('queryByGeneButton');
+ await clickElement('handle=queryByGeneButton');
+
+ const body = await $('body');
+ await body.scrollIntoView();
+}
+
+function clickModifyStudySelectionButton() {
+ $('[data-test="modifyStudySelectionButton"]').click();
+}
+
+function getOncoprintGroupHeaderOptionsElements(trackGroupIndex) {
+ //trackGroupIndex is 0-indexed
+
+ const button_selector =
+ '#oncoprintDiv .oncoprintjs__header__toggle_btn_img.track-group-' +
+ trackGroupIndex;
+ const dropdown_selector =
+ '#oncoprintDiv .oncoprintjs__header__dropdown.track-group-' +
+ trackGroupIndex;
+
+ return {
+ button: $(button_selector),
+ button_selector,
+ dropdown: $(dropdown_selector),
+ dropdown_selector,
+ };
+}
+
+/**
+ *
+ * @param {string} url
+ * @param {any} data
+ * @param {boolean} authenticated
+ */
+function postDataToUrl(url, data, authenticated = true) {
+ const currentUrl = browser.getUrl();
+ const needToLogin =
+ authenticated && (!currentUrl || !currentUrl.includes('http'));
+
+ url = getUrl(url);
+ browser.execute(
+ (/** @type {string} */ url, /** @type {any} */ data) => {
+ function formSubmit(url, params) {
+ // method="smart" means submit with GET iff the URL wouldn't be too long
+
+ const form = document.createElement('form');
+ form.setAttribute('method', 'post');
+ form.setAttribute('action', url);
+ form.setAttribute('target', '_self');
+
+ for (const key of Object.keys(params)) {
+ const hiddenField = document.createElement('input');
+ hiddenField.setAttribute('type', 'hidden');
+ hiddenField.setAttribute('name', key);
+ hiddenField.setAttribute('value', params[key]);
+ form.appendChild(hiddenField);
+ }
+
+ document.body.appendChild(form);
+ form.submit();
+ }
+
+ formSubmit(url, data);
+ },
+ url,
+ data
+ );
+ if (needToLogin) keycloakLogin(10000);
+}
+
+function keycloakLogin(timeout) {
+ browser.waitUntil(() => browser.getUrl().includes('/auth/realms/cbio'), {
+ timeout,
+ timeoutMsg: 'No redirect to Keycloak could be detected.',
+ });
+ $('#username').waitForDisplayed(timeout);
+
+ $('#username').setValue('testuser');
+ $('#password').setValue('P@ssword1');
+ $('#kc-login').click();
+
+ browser.waitUntil(() => !browser.getUrl().includes('/auth/realms/cbio'));
+ $('body').waitForDisplayed(timeout);
+}
+
+function closeOtherTabs() {
+ const studyWindow = browser.getWindowHandle();
+ browser.getWindowHandles().forEach(id => {
+ if (id === studyWindow) {
+ return;
+ }
+ console.log('close tab:', id);
+ browser.switchToWindow(id);
+ browser.closeWindow();
+ });
+ browser.switchToWindow(studyWindow);
+}
+
+function openGroupComparison(studyViewUrl, chartDataTest, timeout) {
+ goToUrlAndSetLocalStorage(studyViewUrl, true);
+ $('[data-test=summary-tab-content]').waitForDisplayed();
+ waitForNetworkQuiet();
+
+ // needed to switch to group comparison tab later on:
+ closeOtherTabs();
+
+ const chart = '[data-test=' + chartDataTest + ']';
+ $(chart).waitForDisplayed({ timeout: timeout || 10000 });
+ jsApiHover(chart);
+
+ browser.waitUntil(
+ () => {
+ return $(chart + ' .controls').isExisting();
+ },
+ { timeout: timeout || 10000 }
+ );
+
+ // move to hamburger icon
+ const hamburgerIcon = '[data-test=chart-header-hamburger-icon]';
+ jsApiHover(hamburgerIcon);
+
+ // wait for the menu available
+ $(hamburgerIcon).waitForDisplayed({ timeout: timeout || 10000 });
+
+ // open comparison session
+ const studyViewTabId = browser.getWindowHandle();
+
+ const chartHamburgerIcon = $(chart).$(hamburgerIcon);
+ $(chartHamburgerIcon).waitForDisplayed({ timeout: timeout || 10000 });
+
+ $(chartHamburgerIcon)
+ .$$('li')[1]
+ .click();
+
+ browser.waitUntil(() => browser.getWindowHandles().length > 1); // wait until new tab opens
+
+ const groupComparisonTabId = browser
+ .getWindowHandles()
+ .find(id => id !== studyViewTabId);
+
+ browser.switchToWindow(groupComparisonTabId);
+ waitForGroupComparisonTabOpen(timeout);
+}
+
+function selectElementByText(text) {
+ return $(`//*[text()="${text}"]`);
+}
+
+async function jq(selector) {
+ return await browser.execute(selector => {
+ return jQuery(selector).toArray();
+ }, selector);
+}
+
+function setServerConfiguration(serverConfig) {
+ browser.execute(function(_serverConfig) {
+ this.localStorage.setItem(
+ 'frontendConfig',
+ JSON.stringify({ serverConfig: _serverConfig })
+ );
+ }, serverConfig);
+}
+
+var openAlterationTypeSelectionMenu = () => {
+ $('[data-test=AlterationEnrichmentTypeSelectorButton]').waitForExist();
+ $('[data-test=AlterationEnrichmentTypeSelectorButton]').click();
+ $('[data-test=AlterationTypeSelectorMenu]').waitForDisplayed();
+};
+
+function strIsNumeric(str) {
+ if (typeof str != 'string') return false; // we only process strings!
+ return (
+ !isNaN(str) && !isNaN(parseFloat(str)) // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
+ ); // ...and ensure strings of whitespace fail
+}
+
+function selectClinicalTabPlotType(type) {
+ setDropdownOpen(
+ true,
+ '[data-test="plotTypeSelector"] .Select-arrow-zone',
+ '[data-test="plotTypeSelector"] .Select-menu',
+ "Couldn't open clinical tab chart type dropdown"
+ );
+ $(
+ `[data-test="plotTypeSelector"] .Select-option[aria-label="${type}"]`
+ ).click();
+}
+
+async function getElement(selector, options = {}) {
+ let el;
+
+ if (/^handle=/.test(selector)) {
+ el = await getElementByTestHandle(selector.replace(/^handle=/, ''));
+ } else {
+ el = await $(selector);
+ }
+
+ if (options.timeout) {
+ await el.waitForExist(options);
+ }
+ return el;
+}
+
+async function getText(selector, option) {
+ const el = await getElement(...arguments);
+ return await el.getText();
+}
+
+async function isSelected(selector, options) {
+ const el = await getElement(
+ selector,
+ options || { timeout: DEFAULT_TIMEOUT }
+ );
+ return await el.isSelected();
+}
+
+async function isUnselected(selector, options) {
+ return (await isSelected(...arguments)) === false;
+}
+
+async function clickElement(selector, options = {}) {
+ let el = await getElement(selector);
+ //
+ // if (/^handle=/.test(selector)) {
+ // el = await getElementByTestHandle(selector.replace(/^handle=/, ''));
+ // } else {
+ // el = await $(selector);
+ // }
+ await el.waitForDisplayed(options);
+ await el.click();
+}
+
+module.exports = {
+ checkElementWithElementHidden,
+ waitForPlotsTab,
+ waitForAndCheckPlotsTab,
+ waitForStudyQueryPage,
+ waitForGeneQueryPage,
+ clickElement,
+ waitForOncoprint,
+ waitForCoExpressionTab,
+ waitForPatientView,
+ waitForComparisonTab,
+ goToUrlAndSetLocalStorage,
+ goToUrlAndSetLocalStorageWithProperty,
+ useExternalFrontend,
+ useNetlifyDeployPreview,
+ sessionServiceIsEnabled,
+ waitForNumberOfStudyCheckboxes,
+ waitForNetworkQuiet,
+ getTextInOncoprintLegend,
+ toStudyViewSummaryTab,
+ toStudyViewClinicalDataTab,
+ removeAllStudyViewFilters,
+ waitForStudyViewSelectedInfo,
+ waitForStudyView,
+ waitForGroupComparisonTabOpen,
+ getTextFromElement,
+ getNumberOfStudyViewCharts,
+ setOncoprintMutationsMenuOpen,
+ getNthOncoprintTrackOptionsElements,
+ setInputText,
+ pasteToElement,
+ checkOncoprintElement,
+ executeInBrowser,
+ checkElementWithTemporaryClass,
+ checkElementWithMouseDisabled,
+ clickQueryByGeneButton,
+ clickModifyStudySelectionButton,
+ selectReactSelectOption,
+ reactSelectOption,
+ getReactSelectOptions,
+ COEXPRESSION_TIMEOUT: 120000,
+ getSelectCheckedOptions,
+ selectCheckedOption,
+ getOncoprintGroupHeaderOptionsElements,
+ showGsva,
+ setSettingsMenuOpen,
+ setDropdownOpen,
+ postDataToUrl,
+ getPortalUrlFromEnv,
+ openGroupComparison,
+ selectElementByText,
+ jsApiHover,
+ jsApiClick,
+ setCheckboxChecked,
+ openAlterationTypeSelectionMenu,
+ strIsNumeric,
+ jq,
+ setServerConfiguration,
+ selectClinicalTabPlotType,
+ getElementByTestHandle,
+ getElement,
+ getText,
+ isSelected,
+ isUnselected,
+};
diff --git a/end-to-end-test/shared/wdio/customReporter.js b/end-to-end-test/shared/wdio/customReporter.js
deleted file mode 100644
index e29c5a4ec2c..00000000000
--- a/end-to-end-test/shared/wdio/customReporter.js
+++ /dev/null
@@ -1,55 +0,0 @@
-let events = require('events');
-const fs = require('fs');
-
-class WdioTestRailReporter extends events.EventEmitter {
- /**
- * @param {{}} baseReporter
- * @param {{testRailsOptions}} config wdio config
- */
- constructor(baseReporter, config) {
- super();
-
- this.report = {
- meta: {},
-
- tests: [],
- };
-
- this.on('custom-report', data => {
- this.report.tests.push(data.data);
- });
-
- this.on('test:pending', data => {
- this.report.tests.push({ test: data });
- });
-
- this.on('end', () => {
- this.report.testHome = config.testHome;
-
- const strReport = JSON.stringify(this.report);
-
- fs.writeFileSync(
- `${config.reporterOptions.custom.outputDir}/customReportJSONP.js`,
- `jsonpCallback(${strReport});`,
- err => {
- if (err) console.log(err);
- console.log('Successfully Written to File.');
- }
- );
-
- fs.writeFileSync(
- `${config.reporterOptions.custom.outputDir}/customReport.json`,
- strReport,
- err => {
- if (err) console.log(err);
- console.log('Successfully Written to File.');
- }
- );
- });
- }
-}
-
-// webdriver requires class to have reporterName option
-WdioTestRailReporter.reporterName = 'WebDriver.io test rail reporter';
-
-module.exports = WdioTestRailReporter;
diff --git a/end-to-end-test/shared/wdio/customReporter.v6.js b/end-to-end-test/shared/wdio/customReporter.v6.js
deleted file mode 100644
index 1b174272502..00000000000
--- a/end-to-end-test/shared/wdio/customReporter.v6.js
+++ /dev/null
@@ -1,123 +0,0 @@
-let WDIOReporter = require('@wdio/reporter').default;
-let events = require('events');
-const fs = require('fs');
-const _ = require('lodash');
-
-const ipc = require('node-ipc');
-
-class CustomReporter extends WDIOReporter {
- // constructor() {
- // //super();
- //
- //
- // this.report = {
- // meta: {},
- //
- // tests: [],
- // };
- // }
-
- constructor(...args) {
- super(args);
-
- ipc.config.id = 'runnerProcess';
- ipc.config.retry = 1500;
- ipc.config.silent = true;
- ipc.serve(() => {
- ipc.server.on('test_it', message => {
- this.addTest({
- type: 'test',
- prelim: true,
- title: message,
- });
- });
- ipc.server.on('test_skipped', message => {
- this.addTest({
- type: 'test',
- prelim: false,
- title: message,
- status: 'skipped',
- locked: true,
- });
- });
- });
- ipc.server.start();
- }
-
- addTest(test) {
- const existingTest = this.testsByUid[test.uid];
- const locked = existingTest && existingTest.locked === true;
- if (!locked) {
- this.testsByUid[test.uid] = test;
- }
- }
-
- testsByUid = {};
-
- onRunnerStart() {}
- onBeforeCommand() {}
- onAfterCommand() {}
- onSuiteStart(stats) {}
- onHookStart() {}
- onHookEnd() {}
- onTestStart() {}
- onTestPass(test) {}
- onTestFail(test) {}
- onTestSkip(test) {
- //this.report.tests.push(test);
- }
- onTestEnd(test) {
- this.testsByUid[test.uid] = test;
- }
- onSuiteEnd() {}
- onRunnerEnd() {
- let tests = Object.keys(this.testsByUid).map(k => {
- const test = this.testsByUid[k];
- const { output, ...simplified } = test;
-
- const title = test.title.trim().replace(/\s/g, '_');
-
- simplified.network = this.runnerStat.config.networkLog
- ? this.runnerStat.config.networkLog[title]
- : {};
-
- simplified.file = this.runnerStat.specs[0];
-
- return simplified;
- });
-
- const outputPath = `${this.options[0].outputDir}/customReport.json`;
- if (fs.existsSync(outputPath)) {
- // combine existing tests with new tests
- const existingTests = JSON.parse(
- fs.readFileSync(outputPath).toString()
- ).tests;
- tests = [...existingTests, ...tests];
- }
-
- const strReport = JSON.stringify(
- {
- testHome: this.options[0].testHome,
- tests,
- },
- null,
- 5
- );
-
- fs.writeFileSync(
- `${this.options[0].outputDir}/customReportJSONP.js`,
- `jsonpCallback(${strReport});`,
- err => {
- if (err) console.log(err);
- console.log('Successfully Written to File.');
- }
- );
-
- fs.writeFileSync(outputPath, strReport, err => {
- if (err) console.log(err);
- console.log('Successfully Written to File.');
- });
- }
-}
-
-module.exports = CustomReporter;
diff --git a/end-to-end-test/shared/wdio/wdio.conf.js b/end-to-end-test/shared/wdio/wdio.conf.js
index 0f4f1920af9..ea20329b320 100644
--- a/end-to-end-test/shared/wdio/wdio.conf.js
+++ b/end-to-end-test/shared/wdio/wdio.conf.js
@@ -9,7 +9,6 @@ var getScreenshotName = require('./getScreenshotName');
const TEST_TYPE = process.env.TEST_TYPE || 'remote';
-const CustomReporter = require('./customReporter.v6');
const { transformJUNITFiles } = require('../edit-junit');
const debug = process.env.DEBUG;
@@ -33,8 +32,9 @@ const chromeArgs = [
? [
'--headless',
'--no-sandbox',
- '--disable-gpu',
'--disable-setuid-sandbox',
+ '--in-process-gpu',
+ '--use-gl=angle',
]
: [];
})()
@@ -165,16 +165,12 @@ exports.config = {
//
//
- //port: 9515,
-
specs: [SPEC_FILE_PATTERN],
- //specs: ['./remote/specs/core/oncoprint.screenshot.spec.js'],
+ exclude: ['./local/specs/web-tour.spec.js'],
// Patterns to exclude.
- exclude: [
- // 'path/to/excluded/files'
- ],
+ //exclude: ['./local/specs/web-tour.spec.js'],
//
// ============
// Capabilities
@@ -209,7 +205,7 @@ exports.config = {
args: chromeArgs,
},
acceptInsecureCerts: true,
- acceptSslCerts: true,
+ //acceptSslCerts: true,
// If outputDir is provided WebdriverIO can capture driver session logs
// it is possible to configure which logTypes to include/exclude.
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
@@ -277,6 +273,7 @@ exports.config = {
],
],
+ //port:9515,
// FROM OLD webdriver config
// capabilities: [
// {
@@ -348,17 +345,6 @@ exports.config = {
},
},
],
- [
- CustomReporter,
- {
- testHome: TEST_TYPE,
- outputDir: process.env.JUNIT_REPORT_PATH || './shared/results/',
- outputFileFormat: function(opts) {
- // optional
- return `custom-results-${opts.cid}.${opts.capabilities}.xml`;
- },
- },
- ],
],
testHome: process.env.JUNIT_REPORT_PATH,
@@ -513,13 +499,11 @@ exports.config = {
* @param {