-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(DragDrop): After cdk update to v17.3.7, tests fail with css parse error "Could not parse CSS stylesheet" #29053
Comments
This is likely the same root cause as primefaces/primereact#5156. |
@crisbeto Yeah, I just figured out that it's probably because of jsdom etc. And the fix for failing tests is to not fail them, if the error is just this stylesheet error -> jsdom/jsdom#2177 (comment) |
Ideally JSDom would be updated to account for |
Currently we load the reset styles for the preview up-front which seems to break some Jest tests since Jest's CSS parser does't understand layers. These changes switch to loading the styles only once dragging has started. Fixes angular#29053.
Currently we load the reset styles for the preview up-front which seems to break some Jest tests since Jest's CSS parser does't understand layers. These changes switch to loading the styles only once dragging has started. Fixes angular#29053.
Currently we load the reset styles for the preview up-front which seems to break some Jest tests since Jest's CSS parser does't understand layers. These changes switch to loading the styles only once dragging has started. Fixes #29053.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Is this a regression?
The previous version in which this bug was not present was
17.3.6
Description
After updating to version 17.3.7, a lot of our unit tests fails with error "Could not parse CSS stylesheet".
Tests are using jest and jest-preset-angular. Some of these units tests are almost same what cli generates. The components testing are using DragDropModule with table, where you can drag and drop table rows.
Reproduction
I'd like to include StackBlitz example, but that link creates Angular 16 app and I'm having hard to time updating it to Angular 17. I'm mainly getting errors about zone.js even when it's added to polyfills in angular.json. (That harness link creates Angular 10 repo)
But this bug manifest itself only in test setup (at least for now), so not sure if that Stackblitz would help.
I may be able to create whole repro repository later.
Expected Behavior
Tests should still pass after patch update.
Actual Behavior
Full stack trace:
Environment
Angular CLI: 17.3.7
Node: 20.12.2
Package Manager: npm 10.5.0
OS: darwin arm64
Angular: 17.3.8
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1703.7
@angular-devkit/build-angular 17.3.7
@angular-devkit/core 17.3.7
@angular-devkit/schematics 17.3.7
@angular/cdk 17.3.7
@angular/cdk-experimental 17.3.7
@angular/cli 17.3.7
@schematics/angular 17.3.7
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.5
The text was updated successfully, but these errors were encountered: