You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a component test to test the hover state of a React component. I'm using @percy/playwright and @playwright/experimental-ct-react. I'm using playwright's page.locator().hover() to activate the element's hover state.
when i generate a screenshot using Playwright with await expect(page).toHaveScreenshot() i get the expected behvaiour - the :hover state is applied and the background is green.
but when i generate a screenshot via Percy with await percySnapshot(page, 'hover-state-test.png') the :hover state is not applied and the background is red.
what do i need to do to get Percy to render the hover state?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to write a component test to test the hover state of a React component. I'm using
@percy/playwright
and@playwright/experimental-ct-react
. I'm using playwright'spage.locator().hover()
to activate the element's hover state.Here's some example code:
when i generate a screenshot using Playwright with
await expect(page).toHaveScreenshot()
i get the expected behvaiour - the:hover
state is applied and the background is green.but when i generate a screenshot via Percy with
await percySnapshot(page, 'hover-state-test.png')
the:hover
state is not applied and the background is red.what do i need to do to get Percy to render the hover state?
Beta Was this translation helpful? Give feedback.
All reactions