Skip to content

Commit ba43825

Browse files
author
Hoang Nguyen
authored
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
1 parent e13363e commit ba43825

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

ui/tests/unit/views/AutogenView.spec.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,11 +1078,11 @@ describe('Views > AutogenView.vue', () => {
10781078
})
10791079

10801080
expect(wrapper.vm.currentAction.params).toEqual([
1081-
{ name: 'id', type: 'string' },
1082-
{ name: 'name', type: 'string' },
10831081
{ name: 'column1', type: 'string' },
10841082
{ name: 'column2', type: 'string' },
1085-
{ name: 'column3', type: 'string' }
1083+
{ name: 'column3', type: 'string' },
1084+
{ name: 'name', type: 'string' },
1085+
{ name: 'id', type: 'string' }
10861086
])
10871087
expect(wrapper.vm.currentAction.paramFields).toEqual([])
10881088
expect(wrapper.vm.showAction).toBeTruthy()
@@ -1127,11 +1127,11 @@ describe('Views > AutogenView.vue', () => {
11271127
})
11281128

11291129
expect(wrapper.vm.currentAction.params).toEqual([
1130-
{ name: 'id', type: 'string' },
1131-
{ name: 'name', type: 'string' },
11321130
{ name: 'column1', type: 'string' },
11331131
{ name: 'column2', type: 'string' },
1134-
{ name: 'column3', type: 'string' }
1132+
{ name: 'column3', type: 'string' },
1133+
{ name: 'name', type: 'string' },
1134+
{ name: 'id', type: 'string' }
11351135
])
11361136
expect(wrapper.vm.currentAction.paramFields).toEqual([
11371137
{ name: 'id', type: 'string' },
@@ -2141,7 +2141,6 @@ describe('Views > AutogenView.vue', () => {
21412141
{ name: 'id', type: 'uuid' }
21422142
],
21432143
paramFields: [
2144-
{ name: 'id', type: 'uuid', description: '', required: false }
21452144
],
21462145
mapping: {}
21472146
},
@@ -2191,8 +2190,7 @@ describe('Views > AutogenView.vue', () => {
21912190
{ name: 'id', type: 'uuid' }
21922191
],
21932192
paramFields: [
2194-
{ name: 'name', type: 'string', description: '', required: false },
2195-
{ name: 'id', type: 'uuid', description: '', required: false }
2193+
{ name: 'name', type: 'string', description: '', required: false }
21962194
],
21972195
mapping: {}
21982196
},
@@ -2259,6 +2257,7 @@ describe('Views > AutogenView.vue', () => {
22592257
spyConsole.log = jest.spyOn(console, 'log').mockImplementation(() => {})
22602258

22612259
wrapper.vm.$nextTick(() => {
2260+
wrapper.vm.form.getFieldDecorator('column1', { initialValue: null })
22622261
const event = document.createEvent('Event')
22632262
wrapper.vm.execSubmit(event)
22642263

0 commit comments

Comments
 (0)