Skip to content

Commit

Permalink
Merge branch 'master' into fix-10375
Browse files Browse the repository at this point in the history
  • Loading branch information
7xuanlu authored May 2, 2024
2 parents 308dd66 + d6b275e commit d038c8d
Show file tree
Hide file tree
Showing 153 changed files with 10,018 additions and 2,931 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 >>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Follow instructions to boot up frontend dev server. This is the frontend that wi
cd end-to-end-test
// install deps
yarn
yarn --ignore-engines
```

Expand Down
21 changes: 0 additions & 21 deletions end-to-end-test/ie11/specs/ie.js

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 10 additions & 14 deletions end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -95,7 +95,7 @@ describe('oncoprint', function() {
),
}
);
waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();
});

it('initializes as configured by default', () => {
Expand Down Expand Up @@ -132,10 +132,8 @@ describe('oncoprint', function() {
const urlWithUserConfig = createUrlWithSettingsQueryParam(
MANUAL_TRACK_CONFIG
);
// go to home page first because navigating to same page with hash params doesn't cause change
goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);
waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();

const res = checkOncoprintElement();
assertScreenShotMatch(res);
Expand Down Expand Up @@ -172,11 +170,9 @@ describe('oncoprint', function() {
const urlWithUserConfig = createUrlWithSettingsQueryParam(
customConfig
);
// go to home page first because navigating to same page with hash params doesn't cause change
goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false);
browser.url(urlWithUserConfig);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);

waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();

// Check save button enabled
openTracksMenu();
Expand All @@ -187,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');
Expand Down Expand Up @@ -249,7 +245,7 @@ describe('oncoprint', function() {
SERVER_CLINICAL_TRACK_CONFIG
),
});
waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();
});

it('shows oql structural variant variations', function() {
Expand All @@ -269,7 +265,7 @@ function createUrlWithSettingsQueryParam(config) {
function openTracksMenu() {
const $tracksDropdown = $('#addTracksDropdown');
$tracksDropdown.click();
waitForOncoprint(2000);
waitForOncoprint();
}

function changeNthTrack(track, menuOptionButtonText) {
Expand All @@ -279,7 +275,7 @@ function changeNthTrack(track, menuOptionButtonText) {
timeout: 1000,
});
$(`li=${menuOptionButtonText}`).click();
waitForOncoprint(2000);
waitForOncoprint();
}

function getBookmarkUrl(browser) {
Expand Down Expand Up @@ -312,6 +308,6 @@ function createOncoprintFromLegacyFormat() {
).join(',');
const legacyUrl = `${studyes0_oncoprintTabUrl}&clinicallist=${legacyFormatQueryParam}`;
goToUrlAndSetLocalStorage(legacyUrl, false);
waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();
return legacyFormatQueryParam;
}
2 changes: 1 addition & 1 deletion end-to-end-test/local/specs/core/settings-menu.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

Expand Down
4 changes: 2 additions & 2 deletions end-to-end-test/local/specs/gsva.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('gsva feature', () => {
describe('oncoprint tab', () => {
beforeEach(() => {
goToUrlAndSetLocalStorage(oncoprintTabUrl, true);
waitForOncoprint(20000);
waitForOncoprint();
});

it('shows GSVA heatmap track', () => {
Expand All @@ -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);
});
Expand Down
1 change: 1 addition & 0 deletions end-to-end-test/local/specs/hide-download-controls.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ describe('hide download controls feature', function() {
'Clinical Data',
'CN Segments',
'Files & Links',
'Plots Beta!',
'Study Sponsors',
];
before(() => {
Expand Down
23 changes: 18 additions & 5 deletions end-to-end-test/local/specs/web-tour.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.', () => {
Expand Down Expand Up @@ -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"]').$(
Expand All @@ -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();

Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand Down
20 changes: 11 additions & 9 deletions end-to-end-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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",
Expand All @@ -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"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion end-to-end-test/remote/specs/core/customTabs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ function runTests(pageName, url, tabLocation) {

goToUrlWithCustomTabConfig(url, conf);

browser.setWindowSize(2000, browser.getWindowSize().height);

$('.mainTabs').waitForDisplayed();

assert.equal(
Expand Down Expand Up @@ -141,6 +143,8 @@ function runTests(pageName, url, tabLocation) {

goToUrlWithCustomTabConfig(url, conf);

browser.setWindowSize(2000, browser.getWindowSize().height);

$('.mainTabs').waitForDisplayed();

assert.equal(
Expand Down Expand Up @@ -210,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',
Expand All @@ -229,12 +233,15 @@ function runTests(pageName, url, tabLocation) {

goToUrlWithCustomTabConfig(url, conf);

browser.setWindowSize(1600, browser.getWindowSize().height);

browser.execute(() => {
window.renderCustomTab1 = function(div, tab) {
$(div).append(`<div>First render</div>`);
};
});

// offset to avoid overlapping elements
$('=Async Tab').click();

browser.pause(1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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);
});
Expand Down
Loading

0 comments on commit d038c8d

Please sign in to comment.