You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/02/24 09:10:18 UTC
[cloudstack] branch 4.15 updated: ui: Fix npm unit test failures in
4.15 (#4718)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new ba43825 ui: Fix npm unit test failures in 4.15 (#4718)
ba43825 is described below
commit ba43825a9b598d12e41c4b5f5927b63c109b621b
Author: Hoang Nguyen <ho...@unitech.vn>
AuthorDate: Wed Feb 24 16:09:55 2021 +0700
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
---
ui/tests/unit/views/AutogenView.spec.js | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/ui/tests/unit/views/AutogenView.spec.js b/ui/tests/unit/views/AutogenView.spec.js
index fbae93c..8823894 100644
--- a/ui/tests/unit/views/AutogenView.spec.js
+++ b/ui/tests/unit/views/AutogenView.spec.js
@@ -1078,11 +1078,11 @@ describe('Views > AutogenView.vue', () => {
})
expect(wrapper.vm.currentAction.params).toEqual([
- { name: 'id', type: 'string' },
- { name: 'name', type: 'string' },
{ name: 'column1', 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.showAction).toBeTruthy()
@@ -1127,11 +1127,11 @@ describe('Views > AutogenView.vue', () => {
})
expect(wrapper.vm.currentAction.params).toEqual([
- { name: 'id', type: 'string' },
- { name: 'name', type: 'string' },
{ name: 'column1', 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([
{ name: 'id', type: 'string' },
@@ -2141,7 +2141,6 @@ describe('Views > AutogenView.vue', () => {
{ name: 'id', type: 'uuid' }
],
paramFields: [
- { name: 'id', type: 'uuid', description: '', required: false }
],
mapping: {}
},
@@ -2191,8 +2190,7 @@ describe('Views > AutogenView.vue', () => {
{ name: 'id', type: 'uuid' }
],
paramFields: [
- { name: 'name', type: 'string', description: '', required: false },
- { name: 'id', type: 'uuid', description: '', required: false }
+ { name: 'name', type: 'string', description: '', required: false }
],
mapping: {}
},
@@ -2259,6 +2257,7 @@ describe('Views > AutogenView.vue', () => {
spyConsole.log = jest.spyOn(console, 'log').mockImplementation(() => {})
wrapper.vm.$nextTick(() => {
+ wrapper.vm.form.getFieldDecorator('column1', { initialValue: null })
const event = document.createEvent('Event')
wrapper.vm.execSubmit(event)