mirror of
https://github.com/lana-k/sqliteviz.git
synced 2026-03-22 05:56:16 +08:00
update run result test
This commit is contained in:
@@ -18,7 +18,6 @@ describe('RunResult.vue', () => {
|
|||||||
sinon.spy(window, 'alert')
|
sinon.spy(window, 'alert')
|
||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -54,7 +53,6 @@ describe('RunResult.vue', () => {
|
|||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -114,7 +112,6 @@ describe('RunResult.vue', () => {
|
|||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -154,7 +151,6 @@ describe('RunResult.vue', () => {
|
|||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -196,7 +192,6 @@ describe('RunResult.vue', () => {
|
|||||||
it('shows value of selected cell - result set', async () => {
|
it('shows value of selected cell - result set', async () => {
|
||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -250,9 +245,9 @@ describe('RunResult.vue', () => {
|
|||||||
|
|
||||||
// Click on 'bar' cell again
|
// Click on 'bar' cell again
|
||||||
await rows[1].findAll('td')[1].trigger('click')
|
await rows[1].findAll('td')[1].trigger('click')
|
||||||
expect(
|
expect(wrapper.find('.value-viewer').text()).to.equals(
|
||||||
wrapper.find('.value-viewer-container .table-preview').text()
|
'No cell selected to view'
|
||||||
).to.equals('No cell selected to view')
|
)
|
||||||
wrapper.unmount()
|
wrapper.unmount()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -260,7 +255,6 @@ describe('RunResult.vue', () => {
|
|||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
@@ -323,9 +317,9 @@ describe('RunResult.vue', () => {
|
|||||||
|
|
||||||
// Click on 'foo' cell again
|
// Click on 'foo' cell again
|
||||||
await rows[1].find('td').trigger('click')
|
await rows[1].find('td').trigger('click')
|
||||||
expect(
|
expect(wrapper.find('.value-viewer').text()).to.equals(
|
||||||
wrapper.find('.value-viewer-container .table-preview').text()
|
'No cell selected to view'
|
||||||
).to.equals('No cell selected to view')
|
)
|
||||||
wrapper.unmount()
|
wrapper.unmount()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -333,7 +327,6 @@ describe('RunResult.vue', () => {
|
|||||||
const wrapper = mount(RunResult, {
|
const wrapper = mount(RunResult, {
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
props: {
|
props: {
|
||||||
tab: { id: 1 },
|
|
||||||
result: {
|
result: {
|
||||||
columns: ['id', 'name'],
|
columns: ['id', 'name'],
|
||||||
values: {
|
values: {
|
||||||
|
|||||||
Reference in New Issue
Block a user