Skip to content

feat!: Wait For Request also return more than uri#4940

Merged
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:wfr_post_data
Jun 5, 2026
Merged

feat!: Wait For Request also return more than uri#4940
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:wfr_post_data

Conversation

@aaltat
Copy link
Copy Markdown
Member

@aaltat aaltat commented Jun 4, 2026

return dict with url, method, headers and postData as keys

Fixes: #4656

Copilot AI review requested due to automatic review settings June 4, 2026 20:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a breaking change to the Wait For Request keyword so it returns a structured object (intended to include url, method, headers, and postData) instead of only a URL, aligning with the request-introspection needs described in #4656.

Changes:

  • Change the gRPC API for WaitForRequest from Response.String to Response.Json.
  • Update the Node wrapper to serialize request details (url/method/headers/postData) into the JSON response.
  • Extend the dynamic test app and acceptance tests to exercise and validate the richer return value.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
protobuf/playwright.proto Changes WaitForRequest RPC return type to Response.Json.
node/playwright-wrapper/network.ts Returns JSON payload for waitForRequest including url/method/headers/postData.
node/dynamic-test-app/src/login.tsx Adds a new UI button that triggers a delayed POST request for testing.
Browser/keywords/network.py Updates Python keyword plumbing to consume JSON response and return it to Robot as a dict/DotDict.
atest/test/variables.resource Updates expected button count due to new button in test app.
atest/test/03_Waiting/wait_for_http.robot Updates/extends acceptance tests to validate the richer Wait For Request return value.

Comment thread node/playwright-wrapper/network.ts Outdated
Comment thread atest/test/03_Waiting/wait_for_http.robot Outdated
Comment thread Browser/keywords/network.py
Comment thread node/dynamic-test-app/src/login.tsx
Comment thread Browser/keywords/network.py
Copilot AI review requested due to automatic review settings June 5, 2026 13:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread node/playwright-wrapper/network.ts Outdated
Comment thread node/playwright-wrapper/network.ts
Comment thread atest/test/variables.resource Outdated
return dict with url, method, headers and postData as keys

Fixes: MarketSquare#4656
Copilot AI review requested due to automatic review settings June 5, 2026 14:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment on lines +120 to +132
let postData;
try {
postData = JSON.parse(result.postData() || 'null');
} catch (e) {
logger.info(`Failed to parse postData as JSON: ${String(e)}, using raw postData`);
postData = result.postData();
}
const jsonData = JSON.stringify({
url: result.url(),
method: result.method(),
headers: result.headers(),
postData: postData,
});
Comment on lines +24 to +25
Should Contain ${data.url} /api/log/event
Should Be Equal ${data.method} POST
Comment on lines +122 to +124
except json.decoder.JSONDecodeError:
logger.info(f"Failed to decode JSON: {response.json}")
data = response.json
@aaltat aaltat merged commit c181a30 into MarketSquare:main Jun 5, 2026
45 of 46 checks passed
@aaltat aaltat deleted the wfr_post_data branch June 5, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wait For Request to return post data

2 participants