Allow extra options for rest requests in E2E utils - #70444
Closed
opr wants to merge 1 commit into
Closed
Conversation
|
Size Change: 0 B Total Size: 1.85 MB ℹ️ View Unchanged
|
Contributor
|
As I understand it, this error occurs when the server drops the connection. Therefore, adding an option to the REST request may not fundamentally solve will comment on woocommerce/woocommerce#58749 with my proposed solution. |
Contributor
Author
|
@t-hamano thanks for your input!
Thanks, it seems that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes
Allow consumers of the playwright E2E utils to pass additional rest options to helpers that make requests
Why?
We are experiencing some flakiness in the WooCommerce E2E tests and I believe allowing consumers of the package to define a number of retries would be beneficial.
I don't think setting this at util level is a good idea as it's better not to assume what the user wants to do.
How?
Each util that makes a
restrequest will get an additional, optional parameter that would contain options applicable to the rest request. It is spread into the request's options first, then overwritten with existing options.Batch requests also have these options applied.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast