Skip to content

[Enhancement] Hover Rendering of Test Case Does Not Resolve a Variable-Based URL in the Documentation Section #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GLMeece opened this issue Oct 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@GLMeece
Copy link

GLMeece commented Oct 8, 2024

Background

In the [Documentation] section of each test case, our team includes (at minimum) the test case reference ID as a hyperlink. Because the URL base pointing to our test case hosting service (in our case, Zephyr Scale) is quite long, we have added it as a suite variable. Example:

*** Variables ***
${ZEPHYR_URL}  https://companyname.atlassian.net/projects/AB?selectedItem=com.atlassian.plugins.atlassian-connect-plugin:com.kanoah.test-manager__main-project-page#!/testCase/

We then prepend that variable to construct the entire URL so the hyperlink will direct the viewer of the test report to the test case page for a full description of said test case. Example:

*** Test Cases ***
My Important Test Case
    [Documentation]    Test case [${ZEPHYR_URL}AG-T91|AG-T91]

In the test case report, the above would render the entire hyperlink correctly as expected.

Issue Description

When hovering over the test case, the "hover text" appears to render the documentation section correctly, including an indication of a hyperlink:
robotcode_tc_hover_overview

However, when you hover over the hyperlink itself, you see that the variable is rendered as literal text and isn't resolved into its value:
robotcode_tc_hover_on_hyperlink

This is confirmed when you click on the hyperlink as invalid:
robotcode_invalid_hyperlink

Note: When you hover of the variable within the test case documentation section, you see that it is resolving the value correctly:
robotcode_resolved_url_variable

Steps To Reproduce

Steps to reproduce the behavior:

  1. Set up a variable as indicated above
  2. Create a URL as indicated above in the [Documentation] section
  3. Hover over the test case and note that URL appears to be "recognized" from its formatting.
  4. Attempt to click on the URL; result - it cannot resolve to a proper URL value
  5. Hover over the variable as indicated; result - the variable is in fact recognized and resolved

Expected behavior

It would be expected that the hover text, including the documentation section, would resolve the variables such that a complete hyperlink would be achieved and resolve via clicking on it.

Desktop Environment

  • VS Code Version: 1.93.1
  • RobotCode Version: 0.92.0
  • OS: Windows 11 Enterprise
  • Python Version: 3.12.3
  • RobotFramework Version: 6.1.1
  • Robocop: 5.3.0
  • Robotidy: 4.6.0
@GLMeece GLMeece added the bug Something isn't working label Oct 8, 2024
@d-biehl d-biehl added enhancement New feature or request and removed bug Something isn't working labels Oct 8, 2024
@d-biehl d-biehl changed the title [BUG] Hover Rendering of Test Case Does Not Resolve a Variable-Based URL in the Documentation Section [Enhancement] Hover Rendering of Test Case Does Not Resolve a Variable-Based URL in the Documentation Section Oct 8, 2024
@d-biehl d-biehl closed this as completed in ffa9bdb Oct 8, 2024
@GLMeece
Copy link
Author

GLMeece commented Oct 8, 2024

Woo-hoo! 🥳 Can't wait to try it out!

@d-biehl
Copy link
Member

d-biehl commented Oct 8, 2024

btw. the new RobotCode version is published...

@GLMeece
Copy link
Author

GLMeece commented Oct 17, 2024

I mean to follow up. Yes, it works exactly as I'd hope it would. Thanks for the amazing turn-around time! ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants