Closed
Description
A test that has been passing for months, with many different versions of Angular and Angular CLI, fails every time it's run afer an upgrade from cli 6.0.7 and devkit 0.6.7 to cli 6.0.8 and devkit 0.6.8, for a reason that I can't explain.
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Area
- [x] devkit
- [ ] schematics
Versions
Node v8.11.1
NPM 6.0.0
Yarn 1.6.0
macOS High Sierra 10.13.4 (17E202)
Repro steps
Here's a link to our repo where the problem happens: https://github.com/Ninja-Squad/globe42.git
Repro steps:
git clone https://github.com/Ninja-Squad/globe42.git
cd globe42/frontend
git checkout cli-test-regression-before
yarn
ng test
--> all tests passgit checkout cli-test-regression-after
: the only difference with the before branch is the versions of the CLI and the devkit, in package.json and yarn.lockyarn
ng test
--> one test fails, for a reason that I can't explain
The log given by the failure
HeadlessChrome 0.0.0 (Mac OS X 10.13.4) TasksPageComponent should navigate to other page when clicking page FAILED
Expected spy navigate to have been called with [ [ '.' ], Object({ relativeTo: Object({ data: Observable({ _isScalar: true, _subscribe: Function, value: Object({ taskListType: 'todo', tasks: Object({ content: [ Object({ id: 0, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }), Object({ id: 1, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }), Object({ id: 2, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }) ], number: 0, size: 3, totalElements: 8, totalPages: 3 }) }) }), parent: Object({ snapshot: Object({ data: Object({ }) }) }) }), queryParams: Object({ page: '1' }) }) ] but it was never called.
at http://localhost:9876/_karma_webpack_/webpack:/src/app/tasks-page/tasks-page.component.spec.ts:143:31
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
at AsyncTestZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.AsyncTestZoneSpec.onInvoke node_modules/zone.js/dist/zone-testing.js:713:1)
at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke node_modules/zone.js/distHeadlessChrome 0.0.0 (Mac OS X 10.13.4) TasksPageComponent should navigate to other page when clicking page FAILED
Expected spy navigate to have been called with [ [ '.' ], Object({ relativeTo: Object({ data: Observable({ _isScalar: true, _subscribe: Function, value: Object({ taskListType: 'todo', tasks: Object({ content: [ Object({ id: 0, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }), Object({ id: 1, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }), Object({ id: 2, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }) ], number: 0, size: 3, totalElements: 8, totalPages: 3 }) }) }), parent: Object({ snapshot: Object({ data: Object({ }) }) }) }), queryParams: Object({ page: '1' }) }) ] but it was never called.
at http://localhost:9876/_karma_webpack_/webpack:/src/app/tasks-page/tasks-page.component.spec.ts:143:31
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
at AsyncTestZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.AsyncTestZoneSpec.onInvoke node_modules/zone.js/dist/zone-testing.js:713:1)
at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke node_modules/zone.js/dist/zone-testing.js:285:1)
HeadlessChrome 0.0.0 (Mac OS X 10.13.4): Executed 394 of 465 (1 FAILED) (0 secs / 28.893 secs)
HeadlessChrome 0.0.0 (Mac OS X 10.13.4) TasksPageComponent should navigate to other page when clicking page FAILED
Expected spy navigate to have been called with [ [ '.' ], Object({ relativeTo: Object({ data: Observable({ _isScalar: true, _subscribe: Function, value: Object({ taskListType: 'todo', tasks: Object({ content: [ Object({ id: 0, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }), Object({ id: 1, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }), Object({ id: 2, description: 'Some description', title: 'Some title', category: Object, dueDate: '2017-08-01', status: 'DONE', totalSpentTimeInMinutes: 0, assignee: null, creator: Object, concernedPerson: null }) ], number: 0, size: 3, totalElements: 8, totalPages: 3 }) }) }), parent: Object({ snapshot: Object({ data: Object({ }) }) }) }), queryParams: Object({ page: '1' }) }) ] but it was never called.
at http://localhost:9876/_karma_webpack_/webpack:/src/app/tasks-page/tasks-page.component.spec.ts:143:31
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
at AsyncTestZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.AsyncTestZoneSpec.onInvoke node_modules/zone.js/dist/zone-testing.js:713:1)
at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke node_modules/zone.js/distHeadlessChrome 0.0.0 (Mac OS X 10.13.4): Executed 465 of 465 (1 FAILED) (35.172 secs / 34.964 secs)
Desired functionality
The test seems correct, and has always passed with previous versions. Upgrading the CLI shouldn't make it fail.