Skip to content

Commit

Permalink
delete nonfunctional nav test
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhou82 authored and creilly8 committed Jan 15, 2025
1 parent c820370 commit 4a36a6c
Showing 1 changed file with 0 additions and 76 deletions.
76 changes: 0 additions & 76 deletions client/mass/test/nav.integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 4a36a6c

Please sign in to comment.