Closed germsvel closed 5 months ago
Hey @germsvel, thanks for the contribution!
I made some adjustments in commits:
Those are worth a quick look. And, any feedback/suggestions based on those would be great.
The other 4 commits are not directly related to your changes, but came along in my rebasing (the PR revealed some missing changes needed). I've decided to be okay with having those "tag along" with your PR 🤷🤩
All that said, I'm happy to merge your change. Please continue. 🙂
What changed?
We implement a basic version of
Page.Keyboard
functions whose specs were commented out in the module.The test cases are the simplest versions I could come up with (having borrowed heavily from Python's keyboard tests)
The implementation also follows Python's implementations.
Noteworthy Highlights
Our implementation takes a
%Page{}
struct rather than what the specs suggested (aKeyboard.t()
). I don't know if it's possible to pass down a narrower type, but as far as I could tellPage
had both thesession
andguid
(which are needed for theChannel.post
call).We namespace
Playwright.Keyboard
underPage
(i.e.Playwright.Page.Keyboard
) to match the directory structure and since that seems to match the Playwright documentation as well.Finally, we add a new
test/assets/
directory where we include a newinputs/keyboard.html
page. That page is copied directly from Python, so it follows Python's style of testing. In particular, our tests needed thegetResult()
function to get the values back for our test assertions.