test(10-05): cover every Phase 10 Go change with branch-level tests

- bouncer TestPhase10CookieGuard: cookie read without Bearer, Bearer wins,
  empty cookie, frontend audience and blacklisted jti rejected
- boardwalk TestPhase10BoardwalkServing: HEAD, query strings, encoded
  traversal, index by name, nested prefix, MIME fallback, constructor errors
- cabana TestPhase10Coverage: mounted unsafe routes vs the CSRF walk, option
  and filter edges, read-only labels, relation message defaults, bundle
  fallback locale, cookie refresh of an expired token in the refresh window
- phrasebook override precedence, new locale, Bundle merge order, Forms shapes
- surf prefix collision for deeper paths and the default /backend prefix
- swagger2openapi TestUnionRewrite and converter branch tests
- framework tests no longer name the application (acme fixtures instead)
This commit is contained in:
Jakub Zych
2026-09-27 18:05:28 +02:00
parent 1c2a66df45
commit ef448da1cc
14 changed files with 1055 additions and 35 deletions

View File

@@ -64,10 +64,10 @@ func TestListSchemaCompile(t *testing.T) {
}
t.Run("winter genre list still compiles", func(t *testing.T) {
const config = `list: ~/plugins/golem15/fonoteka/models/genre/columns.yaml
modelClass: Golem15\Fonoteka\Models\Genre
title: golem15.fonoteka::lang.genre.label_plural
recordUrl: golem15/fonoteka/genres/update/:id
const config = `list: ~/plugins/golem15/acme/models/genre/columns.yaml
modelClass: Golem15\Acme\Models\Genre
title: golem15.acme::lang.genre.label_plural
recordUrl: golem15/acme/genres/update/:id
noRecordsMessage: backend::lang.list.no_records
recordsPerPage: 20
showCheckboxes: true
@@ -78,19 +78,19 @@ toolbar:
`
const cols = `columns:
name:
label: golem15.fonoteka::lang.genre.name
label: golem15.acme::lang.genre.name
searchable: true
slug:
label: golem15.fonoteka::lang.genre.slug
label: golem15.acme::lang.genre.slug
searchable: true
`
ctl := schemaController{model: `Golem15\Fonoteka\Models\Genre`}
ctl := schemaController{model: `Golem15\Acme\Models\Genre`}
fsys := fstest.MapFS{
"controllers/genres/config_list.yaml": &fstest.MapFile{Data: []byte(config)},
"models/genre/columns.yaml": &fstest.MapFile{Data: []byte(cols)},
}
genre := genreConfigController{schemaController: ctl}
if _, err := CompileList("golem15.fonoteka", genre, fsys); err != nil {
if _, err := CompileList("golem15.acme", genre, fsys); err != nil {
t.Fatalf("genre list: %v", err)
}
})
@@ -267,7 +267,7 @@ func TestListSchemaRejects(t *testing.T) {
type genreConfigController struct{ schemaController }
func (c genreConfigController) ConfigDir() string { return "controllers/genres" }
func (c genreConfigController) ID() string { return "golem15.fonoteka.genres" }
func (c genreConfigController) ID() string { return "golem15.acme.genres" }
func listFS(config, columns string) fstest.MapFS {
return fstest.MapFS{