Skip to content

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

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

feat(expect): support pseudo-element in toHaveCSS#40092
JustasMonkev wants to merge 4 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

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:459 › should not preserve selection across test runs @macos-latest-node20

10 flaky ⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:724 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:481 › screencast › should capture static page in persistent context @smoke `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:687 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:687 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@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`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@ubuntu-latest-node24`

39186 passed, 846 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

6468 passed, 383 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