Fixed GH report layout and limited length of errors

Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-08-29 15:01:44 +03:00
parent b0b23bb735
commit ec611424cb
No known key found for this signature in database
GPG Key ID: E9B425FDFC4DEA9C
1 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class GithubHtmlReport(BaseTestReport):
html += "%s" % ''.join(test_steps_html[-2:]) html += "%s" % ''.join(test_steps_html[-2:])
html += "</blockquote>" html += "</blockquote>"
html += "</p>" html += "</p>"
html += "<code>%s</code>" % last_testrun.error html += "<code>%s</code>" % last_testrun.error[:255]
html += "<br/><br/>" html += "<br/><br/>"
if last_testrun.jobs: if last_testrun.jobs:
html += self.build_device_sessions_html(last_testrun.jobs, last_testrun) html += self.build_device_sessions_html(last_testrun.jobs, last_testrun)
@ -77,10 +77,12 @@ class GithubHtmlReport(BaseTestReport):
html = "<ins>Device sessions</ins>" html = "<ins>Device sessions</ins>"
html += "<p><ul>" html += "<p><ul>"
for job_id, i in jobs.items(): for job_id, i in jobs.items():
html += "<p>"
html += "Device %d:" % i html += "Device %d:" % i
html += "<p><ul>" html += "<ul>"
html += "<li><a href=\"%s\">Steps, video, logs</a></li>" % self.get_sauce_job_url(job_id) html += "<li><a href=\"%s\">Steps, video, logs</a></li>" % self.get_sauce_job_url(job_id)
if test_run.error: if test_run.error:
html += "<li><a href=\"%s\">Failure screenshot</a></li>" % self.get_sauce_final_screenshot_url(job_id) html += "<li><a href=\"%s\">Failure screenshot</a></li>" % self.get_sauce_final_screenshot_url(job_id)
html += "</ul></p>" html += "</ul></p>"
html += "</ul></p>"
return html return html