mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
Compare commits
2 Commits
2c2bb7d6d3
...
0.27.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b59c21c14e | ||
|
|
4ed4b54a28 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "sqliteviz",
|
"name": "sqliteviz",
|
||||||
"version": "0.26.0",
|
"version": "0.27.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sqliteviz",
|
"name": "sqliteviz",
|
||||||
"version": "0.26.0",
|
"version": "0.27.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
:clickToClose="false"
|
:clickToClose="false"
|
||||||
:contentTransition="{ name: 'loading-dialog' }"
|
:contentTransition="{ name: 'loading-dialog' }"
|
||||||
:overlayTransition="{ name: 'loading-dialog' }"
|
:overlayTransition="{ name: 'loading-dialog' }"
|
||||||
@update:modelValue="$emit('update:modelValue', $event)"
|
@update:model-value="$emit('update:modelValue', $event)"
|
||||||
>
|
>
|
||||||
<div class="dialog-header">
|
<div class="dialog-header">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
@@ -60,12 +60,12 @@ export default {
|
|||||||
title: String,
|
title: String,
|
||||||
loading: Boolean
|
loading: Boolean
|
||||||
},
|
},
|
||||||
|
emits: ['cancel', 'action', 'update:modelValue'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: this.modelValue
|
show: this.modelValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ['cancel', 'action', 'update:modelValue'],
|
|
||||||
watch: {
|
watch: {
|
||||||
modelValue() {
|
modelValue() {
|
||||||
this.show = this.modelValue
|
this.show = this.modelValue
|
||||||
|
|||||||
@@ -608,8 +608,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Overwrite')
|
.find(button => button.text() === 'Overwrite')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
@@ -694,8 +692,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Save')
|
.find(button => button.text() === 'Save')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
@@ -725,8 +721,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Overwrite')
|
.find(button => button.text() === 'Overwrite')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
@@ -794,24 +788,29 @@ describe('MainMenu.vue', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await wrapper.find('#save-btn').trigger('click')
|
await wrapper.find('#save-btn').trigger('click')
|
||||||
|
|
||||||
// check that the conflict dialog is open
|
// check that the conflict dialog is open
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(true)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(true)
|
||||||
expect(wrapper.find('.dialog.vfm .dialog-header').text()).to.contain(
|
expect(wrapper.find('.dialog.vfm .dialog-header').text()).to.contain(
|
||||||
'Inquiry saving conflict'
|
'Inquiry saving conflict'
|
||||||
)
|
)
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
await clock.tick(100)
|
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
|
// find "Save as new" in the dialog and click
|
||||||
|
|
||||||
await wrapper
|
await wrapper
|
||||||
.findAll('.dialog-buttons-container button')
|
.findAll('.dialog-buttons-container button')
|
||||||
.find(button => button.text() === 'Save as new')
|
.find(button => button.text() === 'Save as new')
|
||||||
.trigger('click')
|
.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
|
// enter the new name
|
||||||
await wrapper.find('.dialog-body input').setValue('foo_new')
|
await wrapper.find('.dialog-body input').setValue('foo_new')
|
||||||
|
|
||||||
@@ -821,7 +820,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Save')
|
.find(button => button.text() === 'Save')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
@@ -1062,8 +1060,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Save')
|
.find(button => button.text() === 'Save')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
@@ -1172,8 +1168,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Save')
|
.find(button => button.text() === 'Save')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
@@ -1351,8 +1345,6 @@ describe('MainMenu.vue', () => {
|
|||||||
.find(button => button.text() === 'Save')
|
.find(button => button.text() === 'Save')
|
||||||
.trigger('click')
|
.trigger('click')
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// check that the dialog is closed
|
// check that the dialog is closed
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm').exists()).to.equal(false)
|
||||||
|
|||||||
@@ -228,7 +228,6 @@ describe('DataView.vue', () => {
|
|||||||
// Wait untill prepareCopy is finished
|
// Wait untill prepareCopy is finished
|
||||||
await wrapper.vm.$refs.viewComponent.prepareCopy.returnValues[0]
|
await wrapper.vm.$refs.viewComponent.prepareCopy.returnValues[0]
|
||||||
|
|
||||||
await nextTick()
|
|
||||||
// The dialog is not shown...
|
// The dialog is not shown...
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
expect(wrapper.find('.dialog.vfm .vfm__content').exists()).to.equal(false)
|
expect(wrapper.find('.dialog.vfm .vfm__content').exists()).to.equal(false)
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ describe('RunResult.vue', () => {
|
|||||||
|
|
||||||
// Switch to microtasks (let serialize run)
|
// Switch to microtasks (let serialize run)
|
||||||
await clock.tick(0)
|
await clock.tick(0)
|
||||||
await nextTick()
|
|
||||||
|
|
||||||
// The dialog is not shown...
|
// The dialog is not shown...
|
||||||
await clock.tick(100)
|
await clock.tick(100)
|
||||||
|
|||||||
Reference in New Issue
Block a user