Revision: 3991
Author: jussi.ao.malinen
Date: Mon Aug 30 06:45:13 2010
Log: spaces in msg anchors are now '_' characters.
http://code.google.com/p/robotframework/source/detail?r=3991

Modified:
 /trunk/atest/robot/output/links_in_report_and_log.txt
 /trunk/src/robot/serializing/logserializers.py

=======================================
--- /trunk/atest/robot/output/links_in_report_and_log.txt Mon Aug 30 05:53:20 2010 +++ /trunk/atest/robot/output/links_in_report_and_log.txt Mon Aug 30 06:45:13 2010
@@ -30,8 +30,8 @@
Should Contain ${LOG} <a class="name" name="suite_Multiple Suites.Subsuite1.Suite4" title="Multiple Suites.Subsuite1.Suite4">Suite4</a>

 Link From Log's "Test Execution Errors" Table To Log's Details
- ${match} ${group1} ${group2} = Should Match Regexp ${LOG} <td class="time"><a href="#msg_(\\d{8}) (\\d{2}:\\d{2}:\\d{2}.\\d{3})" onclick="set_element_visible\\('msg_\\d{8} \\d{2}:\\d{2}:\\d{2}.\\d{3}'\\)" title="Link to details.">\\d{8}&nbsp;\\d{2}:\\d{2}:\\d{2}.\\d{3}</a></td>\n<td class="warn level">WARN</td>\n<td class="msg">warning</td> - Should Contain ${LOG} <td class="time" id="msg_${group1} ${group2}">${group2}</td> + ${match} ${group1} ${group2} = Should Match Regexp ${LOG} <td class="time"><a href="#msg_(\\d{8})_(\\d{2}:\\d{2}:\\d{2}.\\d{3})" onclick="set_element_visible\\('msg_\\d{8}_\\d{2}:\\d{2}:\\d{2}\\.\\d{3}'\\)" title="Link to details\\.">\\d{8}&nbsp;\\d{2}:\\d{2}:\\d{2}\\.\\d{3}</a></td>\n<td class="warn level">WARN</td>\n<td class="msg">warning</td> + Should Contain ${LOG} <td class="time" id="msg_${group1}_${group2}">${group2}</td>

No Link From Log's "Test Execution Errors" Table To Log's Details When There Is No Link Target Should Match Regexp ${LOG} <td class="time">\\d{8}&nbsp;\\d{2}:\\d{2}:\\d{2}.\\d{3}</td>\n<td class="error level">ERROR</td>\n<td class="msg">Invalid syntax in file '.*SUite7.html' in table 'Setting': Importing test library 'NonExisting' failed:
=======================================
--- /trunk/src/robot/serializing/logserializers.py      Mon Aug 30 06:18:21 2010
+++ /trunk/src/robot/serializing/logserializers.py      Mon Aug 30 06:45:13 2010
@@ -74,7 +74,7 @@
         attrs = {'class': 'time'}
         if msg.level in ['WARN', 'ERROR']:
             # Allow linking from Test Execution Errors table
-            attrs['id'] = 'msg_%s' % msg.timestamp
+            attrs['id'] = 'msg_%s' % msg.timestamp.replace(' ','_')
         self._writer.element('td', msg.timestamp.split()[1], attrs)
         self._writer.element('td', msg.level,
                              {'class': '%s level' % msg.level.lower()})
@@ -291,8 +291,8 @@

     def _write_timestamp(self, msg):
         if msg.linkable:
-            attrs = {'href': "#msg_%s" % msg.timestamp,
- 'onclick': "set_element_visible('msg_%s')" % msg.timestamp,
+            attrs = {'href': "#msg_%s" % msg.timestamp.replace(' ','_'),
+ 'onclick': "set_element_visible('msg_%s')" % msg.timestamp.replace(' ','_'),
                      'title': 'Link to details.'}
             self._writer.start('a', attrs, newline=False)
self._writer.content(msg.timestamp.replace(' ', '&nbsp;'), escape=False)

Reply via email to