package view
import (
"net/http"
"net/http/httptest"
"os"
"regexp"
"strings"
"testing"
)
// On a phone the cards layout shows its boxes in the order of their numbers,
// whichever stack they stand in: each box of the layout carries its number as
// data-order, and the stylesheet has a rule for it. Before, the stylesheet
// ordered by a box's place in its stack and knew four to a stack; a fifth
// landed out of place with nothing failing (owner, 2026-10-13).
func TestCardsBoxesCarryTheirNumberAsTheirOrder(t *testing.T) {
css, err := os.ReadFile("static/panel.css")
if err != nil {
t.Fatal(err)
}
box := regexp.MustCompile(`
`)
if start < 0 {
t.Fatalf("%s has no cards layout", name)
}
// The layout runs to the first page part after it that is not a box
// of it; its boxes are the numbered ones up to there.
region := page[start:]
if end := strings.Index(region, `