e2etests: Update report template

This commit is contained in:
Anmol Sethi 2023-02-02 11:20:45 -08:00
parent f3786ba5ec
commit 5268829b59
No known key found for this signature in database
GPG key ID: 25BC68888A99A8BA

View file

@ -1,16 +1,26 @@
<html> <html>
<title>E2E report</title> <title>E2E report</title>
<body> <body>
<h1>Table of Contents</h1>
<ul>
{{range .Tests}}
<li><a href="#{{.Name}}">{{.Name}}</a></li>
{{end}}
</ul>
<div class="cases"> <div class="cases">
{{range .Tests}} {{range .Tests}}
<div class="case"> <div class="case" id="{{.Name}}">
<h1><a href="../../{{.GotSVG}}">{{.Name}}</a></h1> <h1><a href="../../{{.GotSVG}}">{{.Name}}</a></h1>
{{ if .ExpSVG }} {{ if .ExpSVG }}
<h2>Expected</h2> <h2 class="case-exp">Expected</h2>
<img src="../../{{.ExpSVG}}" width="100%" />
<h2>Got</h2>
{{ end }} {{ 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> </div>
{{end}} {{end}}
</div> </div>
@ -20,17 +30,24 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.case { .case {
align-items: center; position: relative;
justify-content: center;
padding: 20px; padding: 20px;
width: 100%;
} }
.case svg { .case-img-wrapper {
width: 400px; display: flex;
height: 400px; align-items: center;
} }
.case pre { .case img {
font-size: 10pt; width: 600px;
width: 400px; }
.case-got {
position: absolute;
left: 600px;
}
.case h2 {
margin: 0;
display: inline;
} }
</style> </style>
</body> </body>