Skip to content

Commit e3690e1

Browse files
authored
Merge branch 'master' into mutation-pie-chart
2 parents ba8110c + 5f850c2 commit e3690e1

33 files changed

+562
-196
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
var assertScreenShotMatch = require('../../../shared/lib/testUtils')
2+
.assertScreenShotMatch;
3+
var assert = require('assert');
4+
var waitForOncoprint = require('../../../shared/specUtils').waitForOncoprint;
5+
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils')
6+
.goToUrlAndSetLocalStorage;
7+
var getNthOncoprintTrackOptionsElements = require('../../../shared/specUtils')
8+
.getNthOncoprintTrackOptionsElements;
9+
var {
10+
checkOncoprintElement,
11+
getElementByTestHandle,
12+
} = require('../../../shared/specUtils.js');
13+
14+
const TIMEOUT = 6000;
15+
16+
const ONCOPRINT_TIMEOUT = 60000;
17+
18+
const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, '');
19+
20+
describe('oncoprinter clinical example data, color configuration', () => {
21+
it('oncoprinter color configuration modal reflects user selected colors', function() {
22+
goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}/oncoprinter`);
23+
$('.oncoprinterClinicalExampleData').waitForExist();
24+
$('.oncoprinterClinicalExampleData').click();
25+
$('.oncoprinterSubmit').click();
26+
waitForOncoprint(TIMEOUT);
27+
28+
var trackOptionsElts = getNthOncoprintTrackOptionsElements(2);
29+
// open menu
30+
$(trackOptionsElts.button_selector).click();
31+
$(trackOptionsElts.dropdown_selector).waitForDisplayed({
32+
timeout: 1000,
33+
});
34+
// click "Edit Colors" to open modal
35+
$(trackOptionsElts.dropdown_selector + ' li:nth-child(11)').click();
36+
browser.pause(1000);
37+
38+
// select new colors for track values
39+
getElementByTestHandle('color-picker-icon').click();
40+
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
41+
$('.circle-picker [title="#990099"]').click();
42+
waitForOncoprint(ONCOPRINT_TIMEOUT);
43+
getElementByTestHandle('color-picker-icon').waitForDisplayed();
44+
getElementByTestHandle('color-picker-icon').click();
45+
$('.circle-picker').waitForDisplayed({ reverse: true });
46+
47+
$$('[data-test="color-picker-icon"]')[1].click();
48+
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
49+
$('.circle-picker [title="#109618"]').click();
50+
waitForOncoprint(ONCOPRINT_TIMEOUT);
51+
getElementByTestHandle('color-picker-icon').waitForDisplayed();
52+
$$('[data-test="color-picker-icon"]')[1].click();
53+
$('.circle-picker').waitForDisplayed({ reverse: true });
54+
55+
$$('[data-test="color-picker-icon"]')[2].click();
56+
$('.circle-picker').waitForDisplayed({ timeout: 1000 });
57+
$('.circle-picker [title="#8b0707"]').click();
58+
waitForOncoprint(ONCOPRINT_TIMEOUT);
59+
60+
assert.strictEqual(
61+
$('[data-test="color-picker-icon"] rect').getAttribute('fill'),
62+
'#990099'
63+
);
64+
assert.strictEqual(
65+
$$('[data-test="color-picker-icon"] rect')[1].getAttribute('fill'),
66+
'#109618'
67+
);
68+
assert.strictEqual(
69+
$$('[data-test="color-picker-icon"] rect')[2].getAttribute('fill'),
70+
'#8b0707'
71+
);
72+
});
73+
74+
it('oncoprinter reflects user selected colors', () => {
75+
// close modal
76+
$('a.tabAnchor_oncoprint').click();
77+
var res = checkOncoprintElement();
78+
assertScreenShotMatch(res);
79+
});
80+
81+
it('oncoprinter reset colors button is visible when default colors not used', () => {
82+
// click "Edit Colors" to open modal and check "Reset Colors" button in modal
83+
var trackOptionsElts = getNthOncoprintTrackOptionsElements(2);
84+
$(trackOptionsElts.button_selector).click();
85+
$(trackOptionsElts.dropdown_selector).waitForDisplayed({
86+
timeout: 1000,
87+
});
88+
$(trackOptionsElts.dropdown_selector + ' li:nth-child(11)').click();
89+
getElementByTestHandle('resetColors').waitForDisplayed();
90+
});
91+
92+
it('oncoprinter color configuration modal reflects default colors', () => {
93+
// click "Reset Colors" track
94+
getElementByTestHandle('resetColors').click();
95+
waitForOncoprint(ONCOPRINT_TIMEOUT);
96+
97+
assert.strictEqual(
98+
$('[data-test="color-picker-icon"] rect').getAttribute('fill'),
99+
'#dc3912'
100+
);
101+
assert.strictEqual(
102+
$$('[data-test="color-picker-icon"] rect')[1].getAttribute('fill'),
103+
'#3366cc'
104+
);
105+
assert.strictEqual(
106+
$$('[data-test="color-picker-icon"] rect')[2].getAttribute('fill'),
107+
'#ff9900'
108+
);
109+
});
110+
111+
it('oncoprinter reflects default colors', () => {
112+
// close modal
113+
$('a.tabAnchor_oncoprint').click();
114+
var res = checkOncoprintElement();
115+
assertScreenShotMatch(res);
116+
});
117+
118+
it('oncoprinter reset colors button is hidden when default colors are used', () => {
119+
// click "Edit Colors" to open modal and check "Reset Colors" button in modal
120+
var trackOptionsElts = getNthOncoprintTrackOptionsElements(2);
121+
$(trackOptionsElts.button_selector).click();
122+
$(trackOptionsElts.dropdown_selector).waitForDisplayed({
123+
timeout: 1000,
124+
});
125+
$(trackOptionsElts.dropdown_selector + ' li:nth-child(11)').click();
126+
getElementByTestHandle('resetColors').waitForDisplayed({
127+
reverse: true,
128+
});
129+
});
130+
});

env/custom.sh

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
#export CBIOPORTAL_URL="http://localhost:8081"
2-
#export GENOME_NEXUS_URL="https://www.genomenexus.org"

env/master.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export CBIOPORTAL_URL="${CBIOPORTAL_URL:-https://beta.cbioportal.org}"
2-
export GENOME_NEXUS_URL="${GENOME_NEXUS_URL:-https://www.genomenexus.org}"
1+
export CBIOPORTAL_URL="${CBIOPORTAL_URL:-https://www.cbioportal.org}"
2+
export GENOME_NEXUS_URL="${GENOME_NEXUS_URL:-https://www.genomenexus.org}"

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cbioportal-frontend",
33
"private": true,
4-
"version": "3.3.264",
4+
"version": "3.3.266",
55
"workspaces": {
66
"packages": [
77
".",
@@ -31,8 +31,8 @@
3131
"heroku-postbuild": "yarn run build && yarn add pushstate-server@3.0.1 -g",
3232
"updateAPI": "yarn run fetchAPI && yarn run buildAPI && yarn run updateOncoKbAPI && yarn run updateGenomeNexusAPI",
3333
"convertToSwagger2": "./scripts/convert_to_swagger2.sh && yarn run extendSwagger2Converter",
34-
"fetchAPILocal": "export CBIOPORTAL_URL=http://localhost:8090 && curl -s -L -k ${CBIOPORTAL_URL}/v3/api-docs/public | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/v3/api-docs/internal | json | grep -v host | grep -v basePath | grep -v termsOfService > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json",
35-
"fetchAPI": "./scripts/env_vars.sh && eval \"$(./scripts/env_vars.sh)\" && curl -s -L -k ${CBIOPORTAL_URL}/v3/api-docs/public > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/v3/api-docs/internal | json > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json && yarn run convertToSwagger2",
34+
"fetchAPILocal": "export CBIOPORTAL_URL=http://localhost:8090 && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/public | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/internal | json | grep -v host | grep -v basePath | grep -v termsOfService > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json",
35+
"fetchAPI": "./scripts/env_vars.sh && eval \"$(./scripts/env_vars.sh)\" && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/public > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPI-docs.json && curl -s -L -k ${CBIOPORTAL_URL}/api/v3/api-docs/internal | json > packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json && yarn run convertToSwagger2",
3636
"extendSwagger2Converter": "node scripts/extend_converter.js packages/cbioportal-ts-api-client/src/generated CBioPortalAPI CBioPortalAPIInternal",
3737
"buildAPI": "node scripts/generate-api.js packages/cbioportal-ts-api-client/src/generated CBioPortalAPI CBioPortalAPIInternal",
3838
"updateOncoKbAPI": "yarn run fetchOncoKbAPI && yarn run buildOncoKbAPI",
@@ -42,7 +42,7 @@
4242
"fetchG2SAPI": "curl -s -k http://g2s.genomenexus.org/v2/api-docs?group=api > packages/genome-nexus-ts-api-client/src/generated/Genome2StructureAPI-docs.json",
4343
"buildG2SAPI": "node scripts/generate-api.js packages/genome-nexus-ts-api-client/src/generated Genome2StructureAPI",
4444
"updateGenomeNexusAPI": "yarn run fetchGenomeNexusAPI && yarn run buildGenomeNexusAPI",
45-
"fetchGenomeNexusAPI": "./scripts/env_vars.sh && eval \"$(./scripts/env_vars.sh)\" && curl -s -k ${GENOME_NEXUS_URL}/v2/api-docs | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json && curl -s -k ${GENOME_NEXUS_URL}/v2/api-docs?group=internal | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal-docs.json",
45+
"fetchGenomeNexusAPI": "./scripts/env_vars.sh && eval \"$(./scripts/env_vars.sh)\" && curl -s -L -k ${GENOME_NEXUS_URL}/v2/api-docs | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json && curl -s -L -k ${GENOME_NEXUS_URL}/v2/api-docs?group=internal | json | grep -v basePath | grep -v termsOfService | grep -v host > packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPIInternal-docs.json",
4646
"buildGenomeNexusAPI": "node scripts/generate-api.js packages/genome-nexus-ts-api-client/src/generated GenomeNexusAPI GenomeNexusAPIInternal",
4747
"updateHotspotGenes": "./scripts/get_hotspot_genes.sh > src/shared/static-data/hotspotGenes.json",
4848
"compileOqlParser": "cd src/shared/lib/oql && pegjs oql-parser.pegjs",
@@ -158,10 +158,10 @@
158158
"bootstrap-sass": "3.4.1",
159159
"bowser": "^1.7.1",
160160
"bundle-loader": "^0.5.4",
161-
"cbioportal-clinical-timeline": "^0.3.72",
162-
"cbioportal-frontend-commons": "^0.5.57",
163-
"cbioportal-ts-api-client": "^0.9.64",
164-
"cbioportal-utils": "^0.3.36",
161+
"cbioportal-clinical-timeline": "^0.3.74",
162+
"cbioportal-frontend-commons": "^0.5.58",
163+
"cbioportal-ts-api-client": "^0.9.65",
164+
"cbioportal-utils": "^0.3.37",
165165
"chart.js": "^2.6.0",
166166
"classnames": "^2.2.5",
167167
"clinical-timeline": "0.0.30",
@@ -188,7 +188,7 @@
188188
"fmin": "^0.0.2",
189189
"font-awesome": "^4.7.0",
190190
"fork-ts-checker-webpack-plugin": "^6.3.3",
191-
"genome-nexus-ts-api-client": "^1.1.30",
191+
"genome-nexus-ts-api-client": "^1.1.31",
192192
"git-revision-webpack-plugin": "^5.0.0",
193193
"history": "4.10.1",
194194
"html-webpack-plugin": "^5.3.2",
@@ -227,7 +227,7 @@
227227
"mobxpromise": "github:cbioportal/mobxpromise#c3429672eb39be54e54ce14a8636e8d843729db3",
228228
"numeral": "^2.0.6",
229229
"object-sizeof": "^1.2.0",
230-
"oncokb-frontend-commons": "^0.0.20",
230+
"oncokb-frontend-commons": "^0.0.21",
231231
"oncokb-styles": "~1.4.2",
232232
"oncokb-ts-api-client": "^1.3.3",
233233
"oncoprintjs": "^6.0.5",
@@ -272,7 +272,7 @@
272272
"react-markdown": "^7.0.1",
273273
"react-mfb": "^0.6.0",
274274
"react-motion": "^0.4.7",
275-
"react-mutation-mapper": "^0.8.100",
275+
"react-mutation-mapper": "^0.8.101",
276276
"react-overlays": "0.7.4",
277277
"react-portal": "^4.2.0",
278278
"react-rangeslider": "^2.1.0",

packages/cbioportal-clinical-timeline/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cbioportal-clinical-timeline",
33
"description": "cBioPortal Clinical Timeline",
4-
"version": "0.3.72",
4+
"version": "0.3.74",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",
77
"jsnext:main": "dist/index.es.js",
@@ -39,7 +39,7 @@
3939
},
4040
"dependencies": {
4141
"autobind-decorator": "^2.1.0",
42-
"cbioportal-frontend-commons": "^0.5.57",
42+
"cbioportal-frontend-commons": "^0.5.58",
4343
"lodash": "^4.17.11",
4444
"react-bootstrap": "^0.31.5",
4545
"react-overlays": "0.7.4",

packages/cbioportal-clinical-timeline/src/TimelineStore.tsx

+17-4
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,23 @@ export class TimelineStore {
291291
>
292292
{point}
293293
{uid === this.hoveredTooltipUid && (
294-
<span>
295-
{tooltipIndex + 1} of{' '}
296-
{tooltipModel.events.length}. Use spacebar or
297-
arrow keys to see others.
294+
<span className="btn-group">
295+
<button
296+
className="btn btn-default btn-xs"
297+
onClick={() => this.prevTooltipEvent()}
298+
>
299+
&lt;
300+
</button>
301+
<span className="btn btn-default btn-xs">
302+
{tooltipIndex + 1} of{' '}
303+
{tooltipModel.events.length} events
304+
</span>
305+
<button
306+
className="btn btn-default btn-xs"
307+
onClick={() => this.nextTooltipEvent()}
308+
>
309+
&gt;
310+
</button>
298311
</span>
299312
)}
300313
</div>

packages/cbioportal-frontend-commons/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cbioportal-frontend-commons",
33
"description": "cBioPortal Frontend Modules",
4-
"version": "0.5.57",
4+
"version": "0.5.58",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",
77
"jsnext:main": "dist/index.es.js",
@@ -38,7 +38,7 @@
3838
},
3939
"dependencies": {
4040
"autobind-decorator": "^2.1.0",
41-
"cbioportal-utils": "^0.3.36",
41+
"cbioportal-utils": "^0.3.37",
4242
"classnames": "^2.2.5",
4343
"jquery": "^3.2.1",
4444
"lodash": "^4.17.15",

packages/cbioportal-ts-api-client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cbioportal-ts-api-client",
33
"description": "cBioPortal API Client for TypeScript",
4-
"version": "0.9.64",
4+
"version": "0.9.65",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",
77
"jsnext:main": "dist/index.es.js",

packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal-docs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
],
7070
"parameters": [
7171
{
72-
"description": "Secret API key passed in HTTP header. The key is configured in portal.properties of the portal instance.",
72+
"description": "Secret API key passed in HTTP header. The key is configured in application.properties of the portal instance.",
7373
"in": "header",
7474
"name": "X-API-KEY",
7575
"required": true,

packages/cbioportal-ts-api-client/src/generated/CBioPortalAPIInternal.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ export default class CBioPortalAPIInternal {
13621362
* Clear and reinitialize caches
13631363
* @method
13641364
* @name CBioPortalAPIInternal#clearAllCachesUsingDELETE
1365-
* @param {string} xApiKey - Secret API key passed in HTTP header. The key is configured in portal.properties of the portal instance.
1365+
* @param {string} xApiKey - Secret API key passed in HTTP header. The key is configured in application.properties of the portal instance.
13661366
* @param {boolean} springManagedCache - Clear Spring-managed caches
13671367
*/
13681368
clearAllCachesUsingDELETEWithHttpInfo(parameters: {
@@ -1411,7 +1411,7 @@ export default class CBioPortalAPIInternal {
14111411
* Clear and reinitialize caches
14121412
* @method
14131413
* @name CBioPortalAPIInternal#clearAllCachesUsingDELETE
1414-
* @param {string} xApiKey - Secret API key passed in HTTP header. The key is configured in portal.properties of the portal instance.
1414+
* @param {string} xApiKey - Secret API key passed in HTTP header. The key is configured in application.properties of the portal instance.
14151415
* @param {boolean} springManagedCache - Clear Spring-managed caches
14161416
*/
14171417
clearAllCachesUsingDELETE(parameters: {

packages/cbioportal-utils/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cbioportal-utils",
33
"description": "cBioPortal Utilities",
4-
"version": "0.3.36",
4+
"version": "0.3.37",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",
77
"jsnext:main": "dist/index.es.js",
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"buffer": "^6.0.3",
33-
"genome-nexus-ts-api-client": "^1.1.30",
33+
"genome-nexus-ts-api-client": "^1.1.31",
3434
"lodash": "^4.17.15",
3535
"oncokb-ts-api-client": "^1.3.3",
3636
"superagent": "^3.8.3",

packages/genome-nexus-ts-api-client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "genome-nexus-ts-api-client",
33
"description": "Genome Nexus API Client for TypeScript",
4-
"version": "1.1.30",
4+
"version": "1.1.31",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",
77
"jsnext:main": "dist/index.es.js",

packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI-docs.json

-9
Original file line numberDiff line numberDiff line change
@@ -1594,15 +1594,6 @@
15941594
},
15951595
"ncitCode": {
15961596
"type": "string"
1597-
},
1598-
"synonyms": {
1599-
"type": "array",
1600-
"items": {
1601-
"type": "string"
1602-
}
1603-
},
1604-
"uuid": {
1605-
"type": "string"
16061597
}
16071598
}
16081599
},

packages/genome-nexus-ts-api-client/src/generated/GenomeNexusAPI.ts

-4
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ export type Drug = {
186186

187187
'ncitCode': string
188188

189-
'synonyms': Array < string >
190-
191-
'uuid': string
192-
193189
};
194190
export type EnsemblFilter = {
195191
'geneIds': Array < string >

packages/oncokb-frontend-commons/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oncokb-frontend-commons",
3-
"version": "0.0.20",
3+
"version": "0.0.21",
44
"description": "OncoKB Frontend Modules",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",
@@ -35,7 +35,7 @@
3535
"react-dom": "^15.0.0 || ^16.0.0"
3636
},
3737
"dependencies": {
38-
"cbioportal-utils": "^0.3.36",
38+
"cbioportal-utils": "^0.3.37",
3939
"classnames": "^2.2.5",
4040
"lodash": "^4.17.15",
4141
"oncokb-styles": "~1.4.2",

0 commit comments

Comments
 (0)