Skip to content

Commit c7de291

Browse files
committed
Display Dashboard tests with logs before ones without logs
1 parent b65a6a1 commit c7de291

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9058,7 +9058,8 @@ def __process_dashboard(self, has_exception, init=False):
90589058
)
90599059
the_failed = []
90609060
the_skipped = []
9061-
the_passed = []
9061+
the_passed_hl = [] # Passed and has logs
9062+
the_passed_nl = [] # Passed and no logs
90629063
the_untested = []
90639064
if dud2 in sb_config._results.keys():
90649065
sb_config._results.pop(dud2)
@@ -9074,8 +9075,10 @@ def __process_dashboard(self, has_exception, init=False):
90749075
the_failed.append([res_low, t_res, t_d_id, t_dur, t_l_path])
90759076
elif sb_config._results[key] == "Skipped":
90769077
the_skipped.append([res_low, t_res, t_d_id, t_dur, t_l_path])
9077-
elif sb_config._results[key] == "Passed":
9078-
the_passed.append([res_low, t_res, t_d_id, t_dur, t_l_path])
9078+
elif sb_config._results[key] == "Passed" and t_l_path:
9079+
the_passed_hl.append([res_low, t_res, t_d_id, t_dur, t_l_path])
9080+
elif sb_config._results[key] == "Passed" and not t_l_path:
9081+
the_passed_nl.append([res_low, t_res, t_d_id, t_dur, t_l_path])
90799082
elif sb_config._results[key] == "Untested":
90809083
the_untested.append([res_low, t_res, t_d_id, t_dur, t_l_path])
90819084
for row in the_failed:
@@ -9107,24 +9110,26 @@ def __process_dashboard(self, has_exception, init=False):
91079110
"" % (row[0], row[1], row[2], row[3], log_dir, row[4])
91089111
)
91099112
table_html += row
9110-
for row in the_passed:
9111-
if not row[4]:
9112-
row = (
9113-
'<tbody class="%s results-table-row">'
9114-
'<tr style="background-color: #F8FFF8;">'
9115-
'<td class="col-result">%s</td><td>%s</td><td>%s</td>'
9116-
"<td>-</td></tr></tbody>"
9117-
% (row[0], row[1], row[2], row[3])
9118-
)
9119-
else:
9120-
row = (
9121-
'<tbody class="%s results-table-row">'
9122-
'<tr style="background-color: #F8FFF8;">'
9123-
'<td class="col-result">%s</td><td>%s</td><td>%s</td>'
9124-
'<td><a href="%s">Logs</a> / <a href="%s/">Data</a>'
9125-
"</td></tr></tbody>"
9126-
"" % (row[0], row[1], row[2], row[3], log_dir, row[4])
9127-
)
9113+
for row in the_passed_hl:
9114+
# Passed and has logs
9115+
row = (
9116+
'<tbody class="%s results-table-row">'
9117+
'<tr style="background-color: #F8FFF8;">'
9118+
'<td class="col-result">%s</td><td>%s</td><td>%s</td>'
9119+
'<td><a href="%s">Logs</a> / <a href="%s/">Data</a>'
9120+
"</td></tr></tbody>"
9121+
"" % (row[0], row[1], row[2], row[3], log_dir, row[4])
9122+
)
9123+
table_html += row
9124+
for row in the_passed_nl:
9125+
# Passed and no logs
9126+
row = (
9127+
'<tbody class="%s results-table-row">'
9128+
'<tr style="background-color: #F8FFF8;">'
9129+
'<td class="col-result">%s</td><td>%s</td><td>%s</td>'
9130+
"<td>-</td></tr></tbody>"
9131+
% (row[0], row[1], row[2], row[3])
9132+
)
91289133
table_html += row
91299134
for row in the_untested:
91309135
row = (

0 commit comments

Comments
 (0)