Skip to content

Playwright: requestUtils createPost triggers URI too long. Should pass payload via data not query params #59427

@samueljseay

Description

@samueljseay

Description

If you pass post content of any significant size to the requestUtils createPost utility, it will trigger a URI too long error.

For testing of complex scenarios with multiple blocks we use this utility in WooCommerce e2e tests. As a workaround I've called requestUtils.rest directly and passed the params via data instead, but I think the utility should do this by default.

Step-by-step reproduction instructions

use the createPost utility in an e2e test, pass some large post content.

I have this template that I was using to create the post, its approx 5k characters and triggers the URI error for me:
active-filters.txt

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] E2E Tests/packages/e2e-tests[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions