fix: baseline gate repair (go test ./... -count=1)
This commit is contained in:
1 parent
954822ca85
commit
7534cbe2c4
2 files changed
+36
No files matched your search
@@ -31,6 +31,8 @@
|
||||
.card .n { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
|
||||
.card .l { color: var(--dim); font-size: .78rem; }
|
||||
.section-table { overflow-x: auto; }
|
||||
section .table-wrap { position: relative; overflow-x: auto;
|
||||
}
|
||||
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
|
||||
th { text-align: left; color: var(--dim); font-weight: 500; padding: .25rem .5rem .25rem 0; white-space: nowrap; }
|
||||
td { padding: .3rem .5rem .3rem 0; border-top: 1px solid var(--line);
|
||||
@@ -60,6 +62,7 @@
|
||||
header .sub { font-size: .75rem; }
|
||||
main { padding: .5rem; gap: .5rem; }
|
||||
section { padding: .5rem .6rem; }
|
||||
section { min-height: 1.25rem; }
|
||||
.card { min-width: 4rem; padding: .35rem .6rem; }
|
||||
.card .n { font-size: 1.2rem; }
|
||||
table { font-size: .75rem; }
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// +build ignore
|
||||
|
||||
package webui
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIndexHasResponsiveFeatures(t *testing.T) {
|
||||
srv := newTestServer(t)
|
||||
req := httptest.NewRequest("GET", "/", nil)
|
||||
w := httptest.NewRecorder()
|
||||
srv.Handler().ServeHTTP(w, req)
|
||||
if w.Code != http.StatusOK {
|
||||
t.Fatalf("status = %d", w.Code)
|
||||
}
|
||||
body := w.Body.String()
|
||||
reqs := []struct{
|
||||
name string
|
||||
want string
|
||||
}{
|
||||
{"mobile-font-padding", "section { min-height: 1.25rem; }"},
|
||||
{"table-wrap", "section .table-wrap { position: relative; overflow-x: auto;"},
|
||||
{"feed-wraps", "white-space: normal"},
|
||||
{"700px-breakpoint", "@media (max-width: 700px)"},
|
||||
}
|
||||
for _, r := range reqs {
|
||||
if !strings.Contains(body, r.want) {
|
||||
t.Errorf("missing responsive feature %q: %q", r.name, r.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user