Skip to content
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

[Feature]: Show URL's within annotations as hyperlink #30095

Open
dirtydiesel46 opened this issue Mar 25, 2024 · 2 comments · May be fixed by #30665
Open

[Feature]: Show URL's within annotations as hyperlink #30095

dirtydiesel46 opened this issue Mar 25, 2024 · 2 comments · May be fixed by #30665
Labels
open-to-a-pull-request The feature request looks good, we are open to reviewing a PR P3-collecting-feedback

Comments

@dirtydiesel46
Copy link

dirtydiesel46 commented Mar 25, 2024

🚀 Feature Request

Add functionality to display URL within annotations as hyperlink instead of just as a string

Example

test.describe(
  "Test URL string hyperlink",
  {
    annotation: [
      {
        type: "issue",
        description:
          "https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+",
      },
      {
        type: "Project",
        description: "Part of this project - https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+",
      },
    ],
  },

As can be seen in a report for running the above example test, the "issue" description will be fine - and show as a hyperlink - because it's the only part of the string present

However, the Project description won't show as an hyperlink - just as a normal string

Suggest adding functionality to do the below

test.describe(
  "Test URL string hyperlink",
  {
    annotation: [
      {
        type: "issue",
        description:
          "https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+",
      },
      {
        type: "Project",
        url: "https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+"
        description: "Part of this project",
      },
    ],
  },

Motivation

Easier to click on the hyperlink and open up the URL, similar to how Playwright currently caters for only a URL in a string to be hyperlinked, adding support for this would make it even better..

@pavelfeldman pavelfeldman added open-to-a-pull-request The feature request looks good, we are open to reviewing a PR P3-collecting-feedback labels Mar 25, 2024
@Az8th
Copy link
Contributor

Az8th commented Mar 26, 2024

Would be greetly appreciated, it would for example be used to add a link to the corresponding issue/task directly in the report

osohyun0224 added a commit to osohyun0224/playwright that referenced this issue May 5, 2024
The 'url' field is added to the test annotations to provide a distinct way to store links alongside descriptions. This change allows annotations to include URLs for improved clarity and direct linking, which enhances test report organization.

References: microsoft#30095
@osohyun0224
Copy link

osohyun0224 commented May 5, 2024

Hello! :) @dirtydiesel46 I made #30665 PR 🙆🏻‍♀️
PTAL when you have time 🙇🏻‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-to-a-pull-request The feature request looks good, we are open to reviewing a PR P3-collecting-feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants