Skip to content

Commit

Permalink
Merge pull request #2838 from adamabeshouse/global-settings2
Browse files Browse the repository at this point in the history
Global settings menu for results view page
  • Loading branch information
adamabeshouse committed Nov 21, 2019
2 parents 79c29c2 + d6d98fa commit c621f31
Show file tree
Hide file tree
Showing 37 changed files with 979 additions and 526 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions end-to-end-test/remote/specs/core/mutationsTab.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var assert = require('assert');
var waitForOncoprint = require('../../../shared/specUtils').waitForOncoprint;
var setOncoprintMutationsMenuOpen = require('../../../shared/specUtils').setOncoprintMutationsMenuOpen;
var setResultsPageSettingsMenuOpen = require('../../../shared/specUtils').setResultsPageSettingsMenuOpen;
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils').goToUrlAndSetLocalStorage;

const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, "");
Expand All @@ -9,11 +9,25 @@ describe("mutations tab", function() {
it("uses VUS filtering", function() {
goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=acc_tcga_pan_can_atlas_2018&case_set_id=acc_tcga_pan_can_atlas_2018_cnaseq&data_priority=0&gene_list=HSD17B4&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=acc_tcga_pan_can_atlas_2018_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=acc_tcga_pan_can_atlas_2018_mutations&tab_index=tab_visualize`);
waitForOncoprint(60000);
setOncoprintMutationsMenuOpen(true);
setResultsPageSettingsMenuOpen(true);
browser.click('input[data-test="HideVUS"]');
setResultsPageSettingsMenuOpen(false);
browser.waitForExist('a.tabAnchor_mutations');
browser.click('a.tabAnchor_mutations');
browser.waitForVisible('[data-test="LazyMobXTable_CountHeader"]');
assert(browser.getHTML('[data-test="LazyMobXTable_CountHeader"]', false).indexOf("0 Mutations") > -1);
});
it("uses germline filtering", function() {
goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}/results/mutations?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=brca_tcga_pub&case_set_id=brca_tcga_pub_cnaseq&data_priority=0&gene_list=BRCA1%2520BRCA2&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=brca_tcga_pub_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=brca_tcga_pub_mutations&tab_index=tab_visualize`);
browser.waitForVisible('[data-test="LazyMobXTable_CountHeader"]', 10000);
assert(browser.getHTML('[data-test="LazyMobXTable_CountHeader"]', false).indexOf("19 Mutations") > -1, "unfiltered is 19 mutations");

browser.click('button[data-test="GlobalSettingsButton"]');
browser.waitForVisible('div[data-test="GlobalSettingsDropdown"]', 10000);
browser.click('div[data-test="GlobalSettingsDropdown"] input[data-test="HideGermline"]');
browser.click('button[data-test="GlobalSettingsButton"]');

browser.waitForVisible('[data-test="LazyMobXTable_CountHeader"]', 10000);
assert(browser.getHTML('[data-test="LazyMobXTable_CountHeader"]', false).indexOf("6 Mutations") > -1, "filtered is 6 mutations");
});
});
23 changes: 11 additions & 12 deletions end-to-end-test/remote/specs/core/oncoprint.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions end-to-end-test/shared/specUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ function getTextInOncoprintLegend() {
return browser.getText("#oncoprintDiv .oncoprint-legend-div svg");
}

function setResultsPageSettingsMenuOpen(open) {
const button = 'button[data-test="GlobalSettingsButton"]';
const dropdown = 'div[data-test="GlobalSettingsDropdown"]';
browser.waitForVisible(button);
browser.waitUntil(()=>{
if (open === browser.isVisible(dropdown)) {
return true;
} else {
browser.click(button);
return false;
}
}, 10000, `Couldn't ${open ? "open" : "close"} results page settings menu`, 2000);
}

function setOncoprintMutationsMenuOpen(open) {
const mutationColorMenuButton = "#mutationColorDropdown";
const mutationColorMenuDropdown = "div.oncoprint__controls__mutation_color_menu";
Expand Down Expand Up @@ -317,5 +331,6 @@ module.exports = {
selectCheckedOption: selectCheckedOption,
getOncoprintGroupHeaderOptionsElements:getOncoprintGroupHeaderOptionsElements,
showGsva: showGsva,
setResultsPageSettingsMenuOpen:setResultsPageSettingsMenuOpen,
setDropdownOpen:setDropdownOpen
};
1 change: 1 addition & 0 deletions src/pages/groupComparison/GroupComparisonStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {GACustomFieldsEnum, trackEvent} from "shared/lib/tracking";
import ifndef from "../../shared/lib/ifndef";
import {ISurvivalDescription} from "pages/resultsView/survival/SurvivalDescriptionTable";
import GroupComparisonURLWrapper from "./GroupComparisonURLWrapper";
import {CancerStudyQueryUrlParams} from "../../shared/components/query/QueryStore";
import {fetchAllReferenceGenomeGenes} from "shared/lib/StoreUtils";

export enum OverlapStrategy {
Expand Down
12 changes: 1 addition & 11 deletions src/pages/resultsView/ResultsViewPageHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import * as _ from "lodash";
import {getMolecularProfiles} from "./ResultsViewPageStoreUtils";
import {runInAction} from "mobx";
import {ResultsViewPageStore, SamplesSpecificationElement} from "./ResultsViewPageStore";
import client from "../../shared/api/cbioportalClientInstance";
import sessionServiceClient from "../../shared/api/sessionServiceInstance";
import {CancerStudy} from "../../shared/api/generated/CBioPortalAPI";
import {SamplesSpecificationElement} from "./ResultsViewPageStore";
import {VirtualStudy} from "../../shared/model/VirtualStudy";
import hashString from "../../shared/lib/hashString";
import {
CLINICAL_TRACKS_URL_PARAM, HEATMAP_TRACKS_URL_PARAM,
SAMPLE_MODE_URL_PARAM
} from "../../shared/components/oncoprint/ResultsViewOncoprint";

export enum ResultsViewTab {
ONCOPRINT="oncoprint",
Expand Down

0 comments on commit c621f31

Please sign in to comment.