1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

1 Commits

Author SHA1 Message Date
lana-k
9cf7d0e5dc #128 fix save and close 2025-10-09 22:49:54 +02:00
2 changed files with 0 additions and 23 deletions

View File

@@ -217,16 +217,6 @@ export default {
} }
}) })
// Restore data:
// e.g. if we save predefined inquiry the tab will be created again
// (because of new id) and
// it will be without sql result and has default view - table.
// That's why we need to restore data and view
this.$nextTick(() => {
this.currentInquiryTab.result = dataSet
this.currentInquiryTab.view = tabView
})
// Hide dialogs // Hide dialogs
this.$modal.hide('save') this.$modal.hide('save')
this.$modal.hide('inquiry-conflict') this.$modal.hide('inquiry-conflict')

View File

@@ -1206,19 +1206,6 @@ describe('MainMenu.vue', () => {
// check that 'inquirySaved' event was triggered on eventBus // check that 'inquirySaved' event was triggered on eventBus
expect(eventBus.$emit.calledOnceWith('inquirySaved')).to.equal(true) expect(eventBus.$emit.calledOnceWith('inquirySaved')).to.equal(true)
// We saved predefined inquiry, so the tab will be created again
// (because of new id) and it will be without sql result and has default view - table.
// That's why we need to restore data and view.
// Check that result and view are preserved in the currentTab:
expect(state.currentTab.viewType).to.equal('chart')
expect(state.currentTab.result).to.eql({
columns: ['id', 'name'],
values: [
[1, 'Harry Potter'],
[2, 'Drako Malfoy']
]
})
}) })
it('Cancel saving', async () => { it('Cancel saving', async () => {