Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bemijonathan committed Jul 29, 2024
1 parent f540211 commit 4598972
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
21 changes: 13 additions & 8 deletions end-to-end-test/remote/specs/core/coexpression.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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"]'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
4 changes: 4 additions & 0 deletions end-to-end-test/shared/lib/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down

0 comments on commit 4598972

Please # to comment.