Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 31 additions & 31 deletions end-to-end-test/local/specs/SurvivalChart.screenshot.spec.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
var goToUrlAndSetLocalStorage = require('../../shared/specUtils')
.goToUrlAndSetLocalStorage;
var waitForNetworkQuiet = require('../../shared/specUtils').waitForNetworkQuiet;
var openGroupComparison = require('../../shared/specUtils').openGroupComparison;
var assertScreenShotMatch = require('../../shared/lib/testUtils')
.assertScreenShotMatch;
var setInputText = require('../../shared/specUtils').setInputText;
var {
setDropdownOpen,
selectClinicalTabPlotType,
getElementByTestHandle,
const { assertScreenShotMatch } = require('../../shared/lib/testUtils');
const {
openGroupComparison,
setInputText,
setCheckboxChecked,
} = require('../../shared/specUtils');
clickElement,
getElement,
} = require('../../shared/specUtils_Async');

const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, '');

describe('Screenshot test for extend survival chart (feature flag)', function() {
this.retries(0);

before(function() {
openGroupComparison(
before(async function() {
await openGroupComparison(
`${CBIOPORTAL_URL}/study/summary?id=lgg_ucsf_2014_test_generic_assay&featureFlags=SURVIVAL_PLOT_EXTENDED`,
'chart-container-OS_STATUS',
100000
);
$('.tabAnchor_survival').click();
$('[data-test="ComparisonPageSurvivalTabDiv"]').waitForExist({
await clickElement('.tabAnchor_survival');
await getElement('[data-test="ComparisonPageSurvivalTabDiv"]', {
timeout: 20000,
});
});
it('Survival chart with landmark event and hazard ratio disabled', function() {
var res = browser.checkElement('div[data-test=SurvivalChart]');
it('Survival chart with landmark event and hazard ratio disabled', async () => {
const res = await browser.checkElement('div[data-test=SurvivalChart]');
assertScreenShotMatch(res);
});
it('Survival chart with landmark event at time point 20', function() {
setCheckboxChecked(true, 'input[data-test=landmarkLines]');
setInputText('input[data-test=landmarkValues]', '20');
var res = browser.checkElement('div[data-test=SurvivalChart]');
it('Survival chart with landmark event at time point 20', async () => {
await setCheckboxChecked(true, 'input[data-test=landmarkLines]');
await setInputText('input[data-test=landmarkValues]', '20');
await (await getElement('body')).moveTo({ xOffset: 0, yOffset: 0 });
const res = await browser.checkElement('div[data-test=SurvivalChart]');
assertScreenShotMatch(res);
});
it('Survival chart with hazard ratio table', function() {
setCheckboxChecked(false, 'input[data-test=landmarkLines]');
setCheckboxChecked(true, 'input[data-test=hazardRatioCheckbox]');
var res = browser.checkElement('div[data-test=survivalTabView]');
it('Survival chart with hazard ratio table', async () => {
await setCheckboxChecked(false, 'input[data-test=landmarkLines]');
await setCheckboxChecked(true, 'input[data-test=hazardRatioCheckbox]');
const res = await browser.checkElement(
'div[data-test=survivalTabView]'
);
assertScreenShotMatch(res);
});
it('Survival chart with hazard ratio table and landmark line', function() {
setCheckboxChecked(true, 'input[data-test=landmarkLines]');
setInputText('input[data-test=landmarkValues]', '20');
setCheckboxChecked(true, 'input[data-test=hazardRatioCheckbox]');
var res = browser.checkElement('div[data-test=survivalTabView]');
it('Survival chart with hazard ratio table and landmark line', async () => {
await setCheckboxChecked(true, 'input[data-test=landmarkLines]');
await setInputText('input[data-test=landmarkValues]', '20');
await setCheckboxChecked(true, 'input[data-test=hazardRatioCheckbox]');
const res = await browser.checkElement(
'div[data-test=survivalTabView]'
);
assertScreenShotMatch(res);
});
});
Loading