Commit 3d7f6db7 authored by Niklas Reimer's avatar Niklas Reimer
Browse files

3.7.21

parent 6a0a32c1
Showing with 76 additions and 42 deletions
+76 -42
var assert = require('assert');
var goToUrlAndSetLocalStorageWithProperty = require('../../../shared/specUtils')
.goToUrlAndSetLocalStorageWithProperty;
var { waitForOncoprint } = require('../../../shared/specUtils');
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils')
.goToUrlAndSetLocalStorage;
const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, '');
const url = `${CBIOPORTAL_URL}/results/oncoprint?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&data_priority=0&gene_list=ABLIM1%250ATMEM247&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&profileFilter=0&tab_index=tab_visualize`;
describe('results view check possibility to disable tabs', function() {
it('check that all tabs can be disabled', () => {
goToUrlAndSetLocalStorage(url, true);
waitForOncoprint();
const tabsContainer = $('.mainTabs');
tabsContainer.waitForDisplayed();
const tabs = getResultsViewTabNames();
// test that each tab can be disabled
message = '';
allTabsCanBeDisabled = true;
tabs.forEach(tab => {
goToUrlAndSetLocalStorageWithProperty(url, true, {
disabled_tabs: tab,
});
tabsContainer.waitForDisplayed();
const tabAnchor = $('.tabAnchor.tabAnchor_' + tab);
if (tabAnchor.isDisplayed()) {
message = message + 'Tab ' + tab + ' could not be disabled; ';
allTabsCanBeDisabled = false;
}
});
assert(allTabsCanBeDisabled, message);
});
});
function getResultsViewTabNames() {
// getting all visible tabs, excluding the first one, oncoprint
const tabs = $('.nav-tabs')
.$$('.tabAnchor')
.filter(tab => tab.isDisplayed())
.filter(
tab => tab.getAttribute('class') !== 'tabAnchor tabAnchor_oncoprint'
)
.map(tab =>
tab
.getAttribute('class')
.split('_')
.pop()
);
return tabs;
}
# set e.g.
export CBIOPORTAL_URL="https://www.cbioportal.org"
export GENOME_NEXUS_URL="https://www.genomenexus.org"
# export FHIRSPARK_HOST=localhost
......
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.cbioportal</groupId>
<artifactId>cbioportal-frontend</artifactId>
<artifactId>frontend-cbioportal</artifactId>
<version>0.3.0</version>
<packaging>jar</packaging>
......
......@@ -151,8 +151,6 @@ export interface IServerConfig {
enable_request_body_gzip_compression: boolean;
enable_treatment_groups: boolean;
referenceGenomeVersion: string;
skin_show_unauthorized_studies: boolean;
skin_global_message_for_unauthorized_studies: string;
skin_home_page_show_unauthorized_studies: boolean;
skin_home_page_unauthorized_studies_global_message: string;
fhirspark?: IFhirsparkConfig;
......
......@@ -1712,19 +1712,6 @@ export default class PatientViewPage extends React.Component<
}
/>
</MSKTab>
{/*<MSKTab key={5} id={{PatientViewPageTabs.MutationalSignatures}} linkText="Mutational Signature Data" hide={true}>*/}
{/*<div className="clearfix">*/}
{/*<FeatureTitle title="Mutational Signatures" isLoading={ this.patientViewPageStore.clinicalDataGroupedBySample.isPending } className="pull-left" />*/}
{/*<LoadingIndicator isLoading={this.patientViewPageStore.mutationalSignatureData.isPending}/>*/}
{/*{*/}
{/*(this.patientViewPageStore.clinicalDataGroupedBySample.isComplete && this.patientViewPageStore.mutationalSignatureData.isComplete) && (*/}
{/*<ClinicalInformationMutationalSignatureTable data={this.patientViewPageStore.mutationalSignatureData.result} showTitleBar={true}/>*/}
{/*)*/}
{/*}*/}
{/*</div>*/}
{/*</MSKTab>*/}
{this.patientViewPageStore
.hasMutationalSignatureData.result && (
<MSKTab
......
......@@ -471,7 +471,8 @@ export class PatientViewPageStore {
invoke: async () =>
findMutationMolecularProfile(
this.molecularProfilesInStudy,
this.studyId
this.studyId,
AlterationTypeConstants.MUTATION_EXTENDED
),
});
......
......@@ -264,7 +264,7 @@ export default class AlleleFreqColumnFormatter {
return result;
}
public static calcFrequency(mutation: Mutation): number | null {
protected static calcFrequency(mutation: Mutation): number | null {
if (!mutation) {
return null;
}
......
......@@ -78,10 +78,10 @@ export const DataTypePriorityCheckBox = observer(
profileTypes: string[];
store: QueryStore;
}) => {
let isSelected = true;
props.profileTypes.forEach(profileType => {
isSelected =
isSelected && props.store.isProfileTypeSelected(profileType);
// as long as a profile type matches any selected profile
// we consider it selected
let isSelected = props.profileTypes.some(profileType => {
return props.store.isProfileTypeSelected(profileType);
});
return (
......
......@@ -982,14 +982,15 @@ export class QueryStore {
profile.molecularAlterationType +
profile.datatype
)
.map(alterationTypeProfiles => {
// A study can have multiple profiles for same alteration type and datatpye.
// we need just one profile of each
return getSuffixOfMolecularProfile(
alterationTypeProfiles[0]
.reduce((agg: string[], alterationTypeProfiles) => {
const profileTypes = alterationTypeProfiles.map(
p => {
return getSuffixOfMolecularProfile(p);
}
);
})
.value();
agg.push(...profileTypes);
return agg;
}, []);
})
.value();
......
......@@ -131,9 +131,9 @@ class StudyInfoOverlay extends React.Component<
) : (
<div
style={{ maxWidth: 300 }}
dangerouslySetInnerHTML={{
__html: `${message}`,
}}
dangerouslySetInnerHTML={this.addHTMLDescription(
message.toString()
)}
/>
);
}
......@@ -154,7 +154,6 @@ export default class StudyTagsTooltip extends React.Component<
renderTooltip() {
return (
<DefaultTooltip
key={this.props.key}
mouseEnterDelay={this.props.mouseEnterDelay}
placement={this.props.placement}
overlay={
......
......@@ -1079,16 +1079,14 @@ export function isMutationProfile(profile: MolecularProfile): boolean {
export function findMutationMolecularProfile(
molecularProfilesInStudy: MobxPromise<MolecularProfile[]>,
studyId: string,
suffix: string = MOLECULAR_PROFILE_MUTATIONS_SUFFIX
type: string
) {
if (!molecularProfilesInStudy.result) {
return undefined;
}
const profile = molecularProfilesInStudy.result.find(
(p: MolecularProfile) => {
return p.molecularProfileId === `${studyId}${suffix}`;
}
const profile = molecularProfilesInStudy.result!.find(
(profile: MolecularProfile) => profile.molecularAlterationType === type
);
return profile;
......@@ -1096,13 +1094,12 @@ export function findMutationMolecularProfile(
export function findUncalledMutationMolecularProfileId(
molecularProfilesInStudy: MobxPromise<MolecularProfile[]>,
studyId: string,
suffix: string = MOLECULAR_PROFILE_UNCALLED_MUTATIONS_SUFFIX
studyId: string
) {
const profile = findMutationMolecularProfile(
molecularProfilesInStudy,
studyId,
suffix
AlterationTypeConstants.MUTATION_UNCALLED
);
if (profile) {
return profile.molecularProfileId;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment