-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
open-to-a-pull-requestThe feature request looks good, we are open to reviewing a PRThe feature request looks good, we are open to reviewing a PR
Description
🚀 Feature Request
Similar to text/value assertion, it will be helpful to have css assertions for UI elements specially for properties like background-color, font style and font size. Can be extended to other css properties if needed.
Example
Assertion for any element font and background color like below can be helpful in validating css properties.
await expect(page.locator('#next')).toHaveCSS('background-color', 'rgb(255, 227, 230)');
await expect(page.locator('#next')).toHaveCSS('font-style', '600 18px / 24px OpenSans, "Segoe UI", SegoeUI, "Helvetica Neue", Helvetica, Arial, sans-serif');
await expect(page.locator('#next')).toHaveCSS('font-size', '18px');
Motivation
This will help to validate css properties for UI element using record/replay.
pengooseDev, DmitriyWebDev, Pedroo123 and iumehara
Metadata
Metadata
Assignees
Labels
open-to-a-pull-requestThe feature request looks good, we are open to reviewing a PRThe feature request looks good, we are open to reviewing a PR