-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add remove_handler, wait_for_load_page, expect_response, expect_response #40
Conversation
3mora2
commented
Jan 26, 2025
- add remove_handler to stop listen to event
- add expect_response, expect_response as in playwright-python
- add wait_for_load_page to wait until page loaded
- add remove_handler to stop listen to event - add expect_response, expect_response as in playwright-python - add wait_for_page_load to wait until page loaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the submission! I left a few comments, let me know when you have a chance to look at them.
Overall, the RequestExpectation
/ResponseExpectation
is a neat idea, if we can clean it up a bit I'd be happy to accept it into the library.
One additional note: can you please autoformat and lint the code using the scripts/format.sh
and scripts/lint.sh
scripts? Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I left a few more comments.
Did you see my note here?
can you please autoformat and lint the code using the scripts/format.sh and scripts/lint.sh scripts? Thank you.
Hey guys, I'm following this pull request closely because it addresses two issues I've already encountered. However, I think it could use a bit more documentation and, most importantly, some unit tests. What do you think? Let me know if I can help as well. |
Agreed, happy to take some help here, I won't have time to do either of those things anytime soon. I'll leave it to you to coordinate though. BTW, sorry for the delay in the final review, I'll try to get to it tonight. |
Hi @3mora2, I moved remove_handler to a separate pull request. I made some changes and added a few tests. Feel free to take a look and share your feedback! |
Hey @3mora2, as @khamaileon mentioned, I just merged another PR to add You'll want to merge latest master to get the change. Otherwise, after we switch to using regular expressions and get the change added to |
zendriver/core/connection.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @khamaileon, Ok
I just merged #52 and fixed the conflict in this PR. Almost ready to merge, but looks like there is a lint issue with the expectation classes (see here). Maybe we can fix this by having both of them derive from an abstract base class? I'll try to take a look at fixing it tonight if you don't get to it first. BTW, do you want credit for the change? You can add it in the CHANGELOG.md. If you want, you can also update the line in CHANELOG.md for |
check it |
Sorry, I misread; it was the commit change message. |
…nse (#40) * add remove_handler, wait_for_load_page, - add remove_handler to stop listen to event - add expect_response, expect_response as in playwright-python - add wait_for_page_load to wait until page loaded * improve - fix `remove_handler` - improve `expect_*` - improve `RequestExpectation` * improve and format * Update .gitignore * change to re.fullmatch * Update connection.py * Update tab.py * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Stephan Lensky <[email protected]>