-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mutation-pie-chart
- Loading branch information
Showing
33 changed files
with
562 additions
and
196 deletions.
There are no files selected for viewing
Binary file modified
BIN
+1.07 KB
(100%)
...screenshots/reference/no_session_data_download_tab_element_chrome_1600x1000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.4 KB
...hots/reference/oncoprinter_reflects_default_colors_element_chrome_1600x1000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.4 KB
...eference/oncoprinter_reflects_user_selected_colors_element_chrome_1600x1000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.07 KB
(100%)
...te/screenshots/reference/session_data_download_tab_element_chrome_1600x1000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions
130
end-to-end-test/remote/specs/core/oncoprinterColorConfig.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
var assertScreenShotMatch = require('../../../shared/lib/testUtils') | ||
.assertScreenShotMatch; | ||
var assert = require('assert'); | ||
var waitForOncoprint = require('../../../shared/specUtils').waitForOncoprint; | ||
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils') | ||
.goToUrlAndSetLocalStorage; | ||
var getNthOncoprintTrackOptionsElements = require('../../../shared/specUtils') | ||
.getNthOncoprintTrackOptionsElements; | ||
var { | ||
checkOncoprintElement, | ||
getElementByTestHandle, | ||
} = require('../../../shared/specUtils.js'); | ||
|
||
const TIMEOUT = 6000; | ||
|
||
const ONCOPRINT_TIMEOUT = 60000; | ||
|
||
const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ''); | ||
|
||
describe('oncoprinter clinical example data, color configuration', () => { | ||
it('oncoprinter color configuration modal reflects user selected colors', function() { | ||
goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}/oncoprinter`); | ||
$('.oncoprinterClinicalExampleData').waitForExist(); | ||
$('.oncoprinterClinicalExampleData').click(); | ||
$('.oncoprinterSubmit').click(); | ||
waitForOncoprint(TIMEOUT); | ||
|
||
var trackOptionsElts = getNthOncoprintTrackOptionsElements(2); | ||
// open menu | ||
$(trackOptionsElts.button_selector).click(); | ||
$(trackOptionsElts.dropdown_selector).waitForDisplayed({ | ||
timeout: 1000, | ||
}); | ||
// click "Edit Colors" to open modal | ||
$(trackOptionsElts.dropdown_selector + ' li:nth-child(11)').click(); | ||
browser.pause(1000); | ||
|
||
// select new colors for track values | ||
getElementByTestHandle('color-picker-icon').click(); | ||
$('.circle-picker').waitForDisplayed({ timeout: 1000 }); | ||
$('.circle-picker [title="#990099"]').click(); | ||
waitForOncoprint(ONCOPRINT_TIMEOUT); | ||
getElementByTestHandle('color-picker-icon').waitForDisplayed(); | ||
getElementByTestHandle('color-picker-icon').click(); | ||
$('.circle-picker').waitForDisplayed({ reverse: true }); | ||
|
||
$$('[data-test="color-picker-icon"]')[1].click(); | ||
$('.circle-picker').waitForDisplayed({ timeout: 1000 }); | ||
$('.circle-picker [title="#109618"]').click(); | ||
waitForOncoprint(ONCOPRINT_TIMEOUT); | ||
getElementByTestHandle('color-picker-icon').waitForDisplayed(); | ||
$$('[data-test="color-picker-icon"]')[1].click(); | ||
$('.circle-picker').waitForDisplayed({ reverse: true }); | ||
|
||
$$('[data-test="color-picker-icon"]')[2].click(); | ||
$('.circle-picker').waitForDisplayed({ timeout: 1000 }); | ||
$('.circle-picker [title="#8b0707"]').click(); | ||
waitForOncoprint(ONCOPRINT_TIMEOUT); | ||
|
||
assert.strictEqual( | ||
$('[data-test="color-picker-icon"] rect').getAttribute('fill'), | ||
'#990099' | ||
); | ||
assert.strictEqual( | ||
$$('[data-test="color-picker-icon"] rect')[1].getAttribute('fill'), | ||
'#109618' | ||
); | ||
assert.strictEqual( | ||
$$('[data-test="color-picker-icon"] rect')[2].getAttribute('fill'), | ||
'#8b0707' | ||
); | ||
}); | ||
|
||
it('oncoprinter reflects user selected colors', () => { | ||
// close modal | ||
$('a.tabAnchor_oncoprint').click(); | ||
var res = checkOncoprintElement(); | ||
assertScreenShotMatch(res); | ||
}); | ||
|
||
it('oncoprinter reset colors button is visible when default colors not used', () => { | ||
// click "Edit Colors" to open modal and check "Reset Colors" button in modal | ||
var trackOptionsElts = getNthOncoprintTrackOptionsElements(2); | ||
$(trackOptionsElts.button_selector).click(); | ||
$(trackOptionsElts.dropdown_selector).waitForDisplayed({ | ||
timeout: 1000, | ||
}); | ||
$(trackOptionsElts.dropdown_selector + ' li:nth-child(11)').click(); | ||
getElementByTestHandle('resetColors').waitForDisplayed(); | ||
}); | ||
|
||
it('oncoprinter color configuration modal reflects default colors', () => { | ||
// click "Reset Colors" track | ||
getElementByTestHandle('resetColors').click(); | ||
waitForOncoprint(ONCOPRINT_TIMEOUT); | ||
|
||
assert.strictEqual( | ||
$('[data-test="color-picker-icon"] rect').getAttribute('fill'), | ||
'#dc3912' | ||
); | ||
assert.strictEqual( | ||
$$('[data-test="color-picker-icon"] rect')[1].getAttribute('fill'), | ||
'#3366cc' | ||
); | ||
assert.strictEqual( | ||
$$('[data-test="color-picker-icon"] rect')[2].getAttribute('fill'), | ||
'#ff9900' | ||
); | ||
}); | ||
|
||
it('oncoprinter reflects default colors', () => { | ||
// close modal | ||
$('a.tabAnchor_oncoprint').click(); | ||
var res = checkOncoprintElement(); | ||
assertScreenShotMatch(res); | ||
}); | ||
|
||
it('oncoprinter reset colors button is hidden when default colors are used', () => { | ||
// click "Edit Colors" to open modal and check "Reset Colors" button in modal | ||
var trackOptionsElts = getNthOncoprintTrackOptionsElements(2); | ||
$(trackOptionsElts.button_selector).click(); | ||
$(trackOptionsElts.dropdown_selector).waitForDisplayed({ | ||
timeout: 1000, | ||
}); | ||
$(trackOptionsElts.dropdown_selector + ' li:nth-child(11)').click(); | ||
getElementByTestHandle('resetColors').waitForDisplayed({ | ||
reverse: true, | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
#export CBIOPORTAL_URL="http://localhost:8081" | ||
#export GENOME_NEXUS_URL="https://www.genomenexus.org" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export CBIOPORTAL_URL="${CBIOPORTAL_URL:-https://beta.cbioportal.org}" | ||
export GENOME_NEXUS_URL="${GENOME_NEXUS_URL:-https://www.genomenexus.org}" | ||
export CBIOPORTAL_URL="${CBIOPORTAL_URL:-https://www.cbioportal.org}" | ||
export GENOME_NEXUS_URL="${GENOME_NEXUS_URL:-https://www.genomenexus.org}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.