Skip to content

Commit

Permalink
e2etests: Update report template
Browse files Browse the repository at this point in the history
  • Loading branch information
nhooyr committed Feb 2, 2023
1 parent f3786ba commit 5268829
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions e2etests/report/template.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
<html>
<title>E2E report</title>
<body>
<h1>Table of Contents</h1>
<ul>
{{range .Tests}}
<li><a href="#{{.Name}}">{{.Name}}</a></li>
{{end}}
</ul>
<div class="cases">
{{range .Tests}}
<div class="case">
<div class="case" id="{{.Name}}">
<h1><a href="../../{{.GotSVG}}">{{.Name}}</a></h1>
{{ if .ExpSVG }}
<h2>Expected</h2>
<img src="../../{{.ExpSVG}}" width="100%" />
<h2>Got</h2>
<h2 class="case-exp">Expected</h2>
{{ end }}
<img src="../../{{.GotSVG}}" width="100%" />
<h2 class="case-got">Got</h2>
<div class="case-img-wrapper">
{{ if .ExpSVG }}
<img src="../../{{.ExpSVG}}" width="100%" />
{{ end }}
<img src="../../{{.GotSVG}}" width="100%" />
</div>
</div>
{{end}}
</div>
Expand All @@ -20,17 +30,24 @@ <h2>Got</h2>
flex-wrap: wrap;
}
.case {
align-items: center;
justify-content: center;
position: relative;
padding: 20px;
width: 100%;
}
.case-img-wrapper {
display: flex;
align-items: center;
}
.case img {
width: 600px;
}
.case svg {
width: 400px;
height: 400px;
.case-got {
position: absolute;
left: 600px;
}
.case pre {
font-size: 10pt;
width: 400px;
.case h2 {
margin: 0;
display: inline;
}
</style>
</body>
Expand Down

0 comments on commit 5268829

Please sign in to comment.