Playwright: Pass the payload to createPost in data instead of query params to avoid URI too long errors.#59463
Conversation
… avoid URI too long errors.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @samueljseay. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
kevin940726
left a comment
There was a problem hiding this comment.
Makes sense as long as the tests still pass! Thank you!
What?
This adjusts the playwright request utility to pass post params as data instead of as query params in the uri.
Why?
Because the post params are currently sent in query params, if you wanted to create a large post via this API you will encounter URI too long errors. I ran into this problem in #59427
How?
By passing the post attributes in the
dataattribute instead it will not cause URI too long errors no matter how long the post is that you want to create via the API.Testing Instructions
I believe that seeing the Playwright e2e tests pass in CI will be sufficient to prove that this still works as it should.
Testing Instructions for Keyboard
n/a
Screenshots or screencast
n/a