Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade webdriver.io to v7 and begin migration of tests from sync to asyn #4846

Merged
merged 43 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
05741b0
remove async
alisman Feb 9, 2024
c4f66ae
jklj
alisman Feb 12, 2024
c48acef
jklj
alisman Feb 12, 2024
6355e1d
jklj
alisman Feb 13, 2024
f2a53cc
working with headless too
alisman Feb 13, 2024
77a10b3
working with headless too
alisman Feb 14, 2024
8e999e3
ignore engines
alisman Feb 14, 2024
4469333
ignore engines
alisman Feb 14, 2024
6312a1f
ignore engines
alisman Feb 14, 2024
4d95d9e
run all specs with 7
alisman Feb 14, 2024
ebaf6e0
Add local webdriver script
alisman Feb 27, 2024
be40366
update impage compare to use complete json
alisman Feb 27, 2024
d611a5b
fix saving of complete results
alisman Feb 28, 2024
f9e67a2
fix local db update
alisman Feb 28, 2024
fd9a0e6
blah
alisman Feb 29, 2024
ab55ab3
fix CIS hiding of UI
alisman Mar 1, 2024
6823f4f
fix CIS hiding of UI
alisman Mar 1, 2024
820d3dc
cleanup defunct custom reporter
alisman Mar 1, 2024
58cc845
more cleanup of main.js
alisman Mar 1, 2024
258fcc1
update screenshots
alisman Mar 1, 2024
3a9c4be
ignore web-tour spec
alisman Mar 4, 2024
b3826a9
ignore web-tour spec
alisman Mar 5, 2024
5949012
fdsa
alisman Mar 5, 2024
1254aa1
skip broken web-tour tests
alisman Mar 5, 2024
f0c8b49
update screenshot after intro of plots tab to studyview
alisman Apr 1, 2024
a90eecf
restore e2e run configuration
alisman Apr 1, 2024
366dbcb
update screenshots
alisman Apr 1, 2024
95a786e
update screenshots
alisman Apr 1, 2024
5b3cfd4
fix comparison ui resolution of remote or local
alisman Apr 1, 2024
457a94d
fix comparison ui resolution of remote or local
alisman Apr 2, 2024
3b65708
fix
alisman Apr 2, 2024
e652e80
fix
alisman Apr 2, 2024
9bd6689
chevron
alisman Apr 4, 2024
4e90d12
width
alisman Apr 4, 2024
4af15c6
width
alisman Apr 4, 2024
f29e645
use jsAPIClick
alisman Apr 4, 2024
adeab06
update screen
alisman Apr 4, 2024
aaacaa2
update screen
alisman Apr 5, 2024
f69af49
adjust oncoprint timeout
alisman Apr 5, 2024
fc9fe70
get rid of oncoprint timeout config
alisman Apr 8, 2024
b7b21eb
get rid of IE11 spec
alisman Apr 8, 2024
ae52034
cleanup
alisman Apr 8, 2024
5f08cec
cleanup
alisman Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were we storing the local artifacts in incorrect locations for all this time?

destination: /errors
- unless:
condition: << pipeline.parameters.enable_localdb_e2e >>
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.
18 changes: 9 additions & 9 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 @@ -133,7 +133,7 @@ describe('oncoprint', function() {
MANUAL_TRACK_CONFIG
);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);
waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();

const res = checkOncoprintElement();
assertScreenShotMatch(res);
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('oncoprint', function() {
);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);

waitForOncoprint(ONCOPRINT_TIMEOUT);
waitForOncoprint();

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

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

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

function getBookmarkUrl(browser) {
Expand Down Expand Up @@ -308,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
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.', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these skips intentional? do they stop working after upgrading to v7?

// 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.
20 changes: 8 additions & 12 deletions end-to-end-test/remote/specs/core/customTabs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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',
Expand All @@ -239,14 +233,16 @@ 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({ x: -10 });
$('=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
4 changes: 2 additions & 2 deletions end-to-end-test/remote/specs/core/home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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 = (
Expand Down
Loading
Loading