Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Fixed incorrect links to artifacts for UTR run on windows #141

Merged

Conversation

kkateq
Copy link

@kkateq kkateq commented Feb 26, 2016

JSON provide artifacts relative links in windows style format now when UTR run on windows, so the links to artifacts became broken for such reports

@@ -27,7 +27,7 @@
<div class="clearfix"></div>
{% for artifact in suite.artifacts %}
<div class="artifact">
<a target="_blank" href="{{ join(path_to_artifacts, artifact) }}">{{ basename(artifact) }}</a>
<a target="_blank" href="{{ join(path_to_artifacts, artifact).replace("\\","/") }}">{{ basename(artifact.replace("\\","/")) }}</a>
Copy link
Member

Choose a reason for hiding this comment

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

You might want to use urlparse.urljoin instead.

That is assuming that we can pass urljoin to this (jinja?) template, and that path_to_artifacts does not contain \ already :)

Copy link
Author

Choose a reason for hiding this comment

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

No, path_to_artifacts will never contain '', the artifact can have '', urljoin works the same way as path join, it doesn't replace backslashes to forwardslashes when joins

Copy link
Member

Choose a reason for hiding this comment

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

Ok, approved as is then :)

kkateq pushed a commit that referenced this pull request Feb 29, 2016
…report-win-links-hotfix

Fixed incorrect links to artifacts for UTR run on windows
@kkateq kkateq merged commit 4793bc3 into vKatana2.1.x/staging Feb 29, 2016
@mariangemarcano mariangemarcano deleted the vKatana2.1.x/feature/report-win-links-hotfix branch April 13, 2016 11:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants