diff --git a/package-lock.json b/package-lock.json index b264a2d..7d179d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sqliteviz", - "version": "0.26.0", + "version": "0.27.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sqliteviz", - "version": "0.26.0", + "version": "0.27.1", "license": "Apache-2.0", "dependencies": { "buffer": "^6.0.3", diff --git a/tests/views/MainView/MainMenu.spec.js b/tests/views/MainView/MainMenu.spec.js index fd71637..81cbd1c 100644 --- a/tests/views/MainView/MainMenu.spec.js +++ b/tests/views/MainView/MainMenu.spec.js @@ -608,8 +608,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Overwrite') .trigger('click') - await nextTick() - // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) @@ -694,8 +692,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Save') .trigger('click') - await nextTick() - // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) @@ -725,8 +721,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Overwrite') .trigger('click') - await nextTick() - // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) @@ -794,24 +788,29 @@ describe('MainMenu.vue', () => { }) await wrapper.find('#save-btn').trigger('click') - // check that the conflict dialog is open expect(wrapper.find('.dialog.vfm').exists()).to.equal(true) expect(wrapper.find('.dialog.vfm .dialog-header').text()).to.contain( 'Inquiry saving conflict' ) - await nextTick() await clock.tick(100) - // check that only one dialog open - expect(wrapper.findAll('.dialog.vfm').length).to.equal(1) // find "Save as new" in the dialog and click + await wrapper .findAll('.dialog-buttons-container button') .find(button => button.text() === 'Save as new') .trigger('click') + // Hiding any dialog is done with tiny animation. Give time to finish it: + await clock.tick(100) + // Note: don't call nextTick before clock.tick. That leads to extra trap in + // trapStack and the test fails with focus-trap error in afterEach hook + // when unmount the component + + // check that only one dialog open + expect(wrapper.findAll('.dialog.vfm').length).to.equal(1) // enter the new name await wrapper.find('.dialog-body input').setValue('foo_new') @@ -821,7 +820,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Save') .trigger('click') - await nextTick() // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) @@ -1062,8 +1060,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Save') .trigger('click') - await nextTick() - // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) @@ -1172,8 +1168,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Save') .trigger('click') - await nextTick() - // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) @@ -1351,8 +1345,6 @@ describe('MainMenu.vue', () => { .find(button => button.text() === 'Save') .trigger('click') - await nextTick() - // check that the dialog is closed await clock.tick(100) expect(wrapper.find('.dialog.vfm').exists()).to.equal(false) diff --git a/tests/views/MainView/Workspace/Tabs/Tab/DataView/DataView.spec.js b/tests/views/MainView/Workspace/Tabs/Tab/DataView/DataView.spec.js index 49625c7..1808d2b 100644 --- a/tests/views/MainView/Workspace/Tabs/Tab/DataView/DataView.spec.js +++ b/tests/views/MainView/Workspace/Tabs/Tab/DataView/DataView.spec.js @@ -228,7 +228,6 @@ describe('DataView.vue', () => { // Wait untill prepareCopy is finished await wrapper.vm.$refs.viewComponent.prepareCopy.returnValues[0] - await nextTick() // The dialog is not shown... await clock.tick(100) expect(wrapper.find('.dialog.vfm .vfm__content').exists()).to.equal(false) diff --git a/tests/views/MainView/Workspace/Tabs/Tab/RunResult/RunResult.spec.js b/tests/views/MainView/Workspace/Tabs/Tab/RunResult/RunResult.spec.js index 0ae9c8a..956cf4f 100644 --- a/tests/views/MainView/Workspace/Tabs/Tab/RunResult/RunResult.spec.js +++ b/tests/views/MainView/Workspace/Tabs/Tab/RunResult/RunResult.spec.js @@ -139,7 +139,6 @@ describe('RunResult.vue', () => { // Switch to microtasks (let serialize run) await clock.tick(0) - await nextTick() // The dialog is not shown... await clock.tick(100)