From 45989723e279bde7313aaa67028bc65682bee3b5 Mon Sep 17 00:00:00 2001 From: Jonathan Atiene Date: Mon, 29 Jul 2024 23:58:44 +0100 Subject: [PATCH] more tests --- .../core/coexpression.screenshot.spec.js | 21 ++++++++++++------- .../core/groupComparison.screenshot.spec.js | 2 +- end-to-end-test/shared/lib/testUtils.js | 4 ++++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/end-to-end-test/remote/specs/core/coexpression.screenshot.spec.js b/end-to-end-test/remote/specs/core/coexpression.screenshot.spec.js index 71c7dc37e74..efa6de26d80 100644 --- a/end-to-end-test/remote/specs/core/coexpression.screenshot.spec.js +++ b/end-to-end-test/remote/specs/core/coexpression.screenshot.spec.js @@ -8,7 +8,7 @@ const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ''); const { assertScreenShotMatch } = require('../../../shared/lib/testUtils'); describe('coexpression tab screenshot tests', function() { - this.retries(2); + this.retries(0); 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); @@ -17,39 +17,44 @@ describe('coexpression tab screenshot tests', function() { await getElement('div[data-test="CoExpressionPlot"]', { timeout: COEXPRESSION_TIMEOUT, }); // wait for plot to show up + await (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 mutations on', async function() { - ( + await ( await getElement( 'div[data-test="coExpressionTabDiv"] input[data-test="logScale"]' ) ).click(); - (await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); + await (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', async function() { - (await getElement('input[data-test="ShowRegressionLine"]')).click(); - (await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); + await ( + await getElement('input[data-test="ShowRegressionLine"]') + ).click(); + await (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', async function() { - (await getElement('input[data-test="ShowRegressionLine"]')).click(); - ( + await ( + await getElement('input[data-test="ShowRegressionLine"]') + ).click(); + await ( await getElement( 'div[data-test="coExpressionTabDiv"] input[data-test="ShowMutations"]' ) ).click(); - (await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); + await (await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 }); const res = await browser.checkElement( 'div[data-test="coExpressionTabDiv"]' ); diff --git a/end-to-end-test/remote/specs/core/groupComparison.screenshot.spec.js b/end-to-end-test/remote/specs/core/groupComparison.screenshot.spec.js index 8804f3e6f2f..1a7499935c2 100644 --- a/end-to-end-test/remote/specs/core/groupComparison.screenshot.spec.js +++ b/end-to-end-test/remote/specs/core/groupComparison.screenshot.spec.js @@ -767,7 +767,7 @@ describe('group comparison page screenshot tests', () => { }); }); - describe('overlap upset diagram group selection', () => { + describe.only('overlap upset diagram group selection', () => { before(async () => { await goToUrlAndSetLocalStorage( `${CBIOPORTAL_URL}/comparison?sessionId=5d0bc0c5e4b0ab4137876bc3` diff --git a/end-to-end-test/shared/lib/testUtils.js b/end-to-end-test/shared/lib/testUtils.js index 9977a45f739..84a84ae9a50 100644 --- a/end-to-end-test/shared/lib/testUtils.js +++ b/end-to-end-test/shared/lib/testUtils.js @@ -5,6 +5,10 @@ module.exports = { if (result[0].referenceExists === false) { assert.fail('Missing reference screenshot'); } else { + console.log( + 'result[0].isWithinMisMatchTolerance ->->->', + result[0] + ); assert(result[0].isWithinMisMatchTolerance, message); } },