Skip to content

OLS-1555: PF5: Add Cypress tests for HITL tool approval flow#1910

Open
kyoto wants to merge 1 commit intoopenshift:pattern-fly-5from
kyoto:pf5-HITL-tests
Open

OLS-1555: PF5: Add Cypress tests for HITL tool approval flow#1910
kyoto wants to merge 1 commit intoopenshift:pattern-fly-5from
kyoto:pf5-HITL-tests

Conversation

@kyoto
Copy link
Copy Markdown
Member

@kyoto kyoto commented May 7, 2026

Manual back port of #1909

Summary by CodeRabbit

  • Tests
    • Added custom testing commands for query and tool approval workflows
    • Expanded test coverage with new test cases validating approval and rejection flows, including UI updates

Co-authored-by: Cursor <cursoragent@cursor.com>
@kyoto kyoto requested a review from JoaoFula May 7, 2026 05:18
@kyoto kyoto added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

📝 Walkthrough

Walkthrough

Two new Cypress support commands (interceptQueryWithApproval and interceptToolApproval) are added to enable mocking of tool approval workflows, and new HITL test coverage validates both approval and rejection paths in the UI.

Changes

Tool Approval Testing Infrastructure and Coverage

Layer / File(s) Summary
Support Command Definitions
cypress/support/commands.ts
Type declarations and implementations for interceptQueryWithApproval (stubs /v1/streaming_query with approval-required mock response) and interceptToolApproval (stubs /v1/tool-approvals/decision and validates request payload).
Test Scenarios
tests/tests/lightspeed-install.cy.ts
New selectors for tool approval card and tool label; test suite covering approval flow (card interaction, "Tool output" modal in pending status) and rejection flow ("Tool call rejected" messaging).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 With whiskers twitching, I approve this call,
New commands stubbing requests, covering it all,
HITL approvals dance in tests so bright,
Reject or accept, the UI's now tight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title directly reflects the main changes: adding Cypress tests for HITL tool approval flow, which matches the file modifications in both cypress/support/commands.ts and tests/tests/lightspeed-install.cy.ts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested a review from joshuawilson May 7, 2026 05:18
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kyoto kyoto changed the title PF5: Add Cypress tests for HITL tool approval flow OLS-1555: PF5: Add Cypress tests for HITL tool approval flow May 7, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 7, 2026

@kyoto: This pull request references OLS-1555 which is a valid jira issue.

Details

In response to this:

Manual back port of #1909

Summary by CodeRabbit

  • Tests
  • Added custom testing commands for query and tool approval workflows
  • Expanded test coverage with new test cases validating approval and rejection flows, including UI updates

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants