Skip to content

Commit

Permalink
Fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
airenzp authored and xzhou82 committed Feb 21, 2025
1 parent cf025f2 commit 8fa54f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/mass/test/sampleScatter.integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ tape('Invalid colorTW.term', async function (test) {
]
}
})
const errorbar = await detectGte({ elem: holder.node(), selector: '.sja_errorbar' })
const errorbar = await detectGte({ elem: holder.node(), selector: '.sja_errorbar > div:nth-child(2)' })
const error = 'Error: Error: Type is not defined [sampleScatter getPlotConfig()]'
test.true(errorbar[0].innerText.startsWith(error), `Should display, "${error}...".`)
} catch (e) {
Expand Down
6 changes: 3 additions & 3 deletions client/termdb/test/store.integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tape('init errors', function (test) {
}
})
function testMissingState(app) {
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div')
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div:nth-child(2)')
setTimeout(() => {
test.equal(d.text(), 'Error: .state{} missing', 'should be displayed for missing .state{}')
}, 200)
Expand All @@ -59,7 +59,7 @@ tape('init errors', function (test) {
}
})
function testMissingGenome(app) {
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div')
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div:nth-child(2)')
setTimeout(() => {
test.equal(d.text(), 'Error: .state[.vocab].genome missing', 'should be displayed for missing .state.genome')
}, 200)
Expand All @@ -78,7 +78,7 @@ tape('init errors', function (test) {
}
})
function testMissingDslabel(app) {
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div')
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div:nth-child(2)')
setTimeout(() => {
test.equal(d.text(), 'Error: .state[.vocab].dslabel missing', 'should be displayed for missing .state.dslabel')
test.end()
Expand Down
4 changes: 2 additions & 2 deletions client/termdb/test/tree.integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ tape('error handling', function (test) {
}
})
function testWrongGenome(app) {
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div')
const d = app.Inner.dom.errdiv.selectAll('.sja_errorbar').select('div:nth-child(2)')
test.equal(d.text(), 'Error: invalid genome', 'should show for invalid genome')
}

Expand All @@ -375,7 +375,7 @@ tape('error handling', function (test) {
}
})
function testWrongDslabel(app) {
const d = app.Inner.dom.errdiv.select('.sja_errorbar').select('div')
const d = app.Inner.dom.errdiv.select('.sja_errorbar').select('div:nth-child(2)')
test.equal(d.text(), 'Error: invalid dslabel', 'should show for genome-level termdb not available')
}
})
Expand Down

0 comments on commit 8fa54f6

Please sign in to comment.