diff --git a/client/mass/test/nav.integration.spec.js b/client/mass/test/nav.integration.spec.js index d7dcc1472d..9c556037d1 100644 --- a/client/mass/test/nav.integration.spec.js +++ b/client/mass/test/nav.integration.spec.js @@ -61,82 +61,6 @@ tape('default hidden tabs, no filter', function (test) { } }) -tape('chart buttons', function (test) { - test.timeoutAfter(3000) - runpp({ - state: { - activeCohort: 0, - nav: { - header_mode: 'with_tabs' - } - }, - nav: { - callbacks: { - 'postRender.test': runTests - } - } - }) - async function runTests(nav) { - for (const btn of nav.Inner.components.charts.Inner.dom.btns._groups[0]) { - // btn is native dom element, not d3-wrapped - if (btn.style.display == 'none') { - // hidden button means the chart is not supported in termdbtest - continue - } - /* chart button is visible - evaluate what happens after clicking it, based on the innerHTML of each button; - if a chart name is customized in termdbtest, the test must be updated here - - must not trigger click before all if(), this will cause all previous temporary menu items to disappear - */ - switch (btn.innerHTML) { - case 'Data Dictionary': - btn.dispatchEvent(new Event('click')) - await detectOne({ - elem: nav.Inner.app.Inner.dom.plotDiv.node(), - selector: '[data-testid=sjpp-massplot-sandbox-dictionary]' - }) - test.pass('found sandbox after clicking chart button: ' + btn.innerHTML) - break - case 'Sample View': - btn.dispatchEvent(new Event('click')) - await detectOne({ - elem: nav.Inner.app.Inner.dom.plotDiv.node(), - selector: '[data-testid=sjpp-massplot-sandbox-sampleView]' - }) - test.pass('found sandbox after clicking chart button: ' + btn.innerHTML) - break - case 'Data Download': - btn.dispatchEvent(new Event('click')) - await detectOne({ - elem: nav.Inner.app.Inner.dom.plotDiv.node(), - selector: '[data-testid=sjpp-massplot-sandbox-dataDownload]' - }) - test.pass('found sandbox after clicking chart button: ' + btn.innerHTML) - break - case 'Summary Plots': - case 'Scatter Plot': - case 'Cumulative Incidence': - case 'Survival': - case 'Regression Analysis': - case 'Sample Matrix': - case 'Genome Browser': - case 'Facet Table': - case 'Gene Expression': - btn.dispatchEvent(new Event('click')) - await whenVisible(nav.Inner.components.charts.Inner.dom.tip.d.node()) - test.pass('charts.dom.tip is shown after clicking chart button: ' + btn.innerHTML) - nav.Inner.components.charts.Inner.dom.tip.hide() - break - default: - test.fail('TODO: need test cover for chart button', btn.innerHTML) - } - } - if (test._ok) nav.Inner.app.destroy() - test.end() - } -}) - tape('filter subheader and tab', function (test) { test.timeoutAfter(3000) runpp({