playwright
playwright copied to clipboard
[Feature]: Show URL's within annotations as hyperlink
🚀 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..
Would be greetly appreciated, it would for example be used to add a link to the corresponding issue/task directly in the report
Hello! :) @dirtydiesel46 I made #30665 PR 🙆🏻♀️ PTAL when you have time 🙇🏻♂️
This first change looks good! Could you follow up with:
- rendering it in the HTML report and other reports
- rendering it in the Trace
- supporting it in the TeleReceiver/Emitter for shard merger?
This seems to be addressed by https://github.com/microsoft/playwright/pull/31521.