Trying to reproduce why Playwright's .click()
doesn't open up a tooltip starting in @carbon/react
1.53.0.
The user behavior works as expected: when clicking a term with openOnHover={false}
, the definition comes up. It also works in the developer console to use .click()
on the <button>
for the term. The issue is when using Playwright's .click()
.
npm install
npm test
You can start the server with npm run dev
.
- Downgrade version in
package.json
npm install
npm test
(Remember to run npm install
again when reverting this change!)
- Add a second call to
await term.click()
before theexpect()
npm test
This simulates calling .click()
directly in the developer console.
- Replace
await term.click()
with this code:
await page.evaluate(() => {
const button = document.querySelector("button.cds--definition-term");
button.click();
});
npm test