Skip to content
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

Playwright: Pass the payload to createPost in data instead of query params to avoid URI too long errors. #59463

Merged

Conversation

samueljseay
Copy link
Contributor

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 data attribute 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

Copy link

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 props-bot label.

Unlinked Accounts

The 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.

Unlinked contributors: samueljseay.


To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense as long as the tests still pass! Thank you!

@WunderBart WunderBart added [Package] E2E Test Utils /packages/e2e-test-utils [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Feb 29, 2024
@WunderBart WunderBart merged commit 0b047bb into WordPress:trunk Feb 29, 2024
58 of 61 checks passed
@github-actions github-actions bot added this to the Gutenberg 17.9 milestone Feb 29, 2024
@samueljseay samueljseay deleted the dev/e2e-fix-request-utils-uri-too-long branch February 29, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] E2E Test Utils /packages/e2e-test-utils [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
3 participants