You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/12/09 08:49:03 UTC
[GitHub] [cloudstack] rohityadavcloud opened a new issue, #6963: UI unit tests broken on main
rohityadavcloud opened a new issue, #6963:
URL: https://github.com/apache/cloudstack/issues/6963
A few UI unit tests on main branch are failing:
```
> cd ui
> npm install
...passes...
> npm run lint
...passes...
> npm run test:unit
> cloudstack-ui@1.0.0 test:unit
> vue-cli-service test:unit
/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:240
expect(wrapper.emitted()['exec-action'][0]).toEqual([expected]);
^
TypeError: Caught error after test environment was torn down
Cannot read properties of undefined (reading '0')
at Object.<anonymous> (/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:260:48)
at runNextTicks (node:internal/process/task_queues:61:5)
at processImmediate (node:internal/timers:437:9)
PASS tests/unit/components/widgets/Status.spec.js (8.53s)
PASS tests/unit/views/compute/MigrateWizard.spec.js (9.147s)
/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:240
expect(wrapper.emitted()['exec-action'][0]).toEqual([expected]);
^
TypeError: Caught error after test environment was torn down
Cannot read properties of undefined (reading '0')
at Object.<anonymous> (/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:260:48)
at runNextTicks (node:internal/process/task_queues:61:5)
at processImmediate (node:internal/timers:437:9)
FAIL tests/unit/views/AutogenView.spec.js (11.774s)
● Console
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
console.warn node_modules/@intlify/shared/dist/shared.cjs.js:58
[intlify] Not found 'label.undefined' key in 'en' locale messages.
● Views > AutogenView.vue › Methods › execAction() › check currentAction params and paramsField when execAction() is called
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
Array [
Object {
- "name": "column1",
+ "name": "id",
"type": "string",
},
Object {
- "name": "column2",
+ "name": "name",
"type": "string",
},
Object {
- "name": "column3",
+ "name": "column1",
"type": "string",
},
Object {
- "name": "name",
+ "name": "column2",
"type": "string",
},
Object {
- "name": "id",
+ "name": "column3",
"type": "string",
},
]
1029 | await flushPromises()
1030 |
> 1031 | expect(wrapper.vm.currentAction.params).toEqual([
| ^
1032 | { name: 'column1', type: 'string' },
1033 | { name: 'column2', type: 'string' },
1034 | { name: 'column3', type: 'string' },
at Object.<anonymous> (tests/unit/views/AutogenView.spec.js:1031:49)
● Views > AutogenView.vue › Methods › execAction() › check currentAction params and paramsField when execAction() is called with args is function
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
Array [
Object {
- "name": "column1",
+ "name": "id",
"type": "string",
},
Object {
- "name": "column2",
+ "name": "name",
"type": "string",
},
Object {
- "name": "column3",
+ "name": "column1",
"type": "string",
},
Object {
- "name": "name",
+ "name": "column2",
"type": "string",
},
Object {
- "name": "id",
+ "name": "column3",
"type": "string",
},
]
1094 | await flushPromises()
1095 |
> 1096 | expect(wrapper.vm.currentAction.params).toEqual([
| ^
1097 | { name: 'column1', type: 'string' },
1098 | { name: 'column2', type: 'string' },
1099 | { name: 'column3', type: 'string' },
at Object.<anonymous> (tests/unit/views/AutogenView.spec.js:1096:49)
● Views > AutogenView.vue › Methods › changeFilter() › check `route.query` when changeFilter() is called with $route.name equal `guestnetwork`
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
Object {
"filter": "filter",
+ "networkfilter": "filter",
"page": "1",
"pagesize": "20",
- "type": "filter",
}
1820 |
1821 | expect(router.currentRoute.value.path).toEqual('/guestnetwork')
> 1822 | expect(router.currentRoute.value.query).toEqual({
| ^
1823 | filter: 'filter',
1824 | type: 'filter',
1825 | page: '1',
at Object.<anonymous> (tests/unit/views/AutogenView.spec.js:1822:49)
/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:240
expect(wrapper.emitted()['exec-action'][0]).toEqual([expected]);
^
TypeError: Caught error after test environment was torn down
Cannot read properties of undefined (reading '0')
at Object.<anonymous> (/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:260:48)
at runNextTicks (node:internal/process/task_queues:61:5)
at processImmediate (node:internal/timers:437:9)
/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:240
expect(wrapper.emitted()['exec-action'][0]).toEqual([expected]);
^
TypeError: Caught error after test environment was torn down
Cannot read properties of undefined (reading '0')
at Object.<anonymous> (/Users/rohit/lab/apache/cloudstack/ui/tests/unit/components/view/ActionButton.spec.js:260:48)
at runNextTicks (node:internal/process/task_queues:61:5)
at processImmediate (node:internal/timers:437:9)
FAIL tests/unit/components/view/ActionButton.spec.js
● Test suite failed to run
Call retries were exceeded
at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
=============================== Coverage summary ===============================
Statements : 5.59% ( 1345/24082 )
Branches : 4.79% ( 641/13373 )
Functions : 2.49% ( 182/7308 )
Lines : 5.69% ( 1330/23372 )
================================================================================
Test Suites: 2 failed, 2 passed, 4 total
Tests: 3 failed, 162 passed, 165 total
Snapshots: 0 total
Time: 107.721s
Ran all test suites.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on issue #6963: UI unit tests broken on main
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #6963:
URL: https://github.com/apache/cloudstack/issues/6963#issuecomment-1365771236
@rohityadavcloud please test #7012 and advise on any extra steps to be taken.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on issue #6963: UI unit tests broken on main
Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on issue #6963:
URL: https://github.com/apache/cloudstack/issues/6963#issuecomment-1367216533
@DaanHoogland I just checked looks like Wei has fixed it and had his PR merged.
Closed by https://github.com/apache/cloudstack/pull/7030
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud closed issue #6963: UI unit tests broken on main
Posted by GitBox <gi...@apache.org>.
rohityadavcloud closed issue #6963: UI unit tests broken on main
URL: https://github.com/apache/cloudstack/issues/6963
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org