Closed SalahAdDin closed 4 months ago
Thank you for reporting @SalahAdDin! :slightly_smiling_face:
The error throws seem to be that Window.getComputedStyle()
parses the CSS on the page, and somewhere there is an invalid :not
selector that it fails to parse. Window.getComputedStyle()
should not throw errors for invalid selectors, so I have added support for ignoring errors when parsing the CSS, which should solve the problem for you.
You can read more about the release here: https://github.com/capricorn86/happy-dom/releases/tag/v14.3.4
Thank you for reporting @SalahAdDin! 🙂
The error throws seem to be that
Window.getComputedStyle()
parses the CSS on the page, and somewhere there is an invalid:not
selector that it fails to parse.Window.getComputedStyle()
should not throw errors for invalid selectors, so I have added support for ignoring errors when parsing the CSS, which should solve the problem for you.You can read more about the release here: https://github.com/capricorn86/happy-dom/releases/tag/v14.3.4
It sounds good, but:
✓ src/app/[locale]/[category]/[article]/_components/ContinueReadingArticleCard/ContinueReadingArticleCard.test.tsx (0)
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL src/app/_components/visuals/StreamingStatusIndicator/StreamingStatusIndicator.test.tsx > streamingStatusIndicator > should render a single animated online indicator when rendering
FAIL src/app/_components/visuals/StreamingStatusIndicator/StreamingStatusIndicator.test.tsx > streamingStatusIndicator > should render a double animated offline indicator when rendering
FAIL src/app/_components/visuals/StreamingStatusIndicator/StreamingStatusIndicator.test.tsx > streamingStatusIndicator > should render a single paused indicator when rendering
FAIL src/app/_components/visuals/StreamingStatusIndicator/StreamingStatusIndicator.test.tsx > streamingStatusIndicator > should render a double indicator when rendering
TypeError: pseudo.selectorItems is not iterable
❯ SelectorItem.matchPseudoItem node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/SelectorItem.ts:285:39
❯ SelectorItem.matchPseudo node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/SelectorItem.ts:171:31
❯ SelectorItem.match node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/SelectorItem.ts:105:24
❯ SelectorItem.matchPseudoItem node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/SelectorItem.ts:294:23
❯ SelectorItem.matchPseudo node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/SelectorItem.ts:171:31
❯ SelectorItem.match node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/SelectorItem.ts:105:24
❯ Function.matchSelector node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/QuerySelector.ts:258:31
❯ Function.matches node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/query-selector/QuerySelector.ts:232:24
❯ CSSStyleDeclarationElementStyle.parseCSSRules node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/css/declaration/element-style/CSSStyleDeclarationElementStyle.ts:331:36
❯ CSSStyleDeclarationElementStyle.getComputedElementStyle node_modules/.pnpm/happy-dom@14.3.6/node_modules/happy-dom/src/css/declaration/element-style/CSSStyleDeclarationElementStyle.ts:133:12
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/4]⎯
Test Files 1 failed | 28 passed (29)
Tests 4 failed (4)
Start at 10:29:18
Duration 13.37s (transform 1.92s, setup 77.56s, collect 2.92s, tests 667ms, environment 45.63s, prepare 23.47s)
ELIFECYCLE Test failed. See above for more details.
husky - pre-push script failed (code 1)
error: failed to push some refs to 'github.com:trt-digital/global-webFE.git'
@capricorn86 Should I open a new issue?
@SalahAdDin this problem should also be fixed now :slightly_smiling_face:
https://github.com/capricorn86/happy-dom/releases/tag/v14.3.8
@SalahAdDin this problem should also be fixed now 🙂
https://github.com/capricorn86/happy-dom/releases/tag/v14.3.8
And yeah, finally it is fixed.
Tesekkur ederim
Describe the bug After updating the
happy-dom
version to the latest one, we are getting the following error:It happens for the following code:
Only this file has that matcher:![image](https://github.com/capricorn86/happy-dom/assets/5034215/8d2c03d8-4a47-4ab5-a8e8-c7bbb6ab79a4)
And the component does not include any
:not
pseudo-element:We updated from 13 to 14 version:![image](https://github.com/capricorn86/happy-dom/assets/5034215/30450822-bf03-4c6d-bff5-9d483a1687f7)
To Reproduce Steps to reproduce the behavior:
not.toMatch
query on any element.happy-dom
version.Expected behavior It should not give any issue.
Screenshots If applicable, add screenshots to help explain your problem.
Device:
Additional context We checked it with all versions from 14 to 14.3.2 and it seems it is broken from the 14.2.0 where some pseudo selectors where introduced.
There is also a typo error in
SelectorItem.matchPsuedo
.