Update kjol website with C documentation
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSSRPages(t *testing.T) {
|
||||
for _, path := range []string{"/", "/about", "/wasm/chart", "/wasm/data", "/wasm/table", "/wasm/overlays", "/wasm/kit"} {
|
||||
for _, path := range []string{"/", "/about", "/wasm/chart", "/wasm/data", "/wasm/components"} {
|
||||
deps := Deps{Path: func() string { return path }}
|
||||
html := vdom.RenderHTML(Shell(deps, Routes(deps)))
|
||||
t.Logf("%-8s %6d bytes portals=%d", path, len(html), strings.Count(html, "data-portal"))
|
||||
@@ -22,7 +22,7 @@ func TestSSRPages(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSSRTablePage(t *testing.T) {
|
||||
deps := Deps{Path: func() string { return "/wasm/table" }}
|
||||
deps := Deps{Path: func() string { return "/wasm/components" }}
|
||||
html := vdom.RenderHTML(Shell(deps, Routes(deps)))
|
||||
|
||||
// The table persists a personal layout in localStorage, which the SERVER CANNOT
|
||||
@@ -33,13 +33,21 @@ func TestSSRTablePage(t *testing.T) {
|
||||
// This is a real cost — the page ships no table content — and it is the price of
|
||||
// never showing the wrong table. See webui.RestoreLayout.
|
||||
if !strings.Contains(html, `aria-busy="true"`) {
|
||||
t.Error("SSR /table should render the loading skeleton, not a table")
|
||||
t.Error("SSR should render the AutoTable's loading skeleton, not a table")
|
||||
}
|
||||
if !strings.Contains(html, "animate-pulse") {
|
||||
t.Error("the skeleton bars are missing")
|
||||
}
|
||||
if strings.Contains(html, "Ada Lovelace") {
|
||||
t.Error("SSR rendered table CONTENT — a user with a saved layout would watch it rearrange")
|
||||
|
||||
// A salary, which ONLY the AutoTable renders.
|
||||
//
|
||||
// This used to look for "Ada Lovelace", which was a fine proxy back when the table
|
||||
// had a page to itself. It is not one any more: the components page also demos
|
||||
// PrettyTable, and PrettyTable's rows are Ada, Alan and Grace — so the old assertion
|
||||
// failed on a page that was behaving perfectly. A test that names a value only the
|
||||
// component under test can produce cannot be fooled by its neighbours.
|
||||
if strings.Contains(html, "$1,610.25") {
|
||||
t.Error("SSR rendered AutoTable CONTENT — a user with a saved layout would watch it rearrange")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user