Skip to content

Improve portal function tests to return mock URLs and verify parameters#11725

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/improve-tests-portal-functions
Draft

Improve portal function tests to return mock URLs and verify parameters#11725
Copilot wants to merge 3 commits intomasterfrom
copilot/improve-tests-portal-functions

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Improve tests for portal functions

  • Understand the issue and current implementation
  • Update UrlServiceScriptTest.java to return mock URLs instead of parameter toString()
  • Update url-test.js to verify the mock URL format
  • Add parameter verification using ArgumentCaptor and Mockito verify
  • Update example files to work with mock URLs
  • Replace indexOf checks with exact assertEquals for precise URL validation
  • Run tests to ensure everything works
  • Verify the changes are minimal and targeted
Original prompt

This section details on the original issue you should resolve

<issue_title>Improve tests for portal functions</issue_title>
<issue_description>Currently, tests return a URL as projection of parameters to a string.
Tests must return a (mock) URL and check input parameters</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
Copilot AI changed the title [WIP] Update tests to return mock URL and validate parameters Improve portal function tests to return mock URLs and verify parameters Feb 8, 2026
Copilot AI requested a review from rymsha February 8, 2026 12:11
Copy link
Contributor

@rymsha rymsha left a comment

Choose a reason for hiding this comment

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

@copilot instead of indexOff assertEquals - exact string equality should be used

Co-authored-by: rymsha <2891483+rymsha@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

@copilot instead of indexOff assertEquals - exact string equality should be used

Changed all indexOf checks to exact assertEquals for precise URL validation in commit 90a5b0a.

Copilot AI requested a review from rymsha February 8, 2026 19:18
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.

Improve tests for portal functions

2 participants