mirror of
https://github.com/lana-k/sqliteviz.git
synced 2026-03-24 23:16:18 +08:00
tests
This commit is contained in:
@@ -195,6 +195,11 @@ describe('DataView.vue', () => {
|
||||
const graphBtn = wrapper.findComponent({ ref: 'graphBtn' })
|
||||
await graphBtn.trigger('click')
|
||||
|
||||
// Save as png is disabled because there is no data
|
||||
expect(pngBtn.attributes('disabled')).to.not.equal(undefined)
|
||||
|
||||
await wrapper.setProps({ dataSource: { doc: [] } })
|
||||
|
||||
// Find graph and stub the method
|
||||
const graph = wrapper.findComponent({ name: 'graph' }).vm
|
||||
sinon.stub(graph, 'saveAsPng').callsFake(() => {
|
||||
|
||||
Reference in New Issue
Block a user