Skip to content

feat(expect): support pseudo-element in toHaveCSS#40092

Open
JustasMonkev wants to merge 3 commits intomicrosoft:mainfrom
JustasMonkev:feat/to-have-css-pseudo-element-39873
Open

feat(expect): support pseudo-element in toHaveCSS#40092
JustasMonkev wants to merge 3 commits intomicrosoft:mainfrom
JustasMonkev:feat/to-have-css-pseudo-element-39873

Conversation

@JustasMonkev
Copy link
Copy Markdown
Contributor

This adds a pseudoElement option to toHaveCSS so users can assert computed styles for pseudo-elements such as ::before and ::after.

Fixes #39873.

@JustasMonkev
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

The string literal union <"before"|"after"> requires a named type
wrapper for the doc parser. Changed to <[PseudoElement]<"before"|"after">>.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Test results for "MCP"

1 failed
❌ [chromium] › mcp/dashboard.spec.ts:34 › should show devtools sidebar @mcp-macos-latest

6441 passed, 383 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Test results for "tests 1"

8 flaky ⚠️ [chromium-library] › library/video.spec.ts:724 › screencast › should work with video+trace `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:724 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:687 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/browsercontext-add-cookies.spec.ts:426 › should allow unnamed cookies `@webkit-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:700 › should indicate current test status `@macos-latest-node20`

39168 passed, 846 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants