package calendartest import ( "regexp" "testing" ) // The view switcher keeps the date you were looking at, through Month too. // A month URL names only the month, so the switcher carries the day as // ?date= and Month's Day and Week tabs go back to it, not to the 1st. func TestViewTabsKeepTheSelectedDateThroughMonth(t *testing.T) { app, session := signedIn(t, "someone@example.com") h := app.Handler() tab := func(path, label string) string { t.Helper() rec := getAs(t, h, session, path) if rec.Code != 200 { t.Fatalf("GET %s: %d", path, rec.Code) } m := regexp.MustCompile(`