Skip to content

Commit

Permalink
tests: Made text header sticky.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Nov 20, 2024
1 parent ff7d700 commit 1b3caa9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions meta/plugins/reftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def compareImages(
if len(lhs) != len(rhs):
return False

if lhs == rhs:
return True

errorSum = 0
for i in range(len(lhs)):
diff = abs(lhs[i] - rhs[i]) / 255
Expand Down Expand Up @@ -135,6 +138,7 @@ def getInfo(txt):
<h1>{props.get('name')}</h2>
<p>{props.get('help')}</p>
<a href="{file}">Source</a>
</div>
"""

search = re.search(r"""<container>([\w\W]+?)</container>""", test)
Expand Down Expand Up @@ -266,8 +270,6 @@ def getInfo(txt):
if args.fast:
break

report += "</div><hr />"

report += """
</body>
<style>
Expand All @@ -279,11 +281,17 @@ def getInfo(txt):
body {
font-family: sans-serif;
background-color: #18181b;
background-color: #09090b;
color: #fafafa
}
.test {
padding: 8px;
background-color: #18181b;
border-bottom: 1px solid #27272a;
position: sticky;
top: 0;
z-index: 100;
}
.test-case {
Expand Down

0 comments on commit 1b3caa9

Please sign in to comment.