Skip to content

Commit 28eef66

Browse files
committed
Refactor completed pytest-html reports
1 parent 6ea000a commit 28eef66

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

seleniumbase/plugins/pytest_plugin.py

+12
Original file line numberDiff line numberDiff line change
@@ -2223,6 +2223,9 @@ def _perform_pytest_unconfigure_(config):
22232223
the_html_r = the_html_r.replace(
22242224
ph_link, "%s and %s" % (sb_link, ph_link)
22252225
)
2226+
the_html_r = the_html_r.replace(
2227+
"findAll('.collapsible", "//findAll('.collapsible"
2228+
)
22262229
the_html_r = the_html_r.replace(
22272230
"mediaName.innerText", "//mediaName.innerText"
22282231
)
@@ -2258,6 +2261,9 @@ def _perform_pytest_unconfigure_(config):
22582261
html_style = html_style.replace(
22592262
"- 80px);", "- 80px);\n margin-bottom: -42px;"
22602263
)
2264+
html_style = html_style.replace(".collapsible", ".oldc")
2265+
html_style = html_style.replace(" (hide details)", "")
2266+
html_style = html_style.replace(" (show details)", "")
22612267
with open(assets_style, "w", encoding="utf-8") as f:
22622268
f.write(html_style)
22632269
with suppress(Exception):
@@ -2357,6 +2363,9 @@ def _perform_pytest_unconfigure_(config):
23572363
html_style = html_style.replace(
23582364
"- 80px);", "- 80px);\n margin-bottom: -42px;"
23592365
)
2366+
html_style = html_style.replace(".collapsible", ".oldc")
2367+
html_style = html_style.replace(" (hide details)", "")
2368+
html_style = html_style.replace(" (show details)", "")
23602369
with open(assets_style, "w", encoding="utf-8") as f:
23612370
f.write(html_style)
23622371
with suppress(Exception):
@@ -2424,6 +2433,9 @@ def _perform_pytest_unconfigure_(config):
24242433
the_html_r = the_html_r.replace(
24252434
ph_link, "%s and %s" % (sb_link, ph_link)
24262435
)
2436+
the_html_r = the_html_r.replace(
2437+
"findAll('.collapsible", "//findAll('.collapsible"
2438+
)
24272439
the_html_r = the_html_r.replace(
24282440
"mediaName.innerText", "//mediaName.innerText"
24292441
)

0 commit comments

Comments
 (0)