how to add a relative link through addReporterContext in 2.3.0 +?
See original GitHub issueHello, i’ve been using this code in 2.0.0:
let partial = "testfiles/test1"; // <- this point to a system folder like /users/me/myproj/reports/mochawesomerun1/testfiles/test1
let mylink = '<a href=' + partial + '>' + 'click to see inside test1 files' + '</a>';
addReporterContext(that, {
title: "test folder (click the links to see contents)",
value: mylink
});
which worked fine, however, after upgrading to 2.3.0, mochawesome now slaps extra set of double quotes around the HTML, and the link is not rendered.
Could you suggest a workaround for this case? For now i’ve downgraded back to 2.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to create absolute hyperlinks and relative hyperlinks in ...
Describes how to create absolute and relative hyperlinks in Word 2003 ... By default, the Update links on save option in Web Options...
Read more >How to link pages using relative URL in HTML? - Tutorialspoint
How to link pages using relative URL in HTML? - In HTML different HTML elements have attributes that contain link to the other...
Read more >Knowledge Article - How to add relative link (url)... - ServiceNow
MVP and Rising Star nominations are open! submit your nomination(s) today thru December 31st. Nominate Now ...
Read more >Timeout on Modal wait_for - Pycord-Development ... - IssueHint
Issue Title Created Date Comment Count Updated...
Remove the prefix `QuickAdd:` from the command 0 2021‑10‑10 2022‑08...
3 icon requests (bollard / appear / pillar)...
Read more >Relative links in an included html not working due to directory ...
html file and the header is included in all the files (using jquery). If I give a relative link in header.html as: <a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Being able to add relative links is critical for test reports. Please reopen this issue.
What was the behavior of your link? Did it open a browser window or a local folder on your desktop?
Passing HTML like that was a bit of a loophole, which was closed in 2.1.1 by removing
dangerouslySetInnerHTML
from the code snippet component. The component will no longer be able to render HTML that you pass. You can pass links as strings in yourvalue
prop but it expects links to use thehttp
orftp
protocol. I don’t think there is any workaround since it was kind of a bug to begin with.