testing-library / pptr-testing-library

puppeteer + dom-testing-library = 💖
MIT License
287 stars 29 forks source link

Fix options types for extend API #43

Closed jrolfs closed 4 years ago

jrolfs commented 4 years ago

Finally a PR from me that's intentional 😅

This fixes the type definitions for the options parameter for the queries when using the extend entry point.

Some of the queries accept a selector option and some don't so I just made sure that the derived IScopedQueryMethods pulls the options type from the respective definition in IQueryMethods.

patrickhulce commented 4 years ago

oof sorry @jrolfs I forgot to merge this the other day and just merged a conflicting PR 😬 I think it might have fixed the same underlying issue though, if you just want to revert the typedef changes and ensure the tests still work?

jrolfs commented 4 years ago

Haha, sigh, yeah I got one-upped in the TypeScript department here 😛. I just cherry-picked this into the Playwright fork... I think these tests are still worth merging?

patrickhulce commented 4 years ago

I think these tests are still worth merging?

Most def 👍 thanks! 🎉