mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: Fix npm unit test failures in 4.15 (#4718)
* Edit the test to match the latest code * fix travis build failures * correct wrong comparison conditions * fix travis build
This commit is contained in:
parent
e13363ed76
commit
ba43825a9b
@ -1078,11 +1078,11 @@ describe('Views > AutogenView.vue', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
expect(wrapper.vm.currentAction.params).toEqual([
|
expect(wrapper.vm.currentAction.params).toEqual([
|
||||||
{ name: 'id', type: 'string' },
|
|
||||||
{ name: 'name', type: 'string' },
|
|
||||||
{ name: 'column1', type: 'string' },
|
{ name: 'column1', type: 'string' },
|
||||||
{ name: 'column2', type: 'string' },
|
{ name: 'column2', type: 'string' },
|
||||||
{ name: 'column3', type: 'string' }
|
{ name: 'column3', type: 'string' },
|
||||||
|
{ name: 'name', type: 'string' },
|
||||||
|
{ name: 'id', type: 'string' }
|
||||||
])
|
])
|
||||||
expect(wrapper.vm.currentAction.paramFields).toEqual([])
|
expect(wrapper.vm.currentAction.paramFields).toEqual([])
|
||||||
expect(wrapper.vm.showAction).toBeTruthy()
|
expect(wrapper.vm.showAction).toBeTruthy()
|
||||||
@ -1127,11 +1127,11 @@ describe('Views > AutogenView.vue', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
expect(wrapper.vm.currentAction.params).toEqual([
|
expect(wrapper.vm.currentAction.params).toEqual([
|
||||||
{ name: 'id', type: 'string' },
|
|
||||||
{ name: 'name', type: 'string' },
|
|
||||||
{ name: 'column1', type: 'string' },
|
{ name: 'column1', type: 'string' },
|
||||||
{ name: 'column2', type: 'string' },
|
{ name: 'column2', type: 'string' },
|
||||||
{ name: 'column3', type: 'string' }
|
{ name: 'column3', type: 'string' },
|
||||||
|
{ name: 'name', type: 'string' },
|
||||||
|
{ name: 'id', type: 'string' }
|
||||||
])
|
])
|
||||||
expect(wrapper.vm.currentAction.paramFields).toEqual([
|
expect(wrapper.vm.currentAction.paramFields).toEqual([
|
||||||
{ name: 'id', type: 'string' },
|
{ name: 'id', type: 'string' },
|
||||||
@ -2141,7 +2141,6 @@ describe('Views > AutogenView.vue', () => {
|
|||||||
{ name: 'id', type: 'uuid' }
|
{ name: 'id', type: 'uuid' }
|
||||||
],
|
],
|
||||||
paramFields: [
|
paramFields: [
|
||||||
{ name: 'id', type: 'uuid', description: '', required: false }
|
|
||||||
],
|
],
|
||||||
mapping: {}
|
mapping: {}
|
||||||
},
|
},
|
||||||
@ -2191,8 +2190,7 @@ describe('Views > AutogenView.vue', () => {
|
|||||||
{ name: 'id', type: 'uuid' }
|
{ name: 'id', type: 'uuid' }
|
||||||
],
|
],
|
||||||
paramFields: [
|
paramFields: [
|
||||||
{ name: 'name', type: 'string', description: '', required: false },
|
{ name: 'name', type: 'string', description: '', required: false }
|
||||||
{ name: 'id', type: 'uuid', description: '', required: false }
|
|
||||||
],
|
],
|
||||||
mapping: {}
|
mapping: {}
|
||||||
},
|
},
|
||||||
@ -2259,6 +2257,7 @@ describe('Views > AutogenView.vue', () => {
|
|||||||
spyConsole.log = jest.spyOn(console, 'log').mockImplementation(() => {})
|
spyConsole.log = jest.spyOn(console, 'log').mockImplementation(() => {})
|
||||||
|
|
||||||
wrapper.vm.$nextTick(() => {
|
wrapper.vm.$nextTick(() => {
|
||||||
|
wrapper.vm.form.getFieldDecorator('column1', { initialValue: null })
|
||||||
const event = document.createEvent('Event')
|
const event = document.createEvent('Event')
|
||||||
wrapper.vm.execSubmit(event)
|
wrapper.vm.execSubmit(event)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user