forked from cBioPortal/cbioportal-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move async to async migration home.spec.js mutation-mapper-tool.spec.… (
#1) * Update Genome Nexus API model and reVUE reference to fit new model (cBioPortal#4919) * Update Genome Nexus API model * Update revue reference to fit new model * Publish - cbioportal-frontend@3.3.280 - cbioportal-clinical-timeline@0.3.82 - cbioportal-frontend-commons@0.5.66 - cbioportal-utils@0.3.41 - genome-nexus-ts-api-client@1.1.32 - oncokb-frontend-commons@0.0.25 - react-mutation-mapper@0.8.109 - react-variant-view@0.3.110 * move sync to async * move all customTabs to async * move all customTabs to async * move all expressionComparison to async * move all genomicEvolotion to async * move all groupComparison to async * move all groupComparison to async * move all results.logic to async * move all redirect to async * move all quickSearch to async * convert plots to async * move all patient.spec.js to async * move all oncoprinter.spec.js to async * move async to async migration home.spec.js mutation-mapper-tool.spec.js mutationsTab.spec.js * move sync to async migration oncoprinterColorConfig.spec.js mutationTable.spec.js * refactored test cases to use async and await (cBioPortal#4918) * refactor test cases to use async and await * fix newsletter link in banner * fix newsletter link in sidebar * Remove demo-rfc72 reference from local e2e test * retest and refactor few changes * last refactoring except comparisonTab * tiny refactorings
- Loading branch information
1 parent
20cf5ad
commit fd751c8
Showing
50 changed files
with
6,753 additions
and
5,161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 75 additions & 61 deletions
136
end-to-end-test/remote/specs/core/coexpression.screenshot.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,124 @@ | ||
var assert = require('assert'); | ||
var expect = require('chai').expect; | ||
var waitForOncoprint = require('../../../shared/specUtils').waitForOncoprint; | ||
var setOncoprintMutationsMenuOpen = require('../../../shared/specUtils') | ||
.setOncoprintMutationsMenuOpen; | ||
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils') | ||
.goToUrlAndSetLocalStorage; | ||
var waitForNetworkQuiet = require('../../../shared/specUtils') | ||
.waitForNetworkQuiet; | ||
var sessionServiceIsEnabled = require('../../../shared/specUtils') | ||
.sessionServiceIsEnabled; | ||
var assertScreenShotMatch = require('../../../shared/lib/testUtils') | ||
.assertScreenShotMatch; | ||
|
||
const { | ||
getElement, | ||
goToUrlAndSetLocalStorage, | ||
COEXPRESSION_TIMEOUT, | ||
clickElement, | ||
} = require('../../../shared/specUtils_Async'); | ||
const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ''); | ||
|
||
var { COEXPRESSION_TIMEOUT } = require('../../../shared/specUtils'); | ||
const { assertScreenShotMatch } = require('../../../shared/lib/testUtils'); | ||
|
||
describe('coexpression tab screenshot tests', function() { | ||
this.retries(2); | ||
|
||
before(function() { | ||
var url = `${CBIOPORTAL_URL}/results/coexpression?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`; | ||
goToUrlAndSetLocalStorage(url); | ||
before(async function() { | ||
const url = `${CBIOPORTAL_URL}/results/coexpression?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`; | ||
await goToUrlAndSetLocalStorage(url); | ||
}); | ||
it('coexpression tab coadread_tcga_pub initial load', function() { | ||
$('div[data-test="CoExpressionPlot"]').waitForExist({ | ||
it('coexpression tab coadread_tcga_pub initial load', async function() { | ||
await getElement('div[data-test="CoExpressionPlot"]', { | ||
timeout: COEXPRESSION_TIMEOUT, | ||
}); // wait for plot to show up | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub log scale x and y mutations on', function() { | ||
$( | ||
'div[data-test="coExpressionTabDiv"] input[data-test="logScale"]' | ||
it('coexpression tab coadread_tcga_pub log scale x and y mutations on', async function() { | ||
( | ||
await getElement( | ||
'div[data-test="coExpressionTabDiv"] input[data-test="logScale"]' | ||
) | ||
).click(); | ||
$('body').moveTo({ xOffset: 0, yOffset: 0 }); | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
(await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub log scale x and y with regression line', function() { | ||
$('input[data-test="ShowRegressionLine"]').click(); | ||
$('body').moveTo({ xOffset: 0, yOffset: 0 }); | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
it('coexpression tab coadread_tcga_pub log scale x and y with regression line', async function() { | ||
(await getElement('input[data-test="ShowRegressionLine"]')).click(); | ||
(await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub loc scale x and y mutations off', function() { | ||
$('input[data-test="ShowRegressionLine"]').click(); | ||
$( | ||
'div[data-test="coExpressionTabDiv"] input[data-test="ShowMutations"]' | ||
it('coexpression tab coadread_tcga_pub loc scale x and y mutations off', async function() { | ||
(await getElement('input[data-test="ShowRegressionLine"]')).click(); | ||
( | ||
await getElement( | ||
'div[data-test="coExpressionTabDiv"] input[data-test="ShowMutations"]' | ||
) | ||
).click(); | ||
$('body').moveTo({ xOffset: 0, yOffset: 0 }); | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
(await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub switch tabs', function() { | ||
$('#coexpressionTabGeneTabs>ul>li:nth-child(2)>a').click(); // click on NRAS | ||
$('body').moveTo({ xOffset: 0, yOffset: 0 }); | ||
browser.pause(100); // give time to start loading | ||
$('div[data-test="CoExpressionPlot"]').waitForExist({ | ||
it('coexpression tab coadread_tcga_pub switch tabs', async function() { | ||
await ( | ||
await getElement('#coexpressionTabGeneTabs>ul>li:nth-child(2)>a') | ||
).click(); // click on NRAS | ||
await (await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); | ||
await browser.pause(100); // give time to start loading | ||
await getElement('div[data-test="CoExpressionPlot"]', { | ||
timeout: COEXPRESSION_TIMEOUT, | ||
}); // wait for plot to show up | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub switch profiles', function() { | ||
browser.execute(function() { | ||
it('coexpression tab coadread_tcga_pub switch profiles', async function() { | ||
await browser.execute(function() { | ||
resultsViewCoExpressionTab.onSelectProfileX({ | ||
value: 'coadread_tcga_pub_mrna', | ||
}); | ||
}); | ||
browser.execute(function() { | ||
await browser.execute(function() { | ||
resultsViewCoExpressionTab.onSelectProfileY({ | ||
value: 'coadread_tcga_pub_mrna', | ||
}); | ||
}); | ||
browser.pause(100); // give time to start loading | ||
$('div[data-test="CoExpressionPlot"]').waitForExist({ | ||
await browser.pause(100); | ||
await getElement('div[data-test="CoExpressionPlot"]', { | ||
timeout: COEXPRESSION_TIMEOUT, | ||
}); // wait for plot to show up | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub switch profiles + regression line', function() { | ||
$('input[data-test="ShowRegressionLine"]').click(); | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
it('coexpression tab coadread_tcga_pub switch profiles + regression line', async function() { | ||
await clickElement('input[data-test="ShowRegressionLine"]'); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
it('coexpression tab coadread_tcga_pub with a lot of genes', function() { | ||
goToUrlAndSetLocalStorage( | ||
it('coexpression tab coadread_tcga_pub with a lot of genes', async function() { | ||
await goToUrlAndSetLocalStorage( | ||
`${CBIOPORTAL_URL}/results/coexpression?Action=Submit&RPPA_SCORE_THRESHOLD=2&Z_SCORE_THRESHOLD=2&cancer_study_id=coadread_tcga_pub&cancer_study_list=coadread_tcga_pub&case_set_id=coadread_tcga_pub_hypermut&data_priority=0&gene_list=AKR1C3%2520AR%2520CYB5A%2520CYP11A1%2520CYP11B1%2520CYP11B2%2520CYP17A1%2520CYP19A1%2520CYP21A2%2520HSD17B1%2520HSD17B10%2520HSD17B11%2520HSD17B12%2520HSD17B13%2520HSD17B14%2520HSD17B2%2520HSD17B3%2520HSD17B4%2520HSD17B6%2520HSD17B7%2520HSD17B8%2520HSD3B1%2520HSD3B2%2520HSD3B7%2520RDH5%2520SHBG%2520SRD5A1%2520SRD5A2%2520SRD5A3%2520STAR&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&profileFilter=0&tab_index=tab_visualize` | ||
); | ||
$('div[data-test="CoExpressionPlot"]').waitForExist({ | ||
await getElement('div[data-test="CoExpressionPlot"]', { | ||
timeout: COEXPRESSION_TIMEOUT, | ||
}); // wait for plot to show up | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
|
||
it('coexpression tab coadread_tcga_pub with user defined case list', function() { | ||
goToUrlAndSetLocalStorage( | ||
it('coexpression tab coadread_tcga_pub with user defined case list', async function() { | ||
await goToUrlAndSetLocalStorage( | ||
`${CBIOPORTAL_URL}/results/coexpression?Action=Submit&cancer_study_list=coadread_tcga_pub&case_ids=coadread_tcga_pub%3ATCGA-A6-2672-01%2Bcoadread_tcga_pub%3ATCGA-A6-2678-01%2Bcoadread_tcga_pub%3ATCGA-A6-3809-01%2Bcoadread_tcga_pub%3ATCGA-AA-3502-01%2Bcoadread_tcga_pub%3ATCGA-AA-3510-01%2Bcoadread_tcga_pub%3ATCGA-AA-3672-01%2Bcoadread_tcga_pub%3ATCGA-AA-3673-01%2Bcoadread_tcga_pub%3ATCGA-AA-3850-01%2Bcoadread_tcga_pub%3ATCGA-AA-3852-01%2Bcoadread_tcga_pub%3ATCGA-AA-3862-01%2Bcoadread_tcga_pub%3ATCGA-AA-3877-01%2Bcoadread_tcga_pub%3ATCGA-AA-3986-01%2Bcoadread_tcga_pub%3ATCGA-AA-3989-01%2Bcoadread_tcga_pub%3ATCGA-AA-3994-01%2Bcoadread_tcga_pub%3ATCGA-AA-A00L-01%2Bcoadread_tcga_pub%3ATCGA-AA-A010-01%2Bcoadread_tcga_pub%3ATCGA-AA-A02O-01%2Bcoadread_tcga_pub%3ATCGA-CM-4748-01&case_set_id=-1&clinicallist=PROFILED_IN_coadread_tcga_pub_mutations%2CPROFILED_IN_coadread_tcga_pub_gistic&gene_list=KRAS%0AAPC&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=coadread_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=coadread_tcga_pub_mutations&show_samples=false&tab_index=tab_visualize` | ||
); | ||
$('div[data-test="CoExpressionPlot"]').waitForExist({ | ||
await getElement('div[data-test="CoExpressionPlot"]', { | ||
timeout: COEXPRESSION_TIMEOUT, | ||
}); // wait for plot to show up | ||
var res = browser.checkElement('div[data-test="coExpressionTabDiv"]'); | ||
const res = await browser.checkElement( | ||
'div[data-test="coExpressionTabDiv"]' | ||
); | ||
assertScreenShotMatch(res); | ||
}); | ||
}); |
Oops, something went wrong.